33 lines
1.2 KiB
Nix
33 lines
1.2 KiB
Nix
|
# new cmd: nix-build '<nixpkgs/nixos>' -A config.system.build.kexec_tarball -I nixos-config=./configuration.nix -Q -j 4
|
||
|
|
||
|
{
|
||
|
lib,
|
||
|
nixpkgs,
|
||
|
...
|
||
|
}:
|
||
|
|
||
|
with lib;
|
||
|
|
||
|
{
|
||
|
imports = [
|
||
|
"${nixpkgs}/nixos/modules/installer/netboot/netboot-minimal.nix"
|
||
|
./autoreboot.nix
|
||
|
./kexec.nix
|
||
|
];
|
||
|
|
||
|
boot.supportedFilesystems = lib.mkForce [
|
||
|
"btrfs"
|
||
|
"vfat"
|
||
|
];
|
||
|
boot.loader.grub.enable = false;
|
||
|
boot.kernelParams = [
|
||
|
"console=ttyS0,115200" # allows certain forms of remote access, if the hardware is setup right
|
||
|
"panic=30"
|
||
|
"boot.panic_on_fail" # reboot the machine upon fatal boot issues
|
||
|
];
|
||
|
systemd.services.sshd.wantedBy = mkForce [ "multi-user.target" ];
|
||
|
networking.hostName = "kexec";
|
||
|
# example way to embed an ssh pubkey into the tar
|
||
|
# users.users.root.openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC34wZQFEOGkA5b0Z6maE3aKy/ix1MiK1D0Qmg4E9skAA57yKtWYzjA23r5OCF4Nhlj1CuYd6P1sEI/fMnxf+KkqqgW3ZoZ0+pQu4Bd8Ymi3OkkQX9kiq2coD3AFI6JytC6uBi6FaZQT5fG59DbXhxO5YpZlym8ps1obyCBX0hyKntD18RgHNaNM+jkQOhQ5OoxKsBEobxQOEdjIowl2QeEHb99n45sFr53NFqk3UCz0Y7ZMf1hSFQPuuEC/wExzBBJ1Wl7E1LlNA4p9O3qJUSadGZS4e5nSLqMnbQWv2icQS/7J8IwY0M8r1MsL8mdnlXHUofPlG1r4mtovQ2myzOx clever@nixos" ];
|
||
|
}
|