Configure flake auto-upgrade

This commit is contained in:
2022-06-07 00:11:57 +02:00
parent f5966c6271
commit 747b7ce7ca
4 changed files with 44 additions and 6 deletions

View File

@@ -103,12 +103,6 @@ with pkgs;
interval = "monthly";
};
# Auto-upgrade the system and reboot if needed
system.autoUpgrade = {
enable = true;
allowReboot = true;
};
# Run Nix garbage collector, while avoiding recompilation and enable flakes
nix = {
settings.auto-optimise-store = true;
@@ -166,9 +160,34 @@ with pkgs;
owner = "miniflux";
group = "miniflux";
};
secrets.git.file = secrets/git.age;
identityPaths = [ "/etc/ssh/id_ed25519" ];
};
# Auto-upgrade the system
system.autoUpgrade = {
enable = true;
flake = "/home/coolneng/system";
flags = [
"--update-input"
"agenix"
"--update-input"
"nixpkgs"
"--commit-lock-file"
];
};
# Configure git for auto-upgrade
programs.git = {
enable = true;
config = {
user.name = "coolneng";
user.email = "akasroua@gmail.com";
safe.directory = "/home/coolneng/system";
credential.helper = "store --file ${config.age.secrets.git.path}";
};
};
# Import other configuration modules
imports = [
./modules/hardware-configuration.nix