mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
god forgive me for my nix
This commit is contained in:
parent
dc199d8a04
commit
5906562854
2 changed files with 11 additions and 8 deletions
|
|
@ -32,6 +32,9 @@ rec {
|
|||
path:
|
||||
builtins.filter (lib.hasSuffix ".nix") (map toString (lib.filesystem.listFilesRecursive path));
|
||||
|
||||
listNixFilesRecursiveDiscardStringContext =
|
||||
x: (map builtins.unsafeDiscardStringContext) (listNixFilesRecursive x);
|
||||
|
||||
fixModuleSystem =
|
||||
file:
|
||||
lib.pipe file [
|
||||
|
|
@ -45,12 +48,13 @@ rec {
|
|||
lib.listToAttrs (
|
||||
map (name: {
|
||||
name = lib.pipe name [
|
||||
|
||||
toString
|
||||
(lib.removeSuffix ".nix")
|
||||
(lib.removePrefix "${toString path}/")
|
||||
];
|
||||
value = fixModuleSystem name;
|
||||
}) (listNixFilesRecursive path)
|
||||
}) (listNixFilesRecursiveDiscardStringContext path)
|
||||
);
|
||||
|
||||
gerg-utils =
|
||||
|
|
@ -83,10 +87,9 @@ rec {
|
|||
in
|
||||
builtins.concatLists [
|
||||
(importWithInputs' (builtins.attrValues self.nixosModules))
|
||||
(
|
||||
# (map fixModuleSystem
|
||||
importWithInputs' (listNixFilesRecursive "${self}/hosts/${name}")
|
||||
) # )
|
||||
(importWithInputs' (
|
||||
map fixModuleSystem (listNixFilesRecursiveDiscardStringContext "${self}/hosts/${name}")
|
||||
))
|
||||
(import "${unstable}/nixos/modules/module-list.nix")
|
||||
(lib.singleton {
|
||||
networking.hostName = name;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue