[Nix-dev] tigervnc service?
Volth
volth at volth.com
Sat Apr 22 23:30:42 CEST 2017
I used it to have a graphical console to libvirt-lxc containers in
virt-manager (which has vnc client):
---
vnc-backdoor = { config, pkgs, lib, ... }: {
config = {
systemd.services."vncserver" = {
description = "VNC Server";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
path = [ pkgs.xorg.xauth pkgs.perl ];
environment.HOME = "/root";
environment.USER = "root";
preStart = ''
${pkgs.coreutils}/bin/rm -rf $HOME/.vnc
${pkgs.coreutils}/bin/mkdir -p $HOME/.vnc
echo -e '#!${pkgs.bash}/bin/bash\n${pkgs.xterm}/bin/xterm
&\nwhile [ true ]; do ${pkgs.icewm}/bin/icewm; done' >
$HOME/.vnc/xstartup
${pkgs.coreutils}/bin/chmod 755 $HOME/.vnc/xstartup
'';
serviceConfig = {
Type = "forking";
ExecStart = "${pkgs.tigervnc}/bin/vncserver -geometry
1024x768 -securitytypes none :1";
ExecStop = "${pkgs.tigervnc}/bin/vncserver -kill :1";
};
};
};
};
----
On 4/22/17, Tim Sears <tim at timsears.com> wrote:
> Has anyone managed to get tigervnc or any other vnc server running as a
> service under nixos?
>
More information about the nix-dev
mailing list