formatting and hooks

This commit is contained in:
ari committed 2026-04-13 16:39:18 -04:00
1 parent 7d5ddd9013
commit 2d956525cc
15 files changed
+146 -65

No files matched your search

+19 -19
View File
@@ -4,27 +4,27 @@
}:
let
cfg = config.skyg.networkDrives;
makeCommonOption = {
defaultHost,
enabledByDefault ? true
} : lib.mkOption {
type = lib.types.submodule {
options = {
enable = lib.mkOption {
type = lib.types.bool;
default = enabledByDefault;
};
host = lib.mkOption {
type = lib.types.str;
default = defaultHost;
makeCommonOption =
{ defaultHost
, enabledByDefault ? true
}: lib.mkOption {
type = lib.types.submodule {
options = {
enable = lib.mkOption {
type = lib.types.bool;
default = enabledByDefault;
};
host = lib.mkOption {
type = lib.types.str;
default = defaultHost;
};
};
};
default = {
enable = enabledByDefault;
host = defaultHost;
};
};
default = {
enable = enabledByDefault;
host = defaultHost;
};
};
in
{
options = {
@@ -77,7 +77,7 @@ in
};
fileSystems."/homelab/bigbox2/data/fourTerra" = lib.mkIf cfg.bigBox2.enable {
device = "${cfg.terra1.host}:/data/fourTerra";
device = "${cfg.bigBox2.host}:/data/fourTerra";
fsType = "nfs";
options = cfg.options;
};