Compare commits

...

5 Commits

Author SHA1 Message Date
chn
2904080ee8 modules.services.slurm: fix 2024-09-20 16:56:59 +08:00
chn
198882ee87 modules.services.slurm: fix default partitions 2024-09-20 16:22:14 +08:00
chn
5df233c831 devices.srv1.node3: fix 2024-09-20 16:11:33 +08:00
chn
3c02cb54c5 devices.srv1-node0: fix network 2024-09-20 14:47:49 +08:00
chn
9b00bbfb20 devices.srv1: fix 2024-09-20 14:24:48 +08:00
7 changed files with 12 additions and 8 deletions

View File

@ -136,7 +136,7 @@ inputs:
memoryMB = 90112;
gpus."4060" = 1;
};
partitions.default = [ "pc" ];
partitions.localhost = [ "pc" ];
};
ollama = {};
waydroid = {};

View File

@ -46,20 +46,20 @@ inputs:
};
srv1-node2 =
{
name = "n1"; address = "192.168.178.2";
name = "n2"; address = "192.168.178.3";
cpu = { sockets = 4; cores = 8; threads = 2; };
memoryMB = 30720;
};
srv1-node3 =
{
name = "n1"; address = "192.168.178.2";
name = "n3"; address = "192.168.178.4";
cpu = { sockets = 4; cores = 8; threads = 2; };
memoryMB = 30720;
};
};
partitions =
{
default = [ "srv1-node0" ];
localhost = [ "srv1-node0" ];
old = [ "srv1-node1" "srv1-node2" "srv1-node3" ];
};
};

View File

@ -55,5 +55,8 @@ inputs:
options = [ "rbind" ];
};
};
# without this, tproxy does not work
# TODO: why?
networking.firewall.trustedInterfaces = [ "eno146" ];
};
}

View File

@ -8,7 +8,7 @@ inputs:
{
nixpkgs.march = "broadwell";
networking.networkd.static.eno2 =
{ ip = "192.168.178.3"; mask = 24; gateway = "192.168.178.1"; dns = "192.168.178.1"; };
{ ip = "192.168.178.4"; mask = 24; gateway = "192.168.178.1"; dns = "192.168.178.1"; };
cluster.nodeType = "worker";
initrd.sshd.enable = true;
nix.remote.slave.enable = true;

View File

@ -81,7 +81,7 @@ inputs:
memoryMB = 94208;
gpus = { "p5000" = 1; "3090" = 1; "4090" = 1; };
};
partitions.default = [ "xmupc1" ];
partitions.localhost = [ "xmupc1" ];
};
xrdp = { enable = true; hostname = [ "xmupc1.chn.moe" ]; };
samba =

View File

@ -80,7 +80,7 @@ inputs:
memoryMB = 253952;
gpus."4090" = 1;
};
partitions.default = [ "xmupc2" ];
partitions.localhost = [ "xmupc2" ];
};
xrdp = { enable = true; hostname = [ "xmupc2.chn.moe" ]; };
samba = { enable = true; hostsAllowed = ""; shares = { home.path = "/home"; root.path = "/"; }; };

View File

@ -22,7 +22,7 @@ inputs:
gpus = mkOption { type = types.nullOr (types.attrsOf types.ints.unsigned); default = null; };
};}));};
partitions = mkOption { type = types.attrsOf (types.listOf types.nonEmptyStr); default = {}; };
defaultPartition = mkOption { type = types.nonEmptyStr; default = "default"; };
defaultPartition = mkOption { type = types.nonEmptyStr; default = "localhost"; };
};
config = let inherit (inputs.config.nixos.services) slurm; in inputs.lib.mkIf slurm.enable (inputs.lib.mkMerge
[
@ -81,6 +81,7 @@ inputs:
(inputs.localLib.attrsToList slurm.partitions);
procTrackType = "proctrack/cgroup";
controlMachine = slurm.master;
controlAddr = slurm.node.${slurm.master}.address;
extraConfig =
''
SelectType=select/cons_tres