pixiecore: init

This commit is contained in:
Erwin Boskma 2024-01-02 22:40:43 +01:00
parent d99ac2d3f7
commit 4224240da0
Signed by: erwin
SSH key fingerprint: SHA256:/Wk1WZdLg+vQHs3in9qq7PsIp8SMzwGSk/RLZ5zPuZk
2 changed files with 53 additions and 0 deletions

View file

@ -0,0 +1,26 @@
{ 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;
};
};
}

View file

@ -0,0 +1,27 @@
{ nixosSystem }:
nixosSystem {
system = "x86_64-linux";
modules = [
({ config, modulesPath, ... }: {
imports = [
"${modulesPath}/installer/netboot/netboot-minimal.nix"
../../users/root
];
config = {
services.openssh = {
enable = true;
openFirewall = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
};
system.stateVersion = "24.05";
};
})
];
}