add: system modules and options
This commit is contained in:
parent
9bfc70318d
commit
47eb3e0691
21 changed files with 269 additions and 158 deletions
|
|
@ -1,15 +1,22 @@
|
|||
{ config, lib, pkgs, inputs, ... }: {
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
trusted-users = [ "root" "@wheel" ];
|
||||
auto-optimise-store = lib.mkDefault true;
|
||||
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
|
||||
warn-dirty = false;
|
||||
system-features = [ "kvm" "big-parallel" "nixos-test" ];
|
||||
flake-registry = "";
|
||||
};
|
||||
registry = lib.mapAttrs (_: value: { flake = value; }) inputs;
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs.outPath}" ];
|
||||
};
|
||||
let
|
||||
cfg = config.systemModules.nixOptions;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
nix = {
|
||||
settings = {
|
||||
trusted-users = [ "root" "@wheel" ];
|
||||
auto-optimise-store = lib.mkDefault true;
|
||||
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
|
||||
warn-dirty = false;
|
||||
system-features = [ "kvm" "big-parallel" "nixos-test" ];
|
||||
flake-registry = "";
|
||||
};
|
||||
registry = lib.mapAttrs (_: value: { flake = value; }) inputs;
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs.outPath}" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue