3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #44238 from jfrankenau/samba-conf-override

nixos/samba: allow dummy conf file to be overridden
This commit is contained in:
Silvan Mosberger 2018-08-16 16:56:24 +02:00 committed by GitHub
commit ed2148b5af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -214,12 +214,10 @@ in
}
];
# Always provide a smb.conf to shut up programs like smbclient and smbspool.
environment.etc = singleton
{ source =
if cfg.enable then configFile
else pkgs.writeText "smb-dummy.conf" "# Samba is disabled.";
target = "samba/smb.conf";
};
environment.etc."samba/smb.conf".source = mkOptionDefault (
if cfg.enable then configFile
else pkgs.writeText "smb-dummy.conf" "# Samba is disabled."
);
}
(mkIf cfg.enable {