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/epgstation/default.nix | |
parent | 4edd5c91ca09665e33f705d280a4d9f7f093605f (diff) | |
parent | e67a646a925bc3cda86101a3f3afb81db3030ef5 (diff) | |
download | nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.tar nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.tar.gz nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.tar.bz2 nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.tar.lz nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.tar.xz nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.tar.zst nixpkgs-06edb74413eb4e4ac56921ef2c038d8f106b15df.zip |
Merge pull request #148785 from pennae/more-option-doc-staticizing
treewide: more defaultText for options
Diffstat (limited to 'nixos/modules/services/video/epgstation/default.nix')
-rw-r--r-- | nixos/modules/services/video/epgstation/default.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/nixos/modules/services/video/epgstation/default.nix b/nixos/modules/services/video/epgstation/default.nix index 56bd9d9eeec..41613dcbb3b 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."; }); |