Add toplevel module, and enable modules in config

This commit is contained in:
Jonas Juselius
2020-10-31 09:16:52 +01:00
parent 375a26915f
commit 533928a880
5 changed files with 30 additions and 19 deletions

View File

@@ -42,6 +42,7 @@ let
};
in {
options.cluster.fs = {
enable = mkEnableOption "Enable nfs fileserver";
nfs = {
enable = mkEnableOption "Enable nfs fileserver";
exports = mkOption {
@@ -52,13 +53,13 @@ in {
glusterfs.enable = mkEnableOption "Enable glusterfs fileserver";
};
config = mkMerge [
common
(mkIf cfg.nfs.enable nfs)
(mkIf cfg.glusterfs.enable glusterfs)
];
config = mkIf cfg.enable (
mkMerge [
common
(mkIf cfg.nfs.enable nfs)
(mkIf cfg.glusterfs.enable glusterfs)
]
);
imports = [ ./os.nix ];
}