update flake itme
This commit is contained in:
parent
81c5ee9778
commit
748190e350
1 changed files with 7 additions and 4 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkEnableOption mkIf;
|
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 = ''
|
script = ''
|
||||||
cd /home/horseman/nix-config
|
cd /home/horseman/nix-config
|
||||||
git pull
|
${git} pull
|
||||||
nix flake update
|
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