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:
|
path:
|
||||||
builtins.filter (lib.hasSuffix ".nix") (map toString (lib.filesystem.listFilesRecursive path));
|
builtins.filter (lib.hasSuffix ".nix") (map toString (lib.filesystem.listFilesRecursive path));
|
||||||
|
|
||||||
|
listNixFilesRecursiveDiscardStringContext =
|
||||||
|
x: (map builtins.unsafeDiscardStringContext) (listNixFilesRecursive x);
|
||||||
|
|
||||||
fixModuleSystem =
|
fixModuleSystem =
|
||||||
file:
|
file:
|
||||||
lib.pipe file [
|
lib.pipe file [
|
||||||
|
|
@ -45,12 +48,13 @@ rec {
|
||||||
lib.listToAttrs (
|
lib.listToAttrs (
|
||||||
map (name: {
|
map (name: {
|
||||||
name = lib.pipe name [
|
name = lib.pipe name [
|
||||||
|
|
||||||
toString
|
toString
|
||||||
(lib.removeSuffix ".nix")
|
(lib.removeSuffix ".nix")
|
||||||
(lib.removePrefix "${toString path}/")
|
(lib.removePrefix "${toString path}/")
|
||||||
];
|
];
|
||||||
value = fixModuleSystem name;
|
value = fixModuleSystem name;
|
||||||
}) (listNixFilesRecursive path)
|
}) (listNixFilesRecursiveDiscardStringContext path)
|
||||||
);
|
);
|
||||||
|
|
||||||
gerg-utils =
|
gerg-utils =
|
||||||
|
|
@ -83,10 +87,9 @@ rec {
|
||||||
in
|
in
|
||||||
builtins.concatLists [
|
builtins.concatLists [
|
||||||
(importWithInputs' (builtins.attrValues self.nixosModules))
|
(importWithInputs' (builtins.attrValues self.nixosModules))
|
||||||
(
|
(importWithInputs' (
|
||||||
# (map fixModuleSystem
|
map fixModuleSystem (listNixFilesRecursiveDiscardStringContext "${self}/hosts/${name}")
|
||||||
importWithInputs' (listNixFilesRecursive "${self}/hosts/${name}")
|
))
|
||||||
) # )
|
|
||||||
(import "${unstable}/nixos/modules/module-list.nix")
|
(import "${unstable}/nixos/modules/module-list.nix")
|
||||||
(lib.singleton {
|
(lib.singleton {
|
||||||
networking.hostName = name;
|
networking.hostName = name;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
inputs:
|
inputs@{ self, ... }:
|
||||||
let
|
let
|
||||||
lib = import ./lib inputs;
|
lib = import ./lib inputs;
|
||||||
in
|
in
|
||||||
|
|
@ -11,7 +11,7 @@ lib.gerg-utils { } {
|
||||||
"iso"
|
"iso"
|
||||||
];
|
];
|
||||||
|
|
||||||
nixosModules = lib.mkModules ./modules;
|
nixosModules = lib.mkModules "${self}/modules";
|
||||||
|
|
||||||
diskoConfigurations = lib.mkDisko [
|
diskoConfigurations = lib.mkDisko [
|
||||||
"gerg-desktop"
|
"gerg-desktop"
|
||||||
|
|
@ -23,5 +23,5 @@ lib.gerg-utils { } {
|
||||||
|
|
||||||
devShells = pkgs: { default = pkgs.mkShell { packages = [ pkgs.sops ]; }; };
|
devShells = pkgs: { default = pkgs.mkShell { packages = [ pkgs.sops ]; }; };
|
||||||
|
|
||||||
packages = lib.mkPackages ./packages;
|
packages = lib.mkPackages "${self}/packages";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue