attempt 5
This commit is contained in:
parent
62579dd9ed
commit
e89849887a
1 changed files with 6 additions and 4 deletions
|
|
@ -22,15 +22,17 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services."flake-update" = {
|
systemd.services."flake-update" = let
|
||||||
|
git = "${pkgs.git}/bin/git";
|
||||||
|
in {
|
||||||
script = ''
|
script = ''
|
||||||
#!/run/current-system/sw/bin/zsh
|
#!/run/current-system/sw/bin/zsh
|
||||||
cd /home/horseman/nix-config
|
cd /home/horseman/nix-config
|
||||||
git pull
|
${git} pull
|
||||||
sudo nix flake update
|
sudo nix flake update
|
||||||
rebuild .#${config.networking.hostName}
|
rebuild .#${config.networking.hostName}
|
||||||
git commit flake.lock -m "Update flake"
|
${git} commit flake.lock -m "Update flake"
|
||||||
git push
|
${git} push
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue