systems -> hosts

moved functions to /lib

inputs over imports

turned each module file into a nixosModule

moved registry and $NIX_PATH pinning to /modules/pinning.nix
This commit is contained in:
Gerg-L 2023-06-22 22:55:43 -04:00
parent ee2beea680
commit f43d0b741c
42 changed files with 224 additions and 240 deletions

View file

@ -1,34 +1,4 @@
{
pkgs,
inputs,
lib,
self,
...
}: let
combined_flakes =
(
#filter non-flakes from inputs
lib.filterAttrs (
_: value: (
!(lib.hasAttrByPath ["flake"] value) || !value.flake
)
)
inputs
)
// {
#alias unstable
nixpkgs = inputs.unstable;
#add system flake
system = self;
};
in {
#create registry from input flakes
nix.registry = lib.mapAttrs (_: value: {flake = value;}) combined_flakes;
#add all inputs to etc
environment.etc = lib.mapAttrs' (name: value: lib.nameValuePair "/nixpath/${name}" {source = value;}) combined_flakes;
#source the etc paths to nixPath
nix.nixPath = lib.mapAttrsToList (name: _: name + "=/etc/nixpath/${name}") combined_flakes;
inputs: {pkgs, ...}: {
#other nix settings
nix = {
package = inputs.nix.packages.${pkgs.system}.default;