From 6dbeea0b40c4f82e827c09c78c9e4970080c1692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Thu, 10 Jun 2021 07:00:05 +0200 Subject: [PATCH] nixos/x2goserver: put into networking, like xrdp --- nixos/modules/module-list.nix | 2 +- .../networking}/x2goserver.nix | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) rename nixos/modules/{programs => services/networking}/x2goserver.nix (92%) diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index b350bcfedae1..2938f79fb16a 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -198,7 +198,6 @@ ./programs/waybar.nix ./programs/wireshark.nix ./programs/wshowkeys.nix - ./programs/x2goserver.nix ./programs/xfs_quota.nix ./programs/xonsh.nix ./programs/xss-lock.nix @@ -854,6 +853,7 @@ ./services/networking/xandikos.nix ./services/networking/xinetd.nix ./services/networking/xl2tpd.nix + ./services/networking/x2goserver.nix ./services/networking/xrdp.nix ./services/networking/yggdrasil.nix ./services/networking/zerobin.nix diff --git a/nixos/modules/programs/x2goserver.nix b/nixos/modules/services/networking/x2goserver.nix similarity index 92% rename from nixos/modules/programs/x2goserver.nix rename to nixos/modules/services/networking/x2goserver.nix index 05707a56542f..6d6151f0f4be 100644 --- a/nixos/modules/programs/x2goserver.nix +++ b/nixos/modules/services/networking/x2goserver.nix @@ -3,7 +3,7 @@ with lib; let - cfg = config.programs.x2goserver; + cfg = config.services.x2goserver; defaults = { superenicer = { enable = cfg.superenicer.enable; }; @@ -17,7 +17,11 @@ let ''; in { - options.programs.x2goserver = { + imports = [ + (mkAliasOptionModule [ "programs" "x2goserver" "enable" ] [ "services" "x2goserver" "enable" ]) + ]; + + options.services.x2goserver = { enable = mkEnableOption "x2goserver" // { description = '' Enables the x2goserver module. @@ -63,6 +67,14 @@ in { config = mkIf cfg.enable { + # x2goserver can run X11 program even if "services.xserver.enable = false" + xdg = { + autostart.enable = true; + menus.enable = true; + mime.enable = true; + icons.enable = true; + }; + environment.systemPackages = [ pkgs.x2goserver ]; users.groups.x2go = {};