Skip to content

Instantly share code, notes, and snippets.

@betaboon
Created May 11, 2020 17:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save betaboon/ed14a80f700faee456cce61a5a28be38 to your computer and use it in GitHub Desktop.
Save betaboon/ed14a80f700faee456cce61a5a28be38 to your computer and use it in GitHub Desktop.
{ pkgs, lib, config, ... }:
{
services.pixiecore = let
nixos = import <nixpkgs/nixos> {
configuration = { config, pkgs, lib, ... }: with lib; {
imports = [
# <nixpkgs/nixos/modules/installer/netboot/netboot-minimal.nix>
<nixpkgs/nixos/modules/profiles/minimal.nix>
<nixpkgs/nixos/modules/profiles/all-hardware.nix>
<nixpkgs/nixos/modules/installer/netboot/netboot.nix>
];
# boot.kernelParams = [ "console=ttyS0" "panic=1" "boot.panic_on_fail" ];
boot.kernelParams = [ "rootdelay=300" ];
# Some useful options for setting up a new system
services.mingetty.autologinUser = mkForce "root";
# Enable sshd which gets disabled by netboot-minimal.nix
systemd.services.sshd.wantedBy = mkOverride 0 [ "multi-user.target" ];
# users.users.root.openssh.authorizedKeys.keys = [ ... ];
# i18n.consoleKeyMap = "de";
};
};
build = nixos.config.system.build;
in {
enable = true;
debug = true;
openFirewall = true;
dhcpNoBind = true;
kernel = "${build.kernel}/bzImage";
initrd = "${toString build.netbootRamdisk}/initrd";
cmdLine = "init=${build.netbootIpxeScript} ${lib.concatStringsSep " " nixos.config.boot.kernelParams} debug";
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment