From 46da0f1495d713a4997d3cc13368102ebf336d35 Mon Sep 17 00:00:00 2001 From: KoenDR06 Date: Wed, 19 Nov 2025 22:10:08 +0100 Subject: [PATCH] attempt 4 --- modules/timers/flakeUpdate.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/modules/timers/flakeUpdate.nix b/modules/timers/flakeUpdate.nix index 3fee851..f7bda08 100644 --- a/modules/timers/flakeUpdate.nix +++ b/modules/timers/flakeUpdate.nix @@ -22,16 +22,15 @@ in { }; }; - systemd.services."flake-update" = let - git = "${pkgs.git}/bin/git"; - in { + systemd.services."flake-update" = { script = '' + #!/run/current-system/sw/bin/zsh cd /home/horseman/nix-config - ${git} pull - nix flake update + git pull + sudo nix flake update rebuild .#${config.networking.hostName} - ${git} commit flake.lock -m "Update flake" - ${git} push + git commit flake.lock -m "Update flake" + git push ''; serviceConfig = { Type = "oneshot";