core/nix: move

This commit is contained in:
Felix Buehler 2022-12-05 22:38:18 +01:00
parent 1759cf5cda
commit 082478e688
2 changed files with 1 additions and 0 deletions

View file

@ -2,5 +2,6 @@
./core.nix
./modules.nix
./network.nix
./nix.nix
./users.nix
]

41
machines/core/nix.nix Normal file
View file

@ -0,0 +1,41 @@
{ config, lib, pkgs, inputs, ... }:
{
nix = {
settings = {
trusted-users = [
"root"
"@wheel"
];
auto-optimise-store = true;
};
gc = {
automatic = true;
options = "--delete-older-than 30d";
};
extraOptions = ''
experimental-features = nix-command flakes
'';
registry = {
nixpkgs.flake = inputs.nixpkgs;
unstable.flake = inputs.nixpkgs-unstable;
};
};
# support auto upgrade with flakes
system.autoUpgrade.flags = [
"--update-input"
"nixpkgs"
"--commit-lock-file"
];
environment.systemPackages = with pkgs; [
nix-prefetch
nix-update
nixpkgs-fmt
nixpkgs-lint
nixpkgs-review
];
}