diff options
author | tv <tv@krebsco.de> | 2023-09-12 12:56:39 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2023-09-13 16:23:38 +0200 |
commit | fbd485cd86c7e9984819357398f912a2d5510845 (patch) | |
tree | e1a9e2eedacfa25018d6b0eef3f4628a4d503ebc /tv/3modules/x0vncserver.nix | |
parent | 5370e0485788224126861e076110ac705013d2de (diff) |
tv: emigrate
Diffstat (limited to 'tv/3modules/x0vncserver.nix')
-rw-r--r-- | tv/3modules/x0vncserver.nix | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/tv/3modules/x0vncserver.nix b/tv/3modules/x0vncserver.nix deleted file mode 100644 index c8e23d06e..000000000 --- a/tv/3modules/x0vncserver.nix +++ /dev/null @@ -1,45 +0,0 @@ -with import ./lib; -{ config, pkgs, ... }: let - cfg = config.tv.x0vncserver; -in { - options.tv.x0vncserver = { - display = mkOption { - default = ":${toString config.services.xserver.display}"; - type = types.str; - }; - enable = mkEnableOption "tv.x0vncserver"; - pwfile = mkOption { - default = "${config.krebs.secret.directory}/vncpasswd"; - description = '' - Use vncpasswd to edit pwfile. - See: nix-shell -p tigervnc --run 'man vncpasswd' - ''; - type = types.absolute-pathname; - }; - rfbport = mkOption { - default = 5900; - type = types.int; - }; - user = mkOption { - default = config.krebs.build.user; - type = types.user; - }; - }; - config = mkIf cfg.enable { - krebs.systemd.services.x0vncserver.restartIfCredentialsChange = true; - systemd.services.x0vncserver = { - after = [ "graphical.target" ]; - requires = [ "graphical.target" ]; - serviceConfig = { - ExecStart = "${pkgs.tigervnc}/bin/x0vncserver ${toString [ - "-display ${cfg.display}" - "-passwordfile \${CREDENTIALS_DIRECTORY}/pwfile" - "-rfbport ${toString cfg.rfbport}" - ]}"; - LoadCredential = "ssh_key:${cfg.pwfile}"; - User = cfg.user.name; - }; - }; - tv.iptables.input-retiolum-accept-tcp = singleton (toString cfg.rfbport); - }; -} |