diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2017-04-11 18:08:51 +0200 |
---|---|---|
committer | Franz Pletz <fpletz@fnordicwalking.de> | 2017-04-11 18:18:53 +0200 |
commit | 3ab45f4b369c9c741b55ddedeaac4c797dc61c04 (patch) | |
tree | 3c5e330622e42066e50ab20a6c58b9251addf863 /nixos/modules/services/network-filesystems | |
parent | 54fff9ec1a9e7425926eadffada0268351536926 (diff) | |
download | nixlib-3ab45f4b369c9c741b55ddedeaac4c797dc61c04.tar nixlib-3ab45f4b369c9c741b55ddedeaac4c797dc61c04.tar.gz nixlib-3ab45f4b369c9c741b55ddedeaac4c797dc61c04.tar.bz2 nixlib-3ab45f4b369c9c741b55ddedeaac4c797dc61c04.tar.lz nixlib-3ab45f4b369c9c741b55ddedeaac4c797dc61c04.tar.xz nixlib-3ab45f4b369c9c741b55ddedeaac4c797dc61c04.tar.zst nixlib-3ab45f4b369c9c741b55ddedeaac4c797dc61c04.zip |
treewide: use boolToString function
Diffstat (limited to 'nixos/modules/services/network-filesystems')
-rw-r--r-- | nixos/modules/services/network-filesystems/netatalk.nix | 2 | ||||
-rw-r--r-- | nixos/modules/services/network-filesystems/samba.nix | 2 | ||||
-rw-r--r-- | nixos/modules/services/network-filesystems/tahoe.nix | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/nixos/modules/services/network-filesystems/netatalk.nix b/nixos/modules/services/network-filesystems/netatalk.nix index bff54406a2b0..1dd869043f0c 100644 --- a/nixos/modules/services/network-filesystems/netatalk.nix +++ b/nixos/modules/services/network-filesystems/netatalk.nix @@ -9,7 +9,7 @@ let extmapFile = pkgs.writeText "extmap.conf" cfg.extmap; afpToString = x: if builtins.typeOf x == "bool" - then (if x then "true" else "false") + then boolToString x else toString x; volumeConfig = name: diff --git a/nixos/modules/services/network-filesystems/samba.nix b/nixos/modules/services/network-filesystems/samba.nix index 6ae5292fc303..87c4f7a8ebcb 100644 --- a/nixos/modules/services/network-filesystems/samba.nix +++ b/nixos/modules/services/network-filesystems/samba.nix @@ -5,7 +5,7 @@ with lib; let smbToString = x: if builtins.typeOf x == "bool" - then (if x then "true" else "false") + then boolToString x else toString x; cfg = config.services.samba; diff --git a/nixos/modules/services/network-filesystems/tahoe.nix b/nixos/modules/services/network-filesystems/tahoe.nix index 3d78ac096a2b..9815a5434ee3 100644 --- a/nixos/modules/services/network-filesystems/tahoe.nix +++ b/nixos/modules/services/network-filesystems/tahoe.nix @@ -290,14 +290,14 @@ in shares.total = ${toString settings.client.shares.total} [storage] - enabled = ${if settings.storage.enable then "true" else "false"} + enabled = ${boolToString settings.storage.enable} reserved_space = ${settings.storage.reservedSpace} [helper] - enabled = ${if settings.helper.enable then "true" else "false"} + enabled = ${boolToString settings.helper.enable} [sftpd] - enabled = ${if settings.sftpd.enable then "true" else "false"} + enabled = ${boolToString settings.sftpd.enable} ${optionalString (settings.sftpd.port != null) "port = ${toString settings.sftpd.port}"} ${optionalString (settings.sftpd.hostPublicKeyFile != null) |