From d34e27cac803ddb4a59ed992fdb17797193e0c0d Mon Sep 17 00:00:00 2001 From: Astrid Yu Date: Wed, 27 Mar 2024 18:33:31 -0700 Subject: [PATCH] boop: more initrd configs :3 --- machines/boop/boot.nix | 14 ++++++++++++-- machines/boop/configuration.nix | 3 --- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/machines/boop/boot.nix b/machines/boop/boot.nix index ce841194..c5c1d762 100644 --- a/machines/boop/boot.nix +++ b/machines/boop/boot.nix @@ -25,7 +25,7 @@ in { "usbhid" "usb_storage" "sd_mod" - "tg3" # tg3 needed for initrd networking on this machine + "tg3" # needed for initrd networking on this machine ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; @@ -34,12 +34,22 @@ in { # because we want to be able to decrypt host keys over SSH boot.initrd.network = { enable = true; - udhcpc.enable = true; + udhcpc = { + enable = true; + extraArgs = [ + "-i" + constants.mgmt_if + "-x" + "hostname:boop" + "-b" # background if lease not obtained + ]; + }; postCommands = '' ip addr ''; ssh = { enable = true; + port = 2222; # because we are using a different host key hostKeys = [ (pkgs.writeText "ssh_host_rsa_key" (builtins.readFile ./initrd/ssh_host_rsa_key)) diff --git a/machines/boop/configuration.nix b/machines/boop/configuration.nix index f75ba20f..6e0f1da3 100644 --- a/machines/boop/configuration.nix +++ b/machines/boop/configuration.nix @@ -45,9 +45,6 @@ with lib; { recommendedOptimisation = true; recommendedGzipSettings = true; }; - - # tmp for debug - services.getty.autologinUser = "root"; virtualisation.vmVariant = { # Autologin as root because we testin here