nixos/ceph: add options to configure package used by each component

This makes updates following the upstream guide possible.

Changed files
+6 -2
nixos
modules
services
network-filesystems
+6 -2
nixos/modules/services/network-filesystems/ceph.nix
···
makeServices = daemonType: daemonIds:
mkMerge (map (daemonId:
-
{ "ceph-${daemonType}-${daemonId}" = makeService daemonType daemonId cfg.global.clusterName pkgs.ceph; })
+
{ "ceph-${daemonType}-${daemonId}" = makeService daemonType daemonId cfg.global.clusterName cfg.${daemonType}.package; })
daemonIds);
makeService = daemonType: daemonId: clusterName: ceph:
···
to the id part in ceph i.e. [ "name1" ] would result in mgr.name1
'';
};
+
package = mkPackageOptionMD pkgs "ceph" { };
extraConfig = mkOption {
type = with types; attrsOf str;
default = {};
···
to the id part in ceph i.e. [ "name1" ] would result in mon.name1
'';
};
+
package = mkPackageOptionMD pkgs "ceph" { };
extraConfig = mkOption {
type = with types; attrsOf str;
default = {};
···
to the id part in ceph i.e. [ "name1" ] would result in osd.name1
'';
};
-
+
package = mkPackageOptionMD pkgs "ceph" { };
extraConfig = mkOption {
type = with types; attrsOf str;
default = {
···
to the id part in ceph i.e. [ "name1" ] would result in mds.name1
'';
};
+
package = mkPackageOptionMD pkgs "ceph" { };
extraConfig = mkOption {
type = with types; attrsOf str;
default = {};
···
rgw = {
enable = mkEnableOption (lib.mdDoc "Ceph RadosGW daemon");
+
package = mkPackageOptionMD pkgs "ceph" { };
daemons = mkOption {
type = with types; listOf str;
default = [];