update flake itme

This commit is contained in:
KoenDR06 2025-11-19 22:02:35 +01:00
parent 81c5ee9778
commit 748190e350

View file

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