abstractions ftw

This commit is contained in:
Daylin Morgan 2024-08-10 16:18:37 -05:00
parent e0a862ce4d
commit aaede70323
Signed by: daylin
GPG key ID: 950D13E9719334AD

View file

@ -21,9 +21,10 @@ let
hostPath = host: ../. + "/hosts/${host}"; hostPath = host: ../. + "/hosts/${host}";
# all nix files not including pkgs.nix # all nix files not including pkgs.nix
# hostFiles = host: filter isNixFile (listFilesRecursive (hostPath host)); # hostFiles = host: filter isNixFile (listFilesRecursive (hostPath host));
hostFiles = host: host |> hostPath |> listFilesRecursive |> filter isNixFile; hostFiles = host: host |> hostPath |> listFilesRecursive |> filter isNixFile;
commonSpecialArgs = {inherit self inputs lib enabled;};
mkIso = nixosSystem { mkIso = nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
@ -32,14 +33,7 @@ let
self.nixosModules.essentials self.nixosModules.essentials
self.nixosModules.iso self.nixosModules.iso
]; ];
specialArgs = { specialArgs = commonSpecialArgs;
inherit
inputs
lib
self
enabled
;
};
}; };
mkSystem = mkSystem =
@ -53,14 +47,10 @@ let
inputs.hyprland.nixosModules.default inputs.hyprland.nixosModules.default
] ++ (hostFiles hostName); ] ++ (hostFiles hostName);
specialArgs = { specialArgs = commonSpecialArgs // {
inherit inherit
inputs
lib
self
mkDefaultOizysModule mkDefaultOizysModule
mkOizysModule mkOizysModule
enabled
enableAttrs enableAttrs
hostName hostName
flake flake