Working config for fw13 amd

This commit is contained in:
Jurn Wubben 2025-02-14 19:40:27 +00:00
commit e706230566
48 changed files with 1812 additions and 0 deletions

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

@ -0,0 +1,44 @@
{
config,
pkgs,
inputs,
lib,
...
}: {
imports = [
./nh.nix
./nixpkgs.nix
./substituters.nix
];
# we need git for flakes
environment.systemPackages = [pkgs.git];
nix = let
flakeInputs = lib.filterAttrs (_: v: lib.isType "flake" v) inputs;
in {
package = pkgs.lix;
# pin the registry to avoid downloading and evaling a new nixpkgs version every time
registry = lib.mapAttrs (_: v: {flake = v;}) flakeInputs;
# 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 = ["nix-command" "flakes"];
flake-registry = "/etc/nix/registry.json";
# for direnv GC roots
keep-derivations = true;
keep-outputs = true;
trusted-users = ["root" "@wheel"];
accept-flake-config = false;
};
};
system.stateVersion = "25.05";
}