mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-05 06:03:15 -06:00
82 lines
1.6 KiB
Nix
82 lines
1.6 KiB
Nix
{
|
|
inputs,
|
|
self,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
inherit (builtins) filter;
|
|
inherit (lib)
|
|
nixosSystem
|
|
mkDefaultOizysModule
|
|
mkOizysModule
|
|
enabled
|
|
enableAttrs
|
|
pkgsFromSystem
|
|
pkgFromSystem
|
|
overlayFrom
|
|
isNixFile
|
|
;
|
|
inherit (lib.filesystem) listFilesRecursive;
|
|
|
|
pkgFrom = pkgFromSystem "x86_64-linux";
|
|
pkgsFrom = pkgsFromSystem "x86_64-linux";
|
|
|
|
hostPath = host: ../. + "/hosts/${host}";
|
|
# all nix files not including pkgs.nix
|
|
hostFiles = host: filter isNixFile (listFilesRecursive (hostPath host));
|
|
|
|
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 ]) ++ [ (pkgFrom "self") ];
|
|
}
|
|
)
|
|
];
|
|
specialArgs = {
|
|
inherit
|
|
inputs
|
|
lib
|
|
self
|
|
enabled
|
|
;
|
|
};
|
|
};
|
|
|
|
mkSystem =
|
|
hostName:
|
|
nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
../modules/oizys.nix
|
|
../overlays
|
|
inputs.lix-module.nixosModules.default
|
|
inputs.hyprland.nixosModules.default
|
|
] ++ (hostFiles hostName);
|
|
|
|
specialArgs = {
|
|
inherit
|
|
inputs
|
|
lib
|
|
self
|
|
mkDefaultOizysModule
|
|
mkOizysModule
|
|
enabled
|
|
enableAttrs
|
|
hostName
|
|
pkgFrom
|
|
pkgsFrom
|
|
overlayFrom
|
|
;
|
|
};
|
|
};
|
|
in
|
|
{
|
|
inherit mkIso mkSystem;
|
|
}
|