Add 'old-conf/' from commit '62a64a79a8'
git-subtree-dir: old-conf git-subtree-mainline:4667974392git-subtree-split:62a64a79a8
This commit is contained in:
commit
83de52d5db
195 changed files with 13408 additions and 0 deletions
28
old-conf/nixos-modules/services/samba.nix
Normal file
28
old-conf/nixos-modules/services/samba.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
with lib.my;
|
||||
with builtins;
|
||||
let
|
||||
cfg = config.ragon.services.samba;
|
||||
allowedIPs = cfg.allowedIPs;
|
||||
cfgExports = cfg.exports;
|
||||
in
|
||||
{
|
||||
options.ragon.services.samba.enable = mkEnableOption "Enables Samba";
|
||||
options.ragon.services.samba.shares = mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = { };
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.samba = {
|
||||
enable = true;
|
||||
shares = cfg.shares;
|
||||
};
|
||||
ragon.persist.extraDirectories = [
|
||||
"/var/lib/samba"
|
||||
];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 139 445 ];
|
||||
networking.firewall.allowedUDPPorts = [ 137 138 ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue