diff options
author | pennae <github@quasiparticle.net> | 2021-12-05 20:40:24 +0100 |
---|---|---|
committer | pennae <github@quasiparticle.net> | 2021-12-09 01:12:13 +0100 |
commit | e24a8775a86905ad001c4c965a7d180b41c10c52 (patch) | |
tree | 62da74c469bec798898d88029919f2bbd9f01442 /nixos/modules/services/web-apps/peertube.nix | |
parent | 70b105d1d062369c7489b0045df5a8b86bac5dd6 (diff) | |
download | nixlib-e24a8775a86905ad001c4c965a7d180b41c10c52.tar nixlib-e24a8775a86905ad001c4c965a7d180b41c10c52.tar.gz nixlib-e24a8775a86905ad001c4c965a7d180b41c10c52.tar.bz2 nixlib-e24a8775a86905ad001c4c965a7d180b41c10c52.tar.lz nixlib-e24a8775a86905ad001c4c965a7d180b41c10c52.tar.xz nixlib-e24a8775a86905ad001c4c965a7d180b41c10c52.tar.zst nixlib-e24a8775a86905ad001c4c965a7d180b41c10c52.zip |
treewide: set defaultText for options using simple path defaults
adds defaultText for all options that set their default to a path expression using the ubiquitous `cfg` shortcut bindings.
Diffstat (limited to 'nixos/modules/services/web-apps/peertube.nix')
-rw-r--r-- | nixos/modules/services/web-apps/peertube.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/services/web-apps/peertube.nix b/nixos/modules/services/web-apps/peertube.nix index 362a3358b793..a9473fb81786 100644 --- a/nixos/modules/services/web-apps/peertube.nix +++ b/nixos/modules/services/web-apps/peertube.nix @@ -1,7 +1,8 @@ -{ lib, pkgs, config, ... }: +{ lib, pkgs, config, options, ... }: let cfg = config.services.peertube; + opt = options.services.peertube; settingsFormat = pkgs.formats.json {}; configFile = settingsFormat.generate "production.json" cfg.settings; @@ -212,6 +213,7 @@ in { enableUnixSocket = lib.mkOption { type = lib.types.bool; default = cfg.redis.createLocally; + defaultText = lib.literalExpression "config.${opt.redis.createLocally}"; description = "Use Unix socket."; }; }; |