From 7a3bba220d65b5908c30dace4aeda36f351932c6 Mon Sep 17 00:00:00 2001 From: Anthony Roussel Date: Mon, 8 Apr 2024 23:16:59 +0200 Subject: [PATCH] nixos/samba: add services.samba.smbd.enable option --- nixos/modules/services/network-filesystems/samba.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/network-filesystems/samba.nix b/nixos/modules/services/network-filesystems/samba.nix index 6e1c6f7b3c3e..e36430f5335b 100644 --- a/nixos/modules/services/network-filesystems/samba.nix +++ b/nixos/modules/services/network-filesystems/samba.nix @@ -98,6 +98,12 @@ in ''; }; + smbd.enable = mkOption { + type = types.bool; + default = true; + description = lib.mdDoc "Whether to enable Samba's smbd daemon."; + }; + nmbd.enable = mkOption { type = types.bool; default = true; @@ -193,7 +199,7 @@ in # Refer to https://github.com/samba-team/samba/tree/master/packaging/systemd # for correct use with systemd services = { - samba-smbd = daemonService "smbd" ""; + samba-smbd = mkIf cfg.smbd.enable (daemonService "smbd" ""); samba-nmbd = mkIf cfg.nmbd.enable (daemonService "nmbd" ""); samba-winbindd = mkIf cfg.winbindd.enable (daemonService "winbindd" ""); };