lol

nixos/samba: allow dummy conf file to be overridden

This allows configuring samba clients on systems without a samba server.

+4 -6
+4 -6
nixos/modules/services/network-filesystems/samba.nix
··· 214 214 } 215 215 ]; 216 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 - }; 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 + ); 223 221 } 224 222 225 223 (mkIf cfg.enable {