2021-09-20 21:13:20 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.services.opensnitch-ui;
|
|
|
|
|
|
|
|
in {
|
|
|
|
|
|
|
|
meta.maintainers = [ maintainers.onny ];
|
|
|
|
|
|
|
|
options = {
|
|
|
|
services.opensnitch-ui = { enable = mkEnableOption "Opensnitch client"; };
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
assertions = [
|
|
|
|
(lib.hm.assertions.assertPlatform "services.opensnitch-ui" pkgs
|
|
|
|
lib.platforms.linux)
|
|
|
|
];
|
|
|
|
|
|
|
|
systemd.user.services.opensnitch-ui = {
|
|
|
|
Unit = {
|
|
|
|
Description = "Opensnitch ui";
|
|
|
|
After = [ "graphical-session-pre.target" ];
|
|
|
|
PartOf = [ "graphical-session.target" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
Service = {
|
2024-09-19 18:18:36 +02:00
|
|
|
Environment = [ "PATH=${config.home.profileDirectory}/bin" ];
|
2021-09-20 21:13:20 +02:00
|
|
|
ExecStart = "${pkgs.opensnitch-ui}/bin/opensnitch-ui";
|
|
|
|
};
|
|
|
|
|
|
|
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|