diff options
author | pennae <github@quasiparticle.net> | 2021-12-05 21:28:49 +0100 |
---|---|---|
committer | pennae <github@quasiparticle.net> | 2021-12-09 01:13:48 +0100 |
commit | fb0e5be84331188a69b3edd31679ca6576edb75a (patch) | |
tree | 80d713f568ae02e4a3aed70114bafe46e9fe753f /nixos/modules/services/video/unifi-video.nix | |
parent | f6d0b014fe1db9e6edec5485f41a1162136c8a70 (diff) | |
download | nixlib-fb0e5be84331188a69b3edd31679ca6576edb75a.tar nixlib-fb0e5be84331188a69b3edd31679ca6576edb75a.tar.gz nixlib-fb0e5be84331188a69b3edd31679ca6576edb75a.tar.bz2 nixlib-fb0e5be84331188a69b3edd31679ca6576edb75a.tar.lz nixlib-fb0e5be84331188a69b3edd31679ca6576edb75a.tar.xz nixlib-fb0e5be84331188a69b3edd31679ca6576edb75a.tar.zst nixlib-fb0e5be84331188a69b3edd31679ca6576edb75a.zip |
treewide: add defaultText for options with simple interpolation defaults
adds defaultText for all options that use `cfg.*` values in their defaults, but only for interpolations with no extra processing (other than toString where necessary)
Diffstat (limited to 'nixos/modules/services/video/unifi-video.nix')
-rw-r--r-- | nixos/modules/services/video/unifi-video.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/services/video/unifi-video.nix b/nixos/modules/services/video/unifi-video.nix index 17971b23db82..43208a9fe4cf 100644 --- a/nixos/modules/services/video/unifi-video.nix +++ b/nixos/modules/services/video/unifi-video.nix @@ -1,7 +1,8 @@ -{ config, lib, pkgs, utils, ... }: +{ config, lib, options, pkgs, utils, ... }: with lib; let cfg = config.services.unifi-video; + opt = options.services.unifi-video; mainClass = "com.ubnt.airvision.Main"; cmd = '' ${pkgs.jsvc}/bin/jsvc \ @@ -164,6 +165,7 @@ in pidFile = mkOption { type = types.path; default = "${cfg.dataDir}/unifi-video.pid"; + defaultText = literalExpression ''"''${config.${opt.dataDir}}/unifi-video.pid"''; description = "Location of unifi-video pid file."; }; |