From 748190e350bd155dd4ba0fb4fb0264a0c32ba127 Mon Sep 17 00:00:00 2001 From: KoenDR06 Date: Wed, 19 Nov 2025 22:02:35 +0100 Subject: [PATCH] update flake itme --- modules/timers/flakeUpdate.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/timers/flakeUpdate.nix b/modules/timers/flakeUpdate.nix index 1bca345..361f341 100644 --- a/modules/timers/flakeUpdate.nix +++ b/modules/timers/flakeUpdate.nix @@ -1,6 +1,7 @@ { lib, config, + pkgs, ... }: let inherit (lib) mkEnableOption mkIf; @@ -21,14 +22,16 @@ in { }; }; - systemd.services."flake-update" = { + systemd.services."flake-update" = let + git = "${pkgs.git}/bin/git"; + in { script = '' cd /home/horseman/nix-config - git pull + ${git} pull 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";