From d46e6dad6b702f4bde13034e660e480d664254de Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Sun, 5 Mar 2023 19:59:58 +0000 Subject: [PATCH] open firewall for samba connection --- modules/nixos/services/samba.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/nixos/services/samba.nix b/modules/nixos/services/samba.nix index 6c0fb7e..619feec 100644 --- a/modules/nixos/services/samba.nix +++ b/modules/nixos/services/samba.nix @@ -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 ]; + }; }