Skip to content

Commit

Permalink
Merge pull request #44238 from jfrankenau/samba-conf-override
Browse files Browse the repository at this point in the history
nixos/samba: allow dummy conf file to be overridden
  • Loading branch information
infinisil committed Aug 16, 2018
2 parents d3c5a9b + 5116988 commit ed2148b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions nixos/modules/services/network-filesystems/samba.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ed2148b

Please sign in to comment.