fix: make autoUpgrade update flake inputs again

This commit is contained in:
Felix Schröter 2025-01-16 14:09:55 +01:00
parent 29b693c1c7
commit fdc8002a0d
Signed by: felschr
GPG key ID: 671E39E6744C807D

View file

@ -1,7 +1,6 @@
{ inputs, lib, ... }: { inputs, config, ... }:
let let
flakes = lib.filterAttrs (name: value: value ? outputs) inputs;
inherit (inputs.self.outputs) nixConfig; inherit (inputs.self.outputs) nixConfig;
in in
{ {
@ -21,14 +20,10 @@ in
system.autoUpgrade = { system.autoUpgrade = {
enable = true; enable = true;
dates = "03:00"; dates = "03:00";
flake = inputs.self.outPath; flake = "/etc/nixos";
flags =
with lib;
flatten (
mapAttrsToList (n: _: [
"--update-input"
n
]) flakes
);
}; };
systemd.services.nixos-upgrade.preStart = ''
nix flake update --flake ${config.system.autoUpgrade.flake}
'';
} }