Merge pull request #44238 from jfrankenau/samba-conf-override
nixos/samba: allow dummy conf file to be overridden
commited2148b5af8b4d4f6f5ecbc4bd72ecabe1c25acc
authorSilvan Mosberger <infinisil@icloud.com>
dateThu 16 Aug 2018, 16:56 (8 years ago)
parentd3c5a9b5116988
nixos/modules/services/network-filesystems/samba.nix+4−6
@@ -214,12 +214,10 @@ in
214214 }
215215 ];
216216 # 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+ );
223221 }
224222
225223 (mkIf cfg.enable {