From fdc8002a0de5b2b67b6012c701707b32f468159d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Schr=C3=B6ter?= Date: Thu, 16 Jan 2025 14:09:55 +0100 Subject: [PATCH] fix: make autoUpgrade update flake inputs again --- system/nix.nix | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/system/nix.nix b/system/nix.nix index 1f752fa..88ec7f2 100644 --- a/system/nix.nix +++ b/system/nix.nix @@ -1,7 +1,6 @@ -{ inputs, lib, ... }: +{ inputs, config, ... }: let - flakes = lib.filterAttrs (name: value: value ? outputs) inputs; inherit (inputs.self.outputs) nixConfig; in { @@ -21,14 +20,10 @@ in system.autoUpgrade = { enable = true; dates = "03:00"; - flake = inputs.self.outPath; - flags = - with lib; - flatten ( - mapAttrsToList (n: _: [ - "--update-input" - n - ]) flakes - ); + flake = "/etc/nixos"; }; + + systemd.services.nixos-upgrade.preStart = '' + nix flake update --flake ${config.system.autoUpgrade.flake} + ''; }