mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
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:
parent
ee2beea680
commit
f43d0b741c
42 changed files with 224 additions and 240 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue