1

feat: add flake autoupgrade support for rahu

This commit is contained in:
Himadri Bhattacharjee
2024-04-05 12:17:33 +05:30
parent 68233a2966
commit 3b04de3a1d
2 changed files with 15 additions and 3 deletions

View File

@@ -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
];

View File

@@ -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 = {