xembed-sni-proxy: add module

This commit is contained in:
Robert Helgesson 2019-01-26 14:18:07 +01:00
parent 601619660d
commit 008d93928f
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
3 changed files with 58 additions and 0 deletions

View file

@ -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'.
'';
}
];
};
}

View file

@ -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 { })

View file

@ -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";
};
};
};
}