mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
Merge pull request #44238 from jfrankenau/samba-conf-override
nixos/samba: allow dummy conf file to be overridden
This commit is contained in:
commit
ed2148b5af
1 changed files with 4 additions and 6 deletions
|
@ -214,12 +214,10 @@ in
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
# Always provide a smb.conf to shut up programs like smbclient and smbspool.
|
# Always provide a smb.conf to shut up programs like smbclient and smbspool.
|
||||||
environment.etc = singleton
|
environment.etc."samba/smb.conf".source = mkOptionDefault (
|
||||||
{ source =
|
if cfg.enable then configFile
|
||||||
if cfg.enable then configFile
|
else pkgs.writeText "smb-dummy.conf" "# Samba is disabled."
|
||||||
else pkgs.writeText "smb-dummy.conf" "# Samba is disabled.";
|
);
|
||||||
target = "samba/smb.conf";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
(mkIf cfg.enable {
|
(mkIf cfg.enable {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue