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