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