open firewall for samba connection

This commit is contained in:
Noah Masur 2023-03-05 19:59:58 +00:00
parent 5e4642b92e
commit d46e6dad6b

View File

@ -1,4 +1,4 @@
{ config, lib, ... }: {
{ config, pkgs, lib, ... }: {
options = { samba.enable = lib.mkEnableOption "Enable Samba sharing."; };
@ -6,6 +6,7 @@
services.samba = lib.mkIf (config.samba.enable) {
enable = true;
openFirewall = true;
shares.video = {
path = "/data/video";
browseable = "yes";
@ -21,6 +22,12 @@
services.gvfs =
lib.mkIf (config.gui.enable && config.nautilus.enable) { enable = true; };
# Permissions required to mount Samba with GVFS, if not using desktop environment
environment.systemPackages = lib.mkIf (config.gui.enable
&& config.nautilus.enable
&& config.services.xserver.windowManager.i3.enable)
[ pkgs.lxqt.pxqt-policykit ];
};
}