From a554de20710ac2145079d50b634e72b1377190e8 Mon Sep 17 00:00:00 2001 From: KoenDR06 Date: Wed, 19 Nov 2025 22:17:15 +0100 Subject: [PATCH] remove timer --- machines/solis/modules.nix | 1 - modules/timers/default.nix | 1 - modules/timers/flakeUpdate.nix | 43 ---------------------------------- 3 files changed, 45 deletions(-) delete mode 100644 modules/timers/flakeUpdate.nix diff --git a/machines/solis/modules.nix b/machines/solis/modules.nix index 8e84ee7..0c9e32e 100644 --- a/machines/solis/modules.nix +++ b/machines/solis/modules.nix @@ -33,7 +33,6 @@ timers = { backup.enable = true; rooms.enable = true; - flakeUpdate.enable = true; }; }; } diff --git a/modules/timers/default.nix b/modules/timers/default.nix index 05da776..330ca6a 100644 --- a/modules/timers/default.nix +++ b/modules/timers/default.nix @@ -3,6 +3,5 @@ ./wol.nix ./backup.nix ./rooms.nix - ./flakeUpdate.nix ]; } diff --git a/modules/timers/flakeUpdate.nix b/modules/timers/flakeUpdate.nix deleted file mode 100644 index 3131648..0000000 --- a/modules/timers/flakeUpdate.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ - lib, - config, - pkgs, - ... -}: let - inherit (lib) mkEnableOption mkIf; - cfg = config.horseman.timers.flakeUpdate; -in { - options = { - horseman.timers.flakeUpdate = { - enable = mkEnableOption "Updates flake.nix weekly"; - }; - }; - - config = mkIf cfg.enable { - systemd.timers."flake-update" = { - wantedBy = ["timers.target"]; - timerConfig = { - OnCalendar = "weekly"; - Persistent = true; - }; - }; - - systemd.services."flake-update" = let - git = "sudo -u horseman ${pkgs.git}/bin/git"; - in { - script = '' - #!/run/current-system/sw/bin/zsh - cd /home/horseman/nix-config - ${git} pull - sudo nix flake update - rebuild .#${config.networking.hostName} - ${git} commit flake.lock -m "Update flake" - ${git} push - ''; - serviceConfig = { - Type = "oneshot"; - User = "root"; - }; - }; - }; -}