nixos-config/modules/pixiecore/default.nix

27 lines
650 B
Nix
Raw Normal View History

2024-01-02 22:40:43 +01:00
{ config, lib, inputs, ... }:
with lib;
let
cfg = config.eboskma.pixiecore;
installerSystem = import ./installer.nix { inherit (inputs.nixpkgs.lib) nixosSystem; };
build = installerSystem.config.system.build;
in
{
options.eboskma.pixiecore = { enable = mkEnableOption "pixiecore with NixOS Installer"; };
config = mkIf cfg.enable {
services.pixiecore = {
enable = true;
openFirewall = true;
dhcpNoBind = true;
mode = "boot";
kernel = "${build.kernel}/bzImage";
initrd = "${build.netbootRamdisk}/initrd";
cmdLine = "init=${build.toplevel}/init loglevel=4";
debug = true;
};
};
}