Add Samba Module.

This commit is contained in:
Joseph Hanson 2024-07-13 05:01:09 -05:00
parent 715239373d
commit 78f9908a26
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o
2 changed files with 26 additions and 0 deletions

View file

@ -8,6 +8,7 @@
./pushover ./pushover
./security.nix ./security.nix
./systempackages.nix ./systempackages.nix
./samba
./time.nix ./time.nix
./zfs.nix ./zfs.nix
]; ];

View file

@ -0,0 +1,25 @@
{ lib, config, ... }:
let
cfg = config.mySystem.services.samba;
in
{
options.mySystem.services.samba = {
enable = lib.mkEnableOption "samba";
extraConfig = lib.mkOption {
type = lib.types.str;
default = "";
};
shares = lib.mkOption {
type = lib.types.attrsOf (lib.types.attrsOf lib.types.unspecified);
default = "";
};
};
config = lib.mkIf cfg.enable {
services.samba.enable = true;
services.samba.extraConfig = cfg.extraConfig;
services.samba.shares = cfg.shares;
services.samba.openFirewall = true;
};
}