diff options
author | midchildan <git@midchildan.org> | 2020-08-24 22:07:08 +0900 |
---|---|---|
committer | midchildan <git@midchildan.org> | 2020-09-12 00:34:46 +0900 |
commit | 090305169db02ff88493828fbeb6c59175f099c9 (patch) | |
tree | 582135a919b6dbd871a6e58558672aedfc68ebb4 /nixos | |
parent | b75887a4b1c35d3689888fe104066be204d2767b (diff) | |
download | nixpkgs-090305169db02ff88493828fbeb6c59175f099c9.tar nixpkgs-090305169db02ff88493828fbeb6c59175f099c9.tar.gz nixpkgs-090305169db02ff88493828fbeb6c59175f099c9.tar.bz2 nixpkgs-090305169db02ff88493828fbeb6c59175f099c9.tar.lz nixpkgs-090305169db02ff88493828fbeb6c59175f099c9.tar.xz nixpkgs-090305169db02ff88493828fbeb6c59175f099c9.tar.zst nixpkgs-090305169db02ff88493828fbeb6c59175f099c9.zip |
nixos/mirakurun: expose setting 'unixSocket'
and improve documentation along the way
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/video/mirakurun.nix | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/nixos/modules/services/video/mirakurun.nix b/nixos/modules/services/video/mirakurun.nix index 675b67f6ebf..ce1dabe6bfa 100644 --- a/nixos/modules/services/video/mirakurun.nix +++ b/nixos/modules/services/video/mirakurun.nix @@ -18,7 +18,8 @@ in type = with types; nullOr port; default = 40772; description = '' - Port to listen on. If null, it won't listen on any port. + Port to listen on. If <literal>null</literal>, it won't listen on + any port. ''; }; @@ -27,6 +28,23 @@ in default = false; description = '' Open ports in the firewall for Mirakurun. + + <warning> + <para> + Exposing Mirakurun to the open internet is generally advised + against. Only use it inside a trusted local network, or + consider putting it behind a VPN if you want remote access. + </para> + </warning> + ''; + }; + + unixSocket = mkOption { + type = with types; nullOr path; + default = "/var/run/mirakurun/mirakurun.sock"; + description = '' + Path to unix socket to listen on. If <literal>null</literal>, it + won't listen on any unix sockets. ''; }; @@ -121,8 +139,8 @@ in services.mirakurun.serverSettings = { logLevel = mkDefault 2; - path = mkDefault "/var/run/mirakurun/mirakurun.sock"; - port = mkIf (cfg.port != null) (mkDefault cfg.port); + path = mkIf (cfg.unixSocket != null) cfg.unixSocket; + port = mkIf (cfg.port != null) cfg.port; }; systemd.tmpfiles.rules = [ |