about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2024-06-20 13:48:06 +0200
committerGitHub <noreply@github.com>2024-06-20 13:48:06 +0200
commit3d37622cffe5ee2f30a624087830374af8fe33f8 (patch)
treeafa6a753856d7dc176ee0ec8b8a5338e5dd1c19d /nixos
parent41dcd09eb0db1c1b158bb780d5c4a4d61d5247ee (diff)
parent46db91c0d789d62d5e44e9ef01f97b12f465c33e (diff)
Merge pull request #302645 from anthonyroussel/fix-samba
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/network-filesystems/samba.nix6
1 files changed, 1 insertions, 5 deletions
diff --git a/nixos/modules/services/network-filesystems/samba.nix b/nixos/modules/services/network-filesystems/samba.nix
index 66ef3f14ed700..c70d0cf7beac3 100644
--- a/nixos/modules/services/network-filesystems/samba.nix
+++ b/nixos/modules/services/network-filesystems/samba.nix
@@ -201,14 +201,10 @@ in
               message   = "If samba.nsswins is enabled, then samba.enableWinbindd must also be enabled";
             }
           ];
-        # Always provide a smb.conf to shut up programs like smbclient and smbspool.
-        environment.etc."samba/smb.conf".source = mkOptionDefault (
-          if cfg.enable then configFile
-          else pkgs.writeText "smb-dummy.conf" "# Samba is disabled."
-        );
       }
 
       (mkIf cfg.enable {
+        environment.etc."samba/smb.conf".source = configFile;
 
         system.nssModules = optional cfg.nsswins samba;
         system.nssDatabases.hosts = optional cfg.nsswins "wins";