This commit is contained in:
xunuwu 2024-02-07 19:05:44 +01:00
commit 498f3050d5
Signed by: xun
SSH key fingerprint: SHA256:Uot/1WoAjWAeqLOHA5vYy4phhVydsH7jCPmBjaPZfgI
145 changed files with 2964 additions and 0 deletions

35
system/nix/default.nix Normal file
View file

@ -0,0 +1,35 @@
{
config,
pkgs,
inputs,
lib,
...
}: {
imports = [
./nixpkgs.nix
./substituters.nix
];
# git is needed for flakes
environment.systemPackages = [pkgs.git];
nix = {
# pin the registry to avoid downloading and evaling a new nixpkgs version every time
registry = lib.mapAttrs (_: v: {flake = v;}) inputs;
# set the path for channels compat
nixPath = lib.mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry;
settings = {
auto-optimise-store = true;
builders-use-substitutes = true;
experimental-features = ["flakes" "nix-command"];
# for direnv GC roots
keep-outputs = true;
keep-derivations = true;
trusted-users = ["root" "@wheel"];
};
};
}