Loading nixos/modules/services/networking/x2goserver.nix +16 −7 Original line number Diff line number Diff line Loading @@ -37,6 +37,15 @@ in ''; }; package = mkOption { type = types.package; default = pkgs.x2goserver; defaultText = literalExpression "pkgs.x2goserver"; description = '' The x2goserver package to use. ''; }; superenicer = { enable = mkEnableOption "superenicer" // { description = '' Loading Loading @@ -87,7 +96,7 @@ in icons.enable = true; }; environment.systemPackages = [ pkgs.x2goserver ]; environment.systemPackages = [ cfg.package ]; users.groups.x2go = { }; users.users.x2go = { Loading @@ -97,14 +106,14 @@ in }; security.wrappers.x2gosqliteWrapper = { source = "${pkgs.x2goserver}/lib/x2go/libx2go-server-db-sqlite3-wrapper.pl"; source = "${cfg.package}/lib/x2go/libx2go-server-db-sqlite3-wrapper.pl"; owner = "x2go"; group = "x2go"; setuid = false; setgid = true; }; security.wrappers.x2goprintWrapper = { source = "${pkgs.x2goserver}/bin/x2goprint"; source = "${cfg.package}/bin/x2goprint"; owner = "x2go"; group = "x2go"; setuid = false; Loading @@ -123,7 +132,7 @@ in # x2goclient sends SSH commands with preset PATH set to # "/usr/local/bin;/usr/bin;/bin". Since we cannot filter arbitrary ssh # commands, we have to make the following executables available. map (f: "L+ /usr/local/bin/${f} - - - - ${x2goserver}/bin/${f}") [ map (f: "L+ /usr/local/bin/${f} - - - - ${cfg.package}/bin/${f}") [ "x2goagent" "x2gobasepath" "x2gocleansessions" Loading Loading @@ -173,7 +182,7 @@ in unitConfig.Documentation = "man:x2goserver.conf(5)"; serviceConfig = { Type = "forking"; ExecStart = "${pkgs.x2goserver}/bin/x2gocleansessions"; ExecStart = "${cfg.package}/bin/x2gocleansessions"; PIDFile = "/run/x2go/x2goserver.pid"; User = "x2go"; Group = "x2go"; Loading @@ -184,10 +193,10 @@ in if [ ! -e /var/lib/x2go/setup_ran ] then mkdir -p /var/lib/x2go/conf cp -r ${pkgs.x2goserver}/etc/x2go/* /var/lib/x2go/conf/ cp -r ${cfg.package}/etc/x2go/* /var/lib/x2go/conf/ ln -sf ${x2goServerConf} /var/lib/x2go/conf/x2goserver.conf ln -sf ${x2goAgentOptions} /var/lib/x2go/conf/x2goagent.options ${pkgs.x2goserver}/bin/x2godbadmin --createdb ${cfg.package}/bin/x2godbadmin --createdb touch /var/lib/x2go/setup_ran fi ''; Loading Loading
nixos/modules/services/networking/x2goserver.nix +16 −7 Original line number Diff line number Diff line Loading @@ -37,6 +37,15 @@ in ''; }; package = mkOption { type = types.package; default = pkgs.x2goserver; defaultText = literalExpression "pkgs.x2goserver"; description = '' The x2goserver package to use. ''; }; superenicer = { enable = mkEnableOption "superenicer" // { description = '' Loading Loading @@ -87,7 +96,7 @@ in icons.enable = true; }; environment.systemPackages = [ pkgs.x2goserver ]; environment.systemPackages = [ cfg.package ]; users.groups.x2go = { }; users.users.x2go = { Loading @@ -97,14 +106,14 @@ in }; security.wrappers.x2gosqliteWrapper = { source = "${pkgs.x2goserver}/lib/x2go/libx2go-server-db-sqlite3-wrapper.pl"; source = "${cfg.package}/lib/x2go/libx2go-server-db-sqlite3-wrapper.pl"; owner = "x2go"; group = "x2go"; setuid = false; setgid = true; }; security.wrappers.x2goprintWrapper = { source = "${pkgs.x2goserver}/bin/x2goprint"; source = "${cfg.package}/bin/x2goprint"; owner = "x2go"; group = "x2go"; setuid = false; Loading @@ -123,7 +132,7 @@ in # x2goclient sends SSH commands with preset PATH set to # "/usr/local/bin;/usr/bin;/bin". Since we cannot filter arbitrary ssh # commands, we have to make the following executables available. map (f: "L+ /usr/local/bin/${f} - - - - ${x2goserver}/bin/${f}") [ map (f: "L+ /usr/local/bin/${f} - - - - ${cfg.package}/bin/${f}") [ "x2goagent" "x2gobasepath" "x2gocleansessions" Loading Loading @@ -173,7 +182,7 @@ in unitConfig.Documentation = "man:x2goserver.conf(5)"; serviceConfig = { Type = "forking"; ExecStart = "${pkgs.x2goserver}/bin/x2gocleansessions"; ExecStart = "${cfg.package}/bin/x2gocleansessions"; PIDFile = "/run/x2go/x2goserver.pid"; User = "x2go"; Group = "x2go"; Loading @@ -184,10 +193,10 @@ in if [ ! -e /var/lib/x2go/setup_ran ] then mkdir -p /var/lib/x2go/conf cp -r ${pkgs.x2goserver}/etc/x2go/* /var/lib/x2go/conf/ cp -r ${cfg.package}/etc/x2go/* /var/lib/x2go/conf/ ln -sf ${x2goServerConf} /var/lib/x2go/conf/x2goserver.conf ln -sf ${x2goAgentOptions} /var/lib/x2go/conf/x2goagent.options ${pkgs.x2goserver}/bin/x2godbadmin --createdb ${cfg.package}/bin/x2godbadmin --createdb touch /var/lib/x2go/setup_ran fi ''; Loading