diff --git a/nixops/ekman/cluster.nix b/nixops/ekman/cluster.nix index fdc1abf..d9e6aba 100644 --- a/nixops/ekman/cluster.nix +++ b/nixops/ekman/cluster.nix @@ -116,7 +116,7 @@ let controlMachine = "ekman"; nodeName = [ "c0-[1-2] Sockets=2 CoresPerSocket=64 ThreadsPerCore=1 RealMemory=256000 TmpDisk=500000 State=UNKNOWN" - "ekman Sockets=2 CoresPerSocket=64 ThreadsPerCore=1 RealMemory=256000 TmpDisk=500000 State=UNKNOWN" + "ekman Sockets=2 CoresPerSocket=64 ThreadsPerCore=2 RealMemory=256000 TmpDisk=500000 State=UNKNOWN" ]; partitionName = [ "batch Nodes=c0-[1-2] Default=YES MaxTime=INFINITE State=UP" @@ -178,16 +178,16 @@ let }; fileSystems = { - "/opt" = { - device = "10.255.241.81:/opt"; - fsType = "nfs"; - options = [ "soft" "rdma" "defaults" "vers=4.2" ]; - }; - "/data" = { - device = "255.241.81:/data"; - fsType = "nfs"; - options = [ "soft" "rdma" "defaults" "vers=4.2" ]; - }; + # "/opt" = { + # device = "10.255.241.81:/opt"; + # fsType = "nfs"; + # options = [ "soft" "rdma" "defaults" "vers=4.2" ]; + # }; + # "/data" = { + # device = "255.241.81:/data"; + # fsType = "nfs"; + # options = [ "soft" "rdma" "defaults" "vers=4.2" ]; + # }; }; environment.variables = {}; @@ -205,7 +205,7 @@ let maxJobs = 32; trustedUsers = [ "@wheel" ]; binaryCachePublicKeys = [ - "ekman:pka41J3q4j9ZC3dr4y+sDN9uMW0pAxoWeCkrzUlqcZs=" + "ekman.local:2NsTThGkZVJtOs3NVQYjEZ4NLscXlbjqA8Fi7HnAreA=" ]; }; }; @@ -216,10 +216,9 @@ let uid = 0; gid = 0; text = '' - 10.255.241.100 - 10.255.241.101 - 10.255.241.102 - ''; + 10.255.241.80 + 10.255.241.81 + '' + builtins.foldl' (a: x: a + "10.255.240.${toString x}\n") "" (builtins.genList (n: n + 100) 17); }; programs.ssh.knownHosts = { @@ -229,20 +228,32 @@ let ]; publicKeyFile = ./pubkeys/ekman.pub; }; - c0-1 = { hostNames = [ "c0-1" "c0-1.cluster.local" "10.255.241.101" "10.255.243.11" ]; publicKeyFile = ./pubkeys/c0-1.pub; }; - c0-2 = { hostNames = [ "c0-2" "c0-2.cluster.local" "10.255.241.102" "10.255.243.11" ]; publicKeyFile = ./pubkeys/c0-1.pub; }; - }; + } // builtins.foldl' (a: x: + let + n = toString x; + n' = toString (x + 100); + in a // { + "c0-${n}" = { + hostNames = [ + "c0-${n}" + "c0-${n}.cluster.local" + "10.255.241.${n'}" + "10.255.243.${n'}" + ]; + publicKeyFile = ./pubkeys/c0-1.pub; + }; + }) {} (builtins.genList (n: n) 16); - environment.systemPackages = [ openssh-shosts ]; + environment.systemPackages = [ openssh-shosts ]; - security.wrappers = { + security.wrappers = { ssh-keysign = { - source = "${openssh-shosts}/libexec/ssh-keysign"; - owner = "root"; - group = "root"; - permissions = "u+rs,g+rx,o+rx"; + source = "${openssh-shosts}/libexec/ssh-keysign"; + owner = "root"; + group = "root"; + permissions = "u+rs,g+rx,o+rx"; }; - }; + }; }; openssh-shosts = pkgs.openssh.overrideAttrs (attrs: {