config/ceph-storage: eradicate

This commit is contained in:
Astro 2022-06-23 22:11:13 +02:00
parent 726a0ed815
commit edd19bdaae
4 changed files with 1 additions and 50 deletions

View File

@ -24,8 +24,7 @@ in {
imports = [
./stats.nix
./audio-server
./ceph-storage.nix
./logging.nix
./logging.nix
];

View File

@ -1,46 +0,0 @@
{ zentralwerk, config, lib, pkgs, ... }:
{
options.c3d2 = with lib; {
mountCeph = mkOption {
type = with types; nullOr str;
default = null;
description = "If set, mountpoint of ceph storage";
};
};
config = lib.mkIf (config.c3d2.mountCeph != null) {
sops.secrets."ceph/secret" = {};
services.ceph = {
global.fsid = "d7c5c9c7-a227-4e33-ab43-3f4aa1eb0630";
client.enable = true;
};
fileSystems."${config.c3d2.mountCeph}" =
let
monHosts = lib.concatMapStringsSep "," (host:
zentralwerk.lib.config.site.net.cluster.hosts4.${host}
) [ "server5" "server6" "server8" ];
in {
fsType = "ceph";
device = "${monHosts}:/";
options = [
"_netdev"
"name=c3d2"
"secretfile=${config.sops.secrets."ceph/secret".path}"
"noatime"
"x-systemd.automount"
"x-systemd.device-timeout=5"
];
};
environment.systemPackages = with pkgs; [
ceph
];
warnings = lib.optionals config.boot.isContainer [ ''
Mounting CephFS on containers (on the same kernel that
runs the servers) is discouraged! Ask Poelzi why.
'' ];
};
}

View File

@ -8,7 +8,6 @@
hq.interface = "eno1";
hq.enableBinaryCache = false;
k-ot.enable = true;
mountCeph = "/mnt/storage";
autoUpdate = true;
};

View File

@ -14,7 +14,6 @@ in
isInHq = true;
mergeHostsFile = true;
hq.interface = eth0;
mountCeph = "/mnt/cephfs";
};
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];