refactor(repo): reformat to nixfmt; relicense to 0BSD
This commit is contained in:
parent
035fb24038
commit
db2564d828
39 changed files with 451 additions and 318 deletions
|
@ -3,19 +3,20 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
cfg = config.alqueva.programs.sleep-or-die;
|
||||
inherit (lib) mkOption mkEnableOption types mkIf;
|
||||
sleep-or-die = let
|
||||
image =
|
||||
if cfg.image == null
|
||||
then ""
|
||||
else "-i ${cfg.image}";
|
||||
sound =
|
||||
if cfg.sound == null
|
||||
then ""
|
||||
else "ffplay -nodisp -autoexit ${cfg.sound}";
|
||||
in
|
||||
inherit (lib)
|
||||
mkOption
|
||||
mkEnableOption
|
||||
types
|
||||
mkIf
|
||||
;
|
||||
sleep-or-die =
|
||||
let
|
||||
image = if cfg.image == null then "" else "-i ${cfg.image}";
|
||||
sound = if cfg.sound == null then "" else "ffplay -nodisp -autoexit ${cfg.sound}";
|
||||
in
|
||||
pkgs.writeShellApplication {
|
||||
name = "sod";
|
||||
runtimeInputs = [
|
||||
|
@ -28,7 +29,8 @@
|
|||
shutdown +60 "This was automatically invoked by 'sleep-or-die'"
|
||||
'';
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.alqueva.programs.sleep-or-die = {
|
||||
enable = mkEnableOption "sleep-or-die";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue