autoupgrade on servers

This commit is contained in:
Casper V. Kristensen 2023-08-26 15:15:30 +02:00
parent 2e8ae0e72e
commit debf203b32
4 changed files with 19 additions and 6 deletions

View file

@ -4,6 +4,7 @@
./tor.nix
../../overlays
../../modules/base
../../modules/server
../../modules/tor
];

View file

@ -17,12 +17,6 @@
};
nixpkgs.config.allowUnfree = true;
system.autoUpgrade = {
enable = true;
flake = "${config.users.users.caspervk.home}/nixos";
flags = [ "--update-input" "nixpkgs" ];
};
environment.systemPackages = with pkgs; [
bat
clang

View file

@ -0,0 +1,5 @@
{ ... }: {
imports = [
./system.nix
];
}

13
modules/server/system.nix Normal file
View file

@ -0,0 +1,13 @@
{ ... }: {
# Automatically `nixos-rebuild switch` daily with the latest configuration
# from git. This overwrites any uncommitted changes in ~/nixos/, which is why
# it is only enabled on servers. Note that this requires updating flake.lock
# in the repository periodically (see .gitlab-ci.yml). Alternatively, at the
# cost of reproducability, add
# flags = [ "--recreate-lock-file" "--no-write-lock-file" ]
# to ignore the repository flake.lock and use the latest input versions.
system.autoUpgrade = {
enable = true;
flake = "git+https://git.caspervk.net/caspervk/nixos.git";
};
}