pixiecore: init
This commit is contained in:
parent
d99ac2d3f7
commit
4224240da0
2 changed files with 53 additions and 0 deletions
26
modules/pixiecore/default.nix
Normal file
26
modules/pixiecore/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
27
modules/pixiecore/installer.nix
Normal file
27
modules/pixiecore/installer.nix
Normal 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";
|
||||
};
|
||||
|
||||
})
|
||||
];
|
||||
}
|
Loading…
Reference in a new issue