1
Fork 0
nixos-system-config/modules/nixos/core/nix.nix

29 lines
699 B
Nix
Raw Normal View History

2025-01-23 15:49:17 +01:00
{ lib, inputs, cfgPath, ... }:
2025-01-10 23:38:56 +01:00
2025-01-23 14:46:22 +01:00
let
importOverlays = builtins.map
2025-01-23 15:04:02 +01:00
(overlay: import overlay { inherit lib inputs; })
2025-01-23 14:46:22 +01:00
(builtins.filter
2025-01-23 15:04:02 +01:00
(file: builtins.match ".*\.nix" (builtins.toString file) != null)
2025-01-23 15:52:18 +01:00
(lib.filesystem.listFilesRecursive "${cfgPath}/overlays"));
2025-01-23 14:46:22 +01:00
in {
2025-01-10 23:38:56 +01:00
nix = {
settings = {
auto-optimise-store = true;
use-xdg-base-directories = true;
trusted-users = [ "@wheel" ];
allowed-users = [ "@wheel" ];
};
2025-01-19 13:18:30 +01:00
extraOptions = ''
experimental-features = nix-command flakes
'';
2025-01-10 23:38:56 +01:00
};
nixpkgs = {
config = {
allowUnfree = true;
};
hostPlatform = lib.mkDefault "x86_64-linux";
2025-01-23 15:55:26 +01:00
overlays = importOverlays;
2025-01-10 23:38:56 +01:00
};
}