nixos/legacy/modules/nix.nix

42 lines
723 B
Nix
Raw Normal View History

{ config, lib, pkgs, inputs, ... }:
2020-11-16 21:14:46 +01:00
{
nix = {
settings = {
trusted-users = [
"root"
"@wheel"
];
auto-optimise-store = true;
};
2022-11-09 22:28:10 +01:00
gc = {
automatic = true;
options = "--delete-older-than 30d";
};
2022-11-09 22:28:10 +01:00
extraOptions = ''
experimental-features = nix-command flakes
'';
registry = {
nixpkgs.flake = inputs.nixpkgs;
unstable.flake = inputs.nixpkgs-unstable;
};
};
2022-11-09 22:28:10 +01:00
2022-07-23 19:08:32 +02:00
# support auto upgrade with flakes
system.autoUpgrade.flags = [
"--update-input"
"nixpkgs"
"--commit-lock-file"
];
2022-11-09 22:28:10 +01:00
2020-11-16 21:14:46 +01:00
environment.systemPackages = with pkgs; [
nix-prefetch
2021-10-30 11:39:31 +02:00
nix-update
2021-06-28 21:38:36 +02:00
nixpkgs-fmt
nixpkgs-lint
nixpkgs-review
2020-11-16 21:14:46 +01:00
];
}