big restructure, getting there prayers for rebuild
This commit is contained in:
36
modules/homelab/fileshare/samba/default.nix
Normal file
36
modules/homelab/fileshare/samba/default.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
# define smb shares
|
||||
let
|
||||
cfg = config.modules.fileshare.smb;
|
||||
smb_shares = {
|
||||
vault = {
|
||||
path = "/holocron/vault";
|
||||
browseable = true;
|
||||
writable = true;
|
||||
guestOk = false;
|
||||
};
|
||||
media = {
|
||||
path = "/holocron/media";
|
||||
browseable = true;
|
||||
writable = true;
|
||||
guestOk = false;
|
||||
};
|
||||
};
|
||||
in {
|
||||
options.modules.homelab.smb = {
|
||||
enable = lib.mkEnableOption "enables smb";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# enable smb with all shares
|
||||
services.samba = {
|
||||
enable = true;
|
||||
settings = smb_shares;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user