2021-07-26 01:29:05 +02:00
|
|
|
{ pkgs, config, ... }:
|
|
|
|
let
|
|
|
|
bootSystem = import <nixpkgs/nixos> {
|
|
|
|
configuration = { config, pkgs, lib, ... }: with lib; {
|
|
|
|
imports = [
|
|
|
|
<nixpkgs/nixos/modules/installer/netboot/netboot-minimal.nix>
|
|
|
|
];
|
|
|
|
# Early init the serial console
|
|
|
|
boot.kernelParams = [ "console=tty1" "console=ttyS0,115200" ];
|
|
|
|
|
|
|
|
## Some useful options for setting up a new system
|
|
|
|
services.getty.autologinUser = mkForce "root";
|
|
|
|
# Enable sshd wich gets disabled by netboot-minimal.nix
|
|
|
|
systemd.services.sshd.wantedBy = mkOverride 0 [ "multi-user.target" ];
|
|
|
|
users.users.root.openssh.authorizedKeys.keyFiles = [
|
2022-08-16 01:59:59 +02:00
|
|
|
../pubkeys/gdd.keys
|
|
|
|
../pubkeys/raito.keys
|
2021-07-26 01:29:05 +02:00
|
|
|
];
|
|
|
|
programs.mosh.enable = true;
|
|
|
|
|
|
|
|
console.keyMap = "us";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
netboot = pkgs.symlinkJoin {
|
|
|
|
name = "netboot";
|
|
|
|
paths = with bootSystem.config.system.build; [
|
|
|
|
netbootRamdisk
|
|
|
|
kernel
|
|
|
|
netbootIpxeScript
|
|
|
|
];
|
|
|
|
preferLocalBuild = true;
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
services.pixiecore = {
|
|
|
|
enable = true;
|
|
|
|
kernel = "${netboot}/bzImage";
|
|
|
|
initrd = "${netboot}/initrd";
|
|
|
|
cmdLine = "init=${bootSystem.config.system.build.toplevel}/init loglevel=4";
|
|
|
|
debug = true;
|
|
|
|
dhcpNoBind = true;
|
|
|
|
port = 64172;
|
|
|
|
statusPort = 64172;
|
|
|
|
};
|
|
|
|
}
|