149 current 2025-10-09 03:59:16 25.05.20251006.20c4598 6.12.50 *
This commit is contained in:
33
modules/homelab/shares/smb.nix
Normal file
33
modules/homelab/shares/smb.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
|
||||
# define smb shares
|
||||
let
|
||||
cfg = config.modules.homelab.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