mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-22 21:18:44 +08:00
Compare commits
5 Commits
a1659ae7fc
...
2904080ee8
Author | SHA1 | Date | |
---|---|---|---|
2904080ee8 | |||
198882ee87 | |||
5df233c831 | |||
3c02cb54c5 | |||
9b00bbfb20 |
@ -136,7 +136,7 @@ inputs:
|
||||
memoryMB = 90112;
|
||||
gpus."4060" = 1;
|
||||
};
|
||||
partitions.default = [ "pc" ];
|
||||
partitions.localhost = [ "pc" ];
|
||||
};
|
||||
ollama = {};
|
||||
waydroid = {};
|
||||
|
@ -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" ];
|
||||
};
|
||||
};
|
||||
|
@ -55,5 +55,8 @@ inputs:
|
||||
options = [ "rbind" ];
|
||||
};
|
||||
};
|
||||
# without this, tproxy does not work
|
||||
# TODO: why?
|
||||
networking.firewall.trustedInterfaces = [ "eno146" ];
|
||||
};
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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 =
|
||||
|
@ -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 = "/"; }; };
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user