diff options
author | Graham Christensen <graham@grahamc.com> | 2021-12-17 11:14:08 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-17 11:14:08 -0500 |
commit | 06edb74413eb4e4ac56921ef2c038d8f106b15df (patch) | |
tree | 897b78ed67fd8ffb0938fc85f52a496ff9785e7c /nixos/modules/services/video | |
parent | 4edd5c91ca09665e33f705d280a4d9f7f093605f (diff) | |
parent | e67a646a925bc3cda86101a3f3afb81db3030ef5 (diff) |
Merge pull request #148785 from pennae/more-option-doc-staticizing
treewide: more defaultText for options
Diffstat (limited to 'nixos/modules/services/video')
-rw-r--r-- | nixos/modules/services/video/epgstation/default.nix | 8 | ||||
-rw-r--r-- | nixos/modules/services/video/unifi-video.nix | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/nixos/modules/services/video/epgstation/default.nix b/nixos/modules/services/video/epgstation/default.nix index 56bd9d9eeeca..41613dcbb3ba 100644 --- a/nixos/modules/services/video/epgstation/default.nix +++ b/nixos/modules/services/video/epgstation/default.nix @@ -1,9 +1,10 @@ -{ config, lib, pkgs, ... }: +{ config, lib, options, pkgs, ... }: with lib; let cfg = config.services.epgstation; + opt = options.services.epgstation; username = config.users.users.epgstation.name; groupname = config.users.users.epgstation.group; @@ -72,6 +73,7 @@ in socketioPort = mkOption { type = types.port; default = cfg.port + 1; + defaultText = literalExpression "config.${opt.port} + 1"; description = '' Socket.io port for EPGStation to listen on. ''; @@ -80,6 +82,7 @@ in clientSocketioPort = mkOption { type = types.port; default = cfg.socketioPort; + defaultText = literalExpression "config.${opt.socketioPort}"; description = '' Socket.io port that the web client is going to connect to. This may be different from <option>socketioPort</option> if EPGStation is hidden @@ -183,6 +186,9 @@ in in { type = types.str; default = "http+unix://${replaceStrings ["/"] ["%2F"] sockPath}"; + defaultText = literalExpression '' + "http+unix://''${replaceStrings ["/"] ["%2F"] config.${options.services.mirakurun.unixSocket}}" + ''; example = "http://localhost:40772"; description = "URL to connect to Mirakurun."; }); 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."; }; |