fix: fix ekman part of botched merge

This commit is contained in:
2025-09-12 14:38:36 +02:00
parent fcd136ed4e
commit eb7b1f8130
23 changed files with 261 additions and 368 deletions

View File

@@ -3,19 +3,19 @@ with lib;
let
cfg = config.cluster.mounts;
subnet =
if cfg.rdma.enable then "243"
else if cfg.gbe100.enable then "244"
else "241";
options =
[ "soft" "defaults" "vers=4.2" ] ++
(if cfg.automount.enable then [ "noauto" "x-systemd.automount" ] else []);
users =
if cfg.users then {
<<<<<<<< HEAD:rossby/mounts.nix
"/users" = {
device = "172.16.239.222:/home";
========
"/frontend" = {
device = "10.255.241.100:/home";
>>>>>>>> ekman:ekman/mounts.nix
fsType = "nfs4";
options = [
"soft"
@@ -28,7 +28,7 @@ let
opt =
let
server = "172.16.239.222";
server = "10.255.241.100";
in
if cfg.opt then {
"/opt/bin" = {
@@ -54,34 +54,49 @@ let
device = "/ceph";
options = [ "bind" ];
};
} else if cfg.backup then {
"/data" = {
device = "/backup";
options = [ "bind" ];
};
} else {};
# device = "10.255.${subnet}.80:/backup";
# # device = "10.255.${subnet}.80:/data";
# fsType = "nfs4";
# inherit options;
# };
work =
if cfg.work then {
"/work" = {
device = "172.16.240.210:/work";
device = "10.255.${subnet}.90:/work";
fsType = "nfs4";
options = options ++ (if cfg.rdma.enable then [ "rdma" ] else []);
};
} else {};
backup =
if cfg.backup then {
"/backup" = {
device = "10.255.${subnet}.80:/backup";
fsType = "nfs4";
options = options ++ [ "ro" ] ++ (if cfg.rdma.enable then [ "rdma" ] else []);
};
} else {};
ceph =
if cfg.ceph then {
"/ceph" = {
device = "oceanbox@.data=/";
fsType = "ceph";
options = [
"mon_addr=172.16.239.211/172.16.239.212/172.16.239.213:6789"
"mon_addr=10.255.241.30/10.255.241.31/10.255.241.32:6789"
"_netdev"
];
};
} else {};
<<<<<<<< HEAD:rossby/mounts.nix
fileSystems = users // opt // data // work // ceph;
========
fileSystems = users // opt // data // work // backup // ceph;
>>>>>>>> ekman:ekman/mounts.nix
automount = mountpoint:
if cfg.automount.enable && builtins.hasAttr mountpoint fileSystems then
@@ -106,12 +121,12 @@ let
"ceph/ceph.conf" = {
text = ''
[global]
mon_host = 172.16.239.211:6789,172.16.239.212:6789,172.16.239.213:6789
mon_host = 10.255.241.30:6789,10.255.241.31:6789,10.244.241.32:6789
log file = /tmp/ceph-$pid.log
[client.oceanbox]
key = replaceme
key = AQDQNgRm6IE7JxAA1glJKsWPIBB/H/GxFYM0vQ==
[client.rbd]
key = replaceme
key = AQCjth9mjR41ABAAvSs6hltidQT6Hu5OKwWu+Q==
'';
mode = "0660";
group = "admin";
@@ -128,6 +143,7 @@ in
opt = mkEnableOption "Enable /opt";
data = mkEnableOption "Enable /data";
work = mkEnableOption "Enable /work";
backup = mkEnableOption "Enable /backup";
ceph = mkEnableOption "Enable /ceph";
};