nixos/legacy/modules/nix.nix
2022-12-05 20:32:39 +01:00

41 lines
723 B
Nix

{ 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
];
}