68 lines
1.5 KiB
Nix
68 lines
1.5 KiB
Nix
{ lib, ... }:
|
|
with lib; {
|
|
options.nas-samba = {
|
|
enable = mkEnableOption "nas samba service";
|
|
|
|
autoStart = mkOption {
|
|
type = types.bool;
|
|
default = true;
|
|
};
|
|
enableTimeMachine = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
};
|
|
timeMachinePath = mkOption {
|
|
type = types.str;
|
|
default = "";
|
|
};
|
|
hostsAllow = mkOption {
|
|
type = types.str;
|
|
default = "";
|
|
};
|
|
|
|
shares = mkOption {
|
|
type = types.attrsOf (types.submodule {
|
|
options = {
|
|
public = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
};
|
|
sharePath = mkOption {
|
|
type = types.str;
|
|
default = "";
|
|
};
|
|
readOnly = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
};
|
|
browseable = mkOption {
|
|
type = types.bool;
|
|
default = true;
|
|
};
|
|
guestOk = mkOption {
|
|
type = types.bool;
|
|
default = true;
|
|
};
|
|
createMask = mkOption {
|
|
type = types.str;
|
|
default = "0644";
|
|
};
|
|
directoryMask = mkOption {
|
|
type = types.str;
|
|
default = "0755";
|
|
};
|
|
enableTimeMachine = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
};
|
|
timeMachineMaxSize = mkOption {
|
|
type = types.str;
|
|
default = "0K";
|
|
};
|
|
};
|
|
});
|
|
default = { };
|
|
};
|
|
};
|
|
}
|