oizys/lib/generators.nix

68 lines
1.3 KiB
Nix
Raw Normal View History

2024-07-03 13:05:25 -05:00
{
inputs,
self,
lib,
...
}:
let
inherit (builtins) filter;
inherit (lib)
nixosSystem
isNixFile
mkDefaultOizysModule
mkOizysModule
enabled
enableAttrs
;
inherit (lib.filesystem) listFilesRecursive;
mkIso = nixosSystem {
system = "x86_64-linux";
modules = [
self.nixosModules.nix
self.nixosModules.essentials
(
{ pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") ];
environment.systemPackages = with pkgs; [ neovim ];
}
)
];
2024-07-07 14:32:46 -05:00
specialArgs = {
inherit
inputs
lib
self
enabled
;
};
2024-07-03 13:05:25 -05:00
};
mkSystem =
hostName:
nixosSystem {
system = "x86_64-linux";
modules = [
../modules/oizys.nix
../overlays
inputs.lix-module.nixosModules.default
inputs.hyprland.nixosModules.default
] ++ filter isNixFile (listFilesRecursive (../. + "/hosts/${hostName}"));
specialArgs = {
inherit
inputs
lib
self
mkDefaultOizysModule
mkOizysModule
enabled
enableAttrs
hostName
;
};
};
in
{
inherit mkIso mkSystem;
}