···214 }
215 ];
216 # Always provide a smb.conf to shut up programs like smbclient and smbspool.
217- environment.etc = singleton
218- { source =
219- if cfg.enable then configFile
220- else pkgs.writeText "smb-dummy.conf" "# Samba is disabled.";
221- target = "samba/smb.conf";
222- };
223 }
224225 (mkIf cfg.enable {
···214 }
215 ];
216 # Always provide a smb.conf to shut up programs like smbclient and smbspool.
217+ environment.etc."samba/smb.conf".source = mkOptionDefault (
218+ if cfg.enable then configFile
219+ else pkgs.writeText "smb-dummy.conf" "# Samba is disabled."
220+ );
00221 }
222223 (mkIf cfg.enable {