about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-04-09 12:34:30 -0700
committerFranck Cuny <franck@fcuny.net>2022-04-09 12:34:30 -0700
commit0214b0a743ae7fe3e06f1967c8d667118dffe3a2 (patch)
tree7adbed511484475363ca24db4e0f2351401a9071
parentdelete configuration related to colors (diff)
downloadworld-0214b0a743ae7fe3e06f1967c8d667118dffe3a2.tar.gz
tahoe: enable network with early boot
So we can unlock the disks remotely.
Diffstat (limited to '')
-rw-r--r--hosts/tahoe/boot.nix17
-rw-r--r--hosts/tahoe/default.nix13
2 files changed, 19 insertions, 11 deletions
diff --git a/hosts/tahoe/boot.nix b/hosts/tahoe/boot.nix
new file mode 100644
index 0000000..f013f34
--- /dev/null
+++ b/hosts/tahoe/boot.nix
@@ -0,0 +1,17 @@
+{ ... }:
+
+{
+  boot = {
+    # get an IP address on boot, so we can unlock the root disk remotely
+    kernelParams = [ "ip=dhcp" ];
+    initrd = {
+      # driver for the NIC, required in order to get an IP address
+      kernelModules = [ "r8169" ];
+    };
+  };
+
+  my.system.boot = {
+    tmp = { clean = true; };
+    initrd = { network.enable = true; };
+  };
+}
diff --git a/hosts/tahoe/default.nix b/hosts/tahoe/default.nix
index 8a3b4a6..1998a51 100644
--- a/hosts/tahoe/default.nix
+++ b/hosts/tahoe/default.nix
@@ -1,17 +1,8 @@
 { config, pkgs, hostname, ... }:
 
 {
-  imports = [ # Include the results of the hardware scan.
-    ./hardware.nix
-    ./networking.nix
-    ./home.nix
-    ./services.nix
-  ];
-
-  my.system.boot = {
-    tmp = { clean = true; };
-    initrd = { network.enable = true; };
-  };
+  imports =
+    [ ./boot.nix ./hardware.nix ./networking.nix ./home.nix ./services.nix ];
 
   users.groups.nas.gid = 5000;
   users.users.nas = {