initial(ish) commit

This commit is contained in:
Philipp Hochkamp 2022-03-01 23:53:11 +01:00
commit b744693f0e
No known key found for this signature in database
GPG key ID: 3676AB4CB36E5641
88 changed files with 4925 additions and 0 deletions

View 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 ];
};
}