Attempted to fix initrd-network

This commit is contained in:
niten 2021-10-18 09:07:49 -07:00
parent b1b5e69a1c
commit 0a460f3374
4 changed files with 5 additions and 2 deletions

View File

@ -23,6 +23,7 @@
};
initrd-network = {
ip = "10.0.5.1";
interface = "enp2s0";
keypair = {
public-key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDIcnHmIo08UgpNwBLe0RKYipxtznWlxLlKNgzBP/lot";
private-key-file = "/state/ssh/initrd/ssh_ed25519_key";

View File

@ -23,6 +23,7 @@
};
initrd-network = {
ip = "10.0.5.10";
interface = "enp1s0";
keypair = {
public-key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMLsxECiR4kqvUutMFkOTkIC8nsKK++aQ7HYiWjLdKdb";
private-key-file = "/state/ssh/initrd/ssh_ed25519_key";

View File

@ -24,6 +24,7 @@
};
initrd-network = {
ip = "10.0.5.108";
interface = "enp3s0";
keypair = {
public-key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIABpau0W1FAOnwHysFm/9uQ0XqMrB2GoCIfin5uLBEs8";
private-key-file = "/state/ssh/initrd/ssh_ed25519_key";

View File

@ -32,10 +32,10 @@ in {
config = {
boot = mkIf (initrd-cfg != null) {
kernelParams = let
site = config.instance.local-site;
site = config.fudo.sites.${config.instance.local-site};
site-gateway = site.gateway-v4;
netmask =
nixpkgs.lib.fudo.ip.maskFromV32Network site.network;
pkgs.lib.fudo.ip.maskFromV32Network site.network;
in [
"ip=${initrd-cfg.ip}:${site-gateway}:${netmask}:${hostname}:${initrd-cfg.interface}"
];