nix: register flakes as local registrys

This commit is contained in:
Felix Buehler 2022-12-05 20:18:17 +01:00
parent 1ca1981457
commit 599d55fa6a

View file

@ -1,6 +1,7 @@
{ config, lib, pkgs, ... }:
{ config, lib, pkgs, inputs, ... }:
{
nix.settings = {
nix = {
settings = {
trusted-users = [
"root"
"@wheel"
@ -8,15 +9,21 @@
auto-optimise-store = true;
};
nix.gc = {
gc = {
automatic = true;
options = "--delete-older-than 30d";
};
nix.extraOptions = ''
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"