refactor(repo): reformat to nixfmt; relicense to 0BSD

This commit is contained in:
Artur Manuel 2025-03-06 20:45:49 +00:00
commit db2564d828
Signed by: amadaluzia
SSH key fingerprint: SHA256:Zwg7gBuZyaG48ucAZneJwltiXu0+tJb7c3lYt9AYlLg
39 changed files with 451 additions and 318 deletions

View file

@ -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";