diff --git a/machines/terra/modules.nix b/machines/terra/modules.nix index 8e8ad0a..82b368f 100644 --- a/machines/terra/modules.nix +++ b/machines/terra/modules.nix @@ -52,7 +52,7 @@ }; timers = { - wol.enable = true; + wol.enable = true; }; }; } diff --git a/modules/apps/terminal.nix b/modules/apps/terminal.nix index 0d94c96..52f2b9c 100644 --- a/modules/apps/terminal.nix +++ b/modules/apps/terminal.nix @@ -40,7 +40,7 @@ in { ]; environment.sessionVariables = rec { - TERM = "kitty" + TERM = "kitty"; }; # Docker diff --git a/modules/default.nix b/modules/default.nix index 7e471d4..da0e719 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -12,6 +12,7 @@ ./users ./boot ./base + ./timers ./username.nix ]; } diff --git a/modules/timers/backup.nix b/modules/timers/backup.nix index 783b622..9c6aa75 100644 --- a/modules/timers/backup.nix +++ b/modules/timers/backup.nix @@ -17,23 +17,21 @@ in { }; config = mkIf cfg.enable { - assert homeCfg.network.syncthing || throw "Syncthing has not been enabled on this machine, refusing to add timer."; - - systemd.timers."backupsyncthing" = { - wantedby = ["timers.target"]; - timerconfig = { - oncalendar = "weekly"; - persistent = true; + systemd.timers."backupSyncthing" = { + wantedBy = ["timers.target"]; + timerConfig = { + onCalendar = "weekly"; + Persistent = true; }; }; - systemd.services."backupsyncthing" = { + systemd.services."backupSyncthing" = { script = '' /home/horseman/nix-config/misc/backup.sh ''; - serviceconfig = { - type = "oneshot"; - user = "horseman"; + serviceConfig = { + Type = "oneshot"; + User = "horseman"; }; }; }; diff --git a/modules/timers/default.nix b/modules/timers/default.nix new file mode 100644 index 0000000..8b53df1 --- /dev/null +++ b/modules/timers/default.nix @@ -0,0 +1,10 @@ +{ + inputs, + headless, + ... +}: { + imports = [ + ./wol.nix + ./backup.nix + ]; +} diff --git a/modules/timers/wol.nix b/modules/timers/wol.nix index e62e833..de399b7 100644 --- a/modules/timers/wol.nix +++ b/modules/timers/wol.nix @@ -17,8 +17,6 @@ in { }; config = mkIf cfg.enable { - assert homeCfg.apps.terminal || throw "wakeonlan has not been not installed on this machine, refusing to add timer."; - systemd.timers."enable-wol" = { wantedBy = ["timers.target"]; timerConfig = { diff --git a/modules/wm/qtile/default.nix b/modules/wm/qtile/default.nix index 225eb4b..c499fe1 100644 --- a/modules/wm/qtile/default.nix +++ b/modules/wm/qtile/default.nix @@ -25,7 +25,8 @@ in { cd /home/horseman && \ rm -r .config/qtile && \ cp -r nix-config/modules/wm/qtile/config \ - .config/qtile + .config/qtile && \ + sudo chown -R horseman:users .config/qtile ''; }; }