Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # configuration.nix
- { lib, pkgs, config, ... }:
- with lib;
- {
- imports = [
- <nixpkgs/nixos/modules/installer/netboot/netboot-minimal.nix>
- ./autoreboot.nix
- ./kexec.nix
- ./justdoit.nix
- ];
- 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";
- users.users.root.openssh.authorizedKeys.keys = [ (builtins.getEnv "ssh_key") ];
- }
- # script.sh
- ssh_key=$(cat ~/.ssh/id_rsa.pub)
- nix-build '<nixpkgs/nixos>' -Q -j 4 \
- -A config.system.build.kexec_tarball \
- -I nixos-config="configuration.nix"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement