From edd19bdaae0b6601591a20a860f8d9b3eb4bc808 Mon Sep 17 00:00:00 2001 From: Astro Date: Thu, 23 Jun 2022 22:11:13 +0200 Subject: [PATCH] config/ceph-storage: eradicate --- config/c3d2.nix | 3 +-- config/ceph-storage.nix | 46 ------------------------------------ hosts/glotzbert/default.nix | 1 - hosts/storage-ng/default.nix | 1 - 4 files changed, 1 insertion(+), 50 deletions(-) delete mode 100644 config/ceph-storage.nix diff --git a/config/c3d2.nix b/config/c3d2.nix index 247fcfc2..a835bd39 100644 --- a/config/c3d2.nix +++ b/config/c3d2.nix @@ -24,8 +24,7 @@ in { imports = [ ./stats.nix ./audio-server - ./ceph-storage.nix - ./logging.nix + ./logging.nix ]; diff --git a/config/ceph-storage.nix b/config/ceph-storage.nix deleted file mode 100644 index 294deaa0..00000000 --- a/config/ceph-storage.nix +++ /dev/null @@ -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. - '' ]; - }; -} diff --git a/hosts/glotzbert/default.nix b/hosts/glotzbert/default.nix index 8d47e117..1255cbaa 100644 --- a/hosts/glotzbert/default.nix +++ b/hosts/glotzbert/default.nix @@ -8,7 +8,6 @@ hq.interface = "eno1"; hq.enableBinaryCache = false; k-ot.enable = true; - mountCeph = "/mnt/storage"; autoUpdate = true; }; diff --git a/hosts/storage-ng/default.nix b/hosts/storage-ng/default.nix index d0e0cf72..73edc809 100644 --- a/hosts/storage-ng/default.nix +++ b/hosts/storage-ng/default.nix @@ -14,7 +14,6 @@ in isInHq = true; mergeHostsFile = true; hq.interface = eth0; - mountCeph = "/mnt/cephfs"; }; sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];