Browse Source

fix netinstall

main
Dustin Frisch 1 year ago
parent
commit
2bda20726e
No known key found for this signature in database GPG Key ID: B4C3BF012D9B26BE
  1. 4
      machines/node/default.nix
  2. 4
      modules/netinstall.nix
  3. 2
      modules/node.nix

4
machines/node/default.nix

@ -15,6 +15,8 @@ with lib;
deployment = { deployment = {
targetHost = "10.32.47.${toString (100 + id)}"; targetHost = "10.32.47.${toString (100 + id)}";
targetUser = "root"; targetUser = "root";
tags = [ "node" ];
}; };
hpc.node = { hpc.node = {
@ -22,6 +24,8 @@ with lib;
inherit id; inherit id;
}; };
hpc.netinstall.enable = true;
networking.hostName = config.hpc.node.name; networking.hostName = config.hpc.node.name;
networking.timeServers = [ networking.timeServers = [

4
modules/netinstall.nix

@ -8,11 +8,9 @@ with lib;
}; };
config = mkIf config.hpc.netinstall.enable { config = mkIf config.hpc.netinstall.enable {
deployment.tags = [ "netinstall" ];
assertions = [ assertions = [
{ {
assertion = elem "data" config.hpc.dhcp.reservations;
assertion = hasAttr "data" config.hpc.dhcp.reservations;
message = "NetInstall needs DHCP reservation in data network"; message = "NetInstall needs DHCP reservation in data network";
} }
]; ];

2
modules/node.nix

@ -24,7 +24,5 @@ with lib;
config = mkIf config.hpc.node.enable { config = mkIf config.hpc.node.enable {
hpc.node.name = "node-${fixedWidthNumber 2 config.hpc.node.id}"; hpc.node.name = "node-${fixedWidthNumber 2 config.hpc.node.id}";
deployment.tags = [ "node" ];
}; };
} }
Loading…
Cancel
Save