aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/misc/news.nix8
-rw-r--r--modules/modules.nix1
-rw-r--r--modules/services/xembed-sni-proxy.nix49
3 files changed, 58 insertions, 0 deletions
diff --git a/modules/misc/news.nix b/modules/misc/news.nix
index fe48aa1f03e..203f524995b 100644
--- a/modules/misc/news.nix
+++ b/modules/misc/news.nix
@@ -936,6 +936,14 @@ in
A new module is available: 'programs.matplotlib'.
'';
}
+
+ {
+ time = "2019-01-26T13:20:37+00:00";
+ condition = hostPlatform.isLinux;
+ message = ''
+ A new module is available: 'services.xembed-sni-proxy'.
+ '';
+ }
];
};
}
diff --git a/modules/modules.nix b/modules/modules.nix
index 1ca4cee5014..1a4f3bb5e76 100644
--- a/modules/modules.nix
+++ b/modules/modules.nix
@@ -114,6 +114,7 @@ let
(loadModule ./services/window-managers/awesome.nix { })
(loadModule ./services/window-managers/i3.nix { })
(loadModule ./services/window-managers/xmonad.nix { })
+ (loadModule ./services/xembed-sni-proxy.nix { condition = hostPlatform.isLinux; })
(loadModule ./services/xscreensaver.nix { })
(loadModule ./systemd.nix { })
(loadModule ./xcursor.nix { })
diff --git a/modules/services/xembed-sni-proxy.nix b/modules/services/xembed-sni-proxy.nix
new file mode 100644
index 00000000000..0854365da13
--- /dev/null
+++ b/modules/services/xembed-sni-proxy.nix
@@ -0,0 +1,49 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+ cfg = config.services.xembed-sni-proxy;
+
+in
+
+{
+ meta.maintainers = [ maintainers.rycee ];
+
+ options = {
+ services.xembed-sni-proxy = {
+ enable = mkEnableOption "XEmbed SNI Proxy";
+
+ package = mkOption {
+ type = types.package;
+ default = pkgs.plasma-workspace;
+ defaultText = "pkgs.plasma-workspace";
+ description = ''
+ Package containing the <command>xembedsniproxy</command>
+ program.
+ '';
+ };
+ };
+ };
+
+ config = mkIf cfg.enable {
+ systemd.user.services.xembed-sni-proxy = {
+ Unit = {
+ Description = "XEmbed SNI Proxy";
+ After = [ "graphical-session-pre.target" ];
+ PartOf = [ "graphical-session.target" ];
+ };
+
+ Install = {
+ WantedBy = [ "graphical-session.target" ];
+ };
+
+ Service = {
+ Environment = "PATH=${config.home.profileDirectory}/bin";
+ ExecStart = "${cfg.package}/bin/xembedsniproxy";
+ Restart = "on-abort";
+ };
+ };
+ };
+}