diff --git a/flake.nix b/flake.nix index e4623b3..d852125 100644 --- a/flake.nix +++ b/flake.nix @@ -13,7 +13,7 @@ }; }; - outputs = { nixpkgs, home-manager, lanzaboote, ... }: { + outputs = inputs@{ self, nixpkgs, home-manager, lanzaboote, ... }: { formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt; nixosConfigurations = { cafe-nosecureboot = nixpkgs.lib.nixosSystem { @@ -36,6 +36,7 @@ rahu = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; + specialArgs = {inherit inputs;}; modules = [ ./hosts/rahu/configuration.nix ]; diff --git a/hosts/rahu/configuration.nix b/hosts/rahu/configuration.nix index c98ad0d..f01c9eb 100644 --- a/hosts/rahu/configuration.nix +++ b/hosts/rahu/configuration.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ inputs, config, pkgs, ... }: { imports = @@ -68,13 +68,24 @@ "d /media/seed 1777 transmission transmission" ]; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.gc = { automatic = true; dates = "weekly"; options = "--delete-older-than 14d"; }; - system.autoUpgrade.enable = true; + # system.autoUpgrade.enable = true; + system.autoUpgrade = { + enable = true; + flake = inputs.self.outPath; + flags = [ + "--update-input" + "nixpkgs" + "--no-write-lock-file" + "-L" + ]; + }; # Define a user account. Don't forget to set a password with ‘passwd’. users.users.user = {