2023-07-12 13:52:15 +02:00
|
|
|
{ pkgs, config, ... }: {
|
|
|
|
# Enable flakes: https://nixos.wiki/wiki/Flakes
|
|
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
|
|
|
|
# Keep the system up-to-date automatically
|
|
|
|
system = {
|
|
|
|
autoUpgrade = {
|
|
|
|
enable = true;
|
|
|
|
allowReboot = false;
|
2023-08-05 15:07:38 +02:00
|
|
|
# channel = https://channels.nixos.org/nixos-23.05;
|
|
|
|
# https://search.nixos.org/options?channel=unstable&show=system.autoUpgrade.flake&from=0&size=50&sort=relevance&type=packages&query=Autoupgrade
|
2023-08-14 13:02:33 +02:00
|
|
|
flake = "path:/etc/nixos/flake.nix"; # Should be /etc/nixos/flake.nix
|
2023-07-12 13:52:15 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Garbage collection -- Keep the system clean
|
|
|
|
nix.gc = {
|
|
|
|
automatic = true;
|
|
|
|
dates = "daily";
|
|
|
|
options = "--delete-older-than 7d";
|
|
|
|
};
|
|
|
|
}
|