Prevents nixos-upgrade from failing due to interactive git authorization.
This commit is contained in:
parent
4ebc3d6664
commit
7d3f467586
1 changed files with 13 additions and 3 deletions
|
@ -2,6 +2,7 @@
|
||||||
inputs,
|
inputs,
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -37,7 +38,16 @@ in
|
||||||
config.safe.directory = [ "/etc/nixos" ];
|
config.safe.directory = [ "/etc/nixos" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.nixos-upgrade.preStart = ''
|
systemd.services.nixos-upgrade.preStart =
|
||||||
nix flake update --flake ${config.system.autoUpgrade.flake}
|
let
|
||||||
'';
|
inputsToIgnore = [
|
||||||
|
"self"
|
||||||
|
"seven-modules"
|
||||||
|
];
|
||||||
|
inputsToUpdate = lib.filter (i: !(lib.elem i inputsToIgnore)) (lib.attrNames inputs);
|
||||||
|
inputsToUpdateStr = lib.concatStringsSep " " inputsToUpdate;
|
||||||
|
in
|
||||||
|
''
|
||||||
|
nix flake update ${inputsToUpdateStr} --flake ${config.system.autoUpgrade.flake}
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue