diff --git a/lib/fs.nix b/lib/fs.nix index 8021d94..7e44d04 100644 --- a/lib/fs.nix +++ b/lib/fs.nix @@ -5,7 +5,7 @@ path: let dirs = builtins.readDir path; in - builtins.filter (name: dirs.${name} == "directory") (builtins.attrNames dirs); + builtins.filter (type: dirs.${type} == "directory") (builtins.attrNames dirs); getModuleImports = path: let diff --git a/modules/nixos/core/nix.nix b/modules/nixos/core/nix.nix index 6b0d75f..c8c3342 100644 --- a/modules/nixos/core/nix.nix +++ b/modules/nixos/core/nix.nix @@ -1,6 +1,12 @@ -{ lib, ... }: +{ lib, inputs, ... }: -{ +let + importOverlays = builtins.map + (overlay: overlay { inherit lib inputs; }) + (builtins.filter + (file: builtins.match file "*.nix") + (lib.filesystem.listFilesRecursive ../../../overlays)); +in { nix = { settings = { auto-optimise-store = true; @@ -18,5 +24,6 @@ allowUnfree = true; }; hostPlatform = lib.mkDefault "x86_64-linux"; + overlays = importOverlays; }; } diff --git a/overlays/nixpkgs-unstable.nix b/overlays/nixpkgs-unstable.nix new file mode 100644 index 0000000..1a0c1d6 --- /dev/null +++ b/overlays/nixpkgs-unstable.nix @@ -0,0 +1,4 @@ +{ inputs }: +(final: prev: { + unstable = inputs.nixpkgs-unstable.legacyPackages.${prev.system}; +})