1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-26 21:19:45 +01:00

opensnitch-ui: add module

This commit is contained in:
Jonas Heinrich 2021-09-20 21:13:20 +02:00 committed by Robert Helgesson
parent 543484d298
commit 3d46c011d2
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
5 changed files with 55 additions and 1 deletions

2
.github/CODEOWNERS vendored
View file

@ -304,6 +304,8 @@
/modules/services/notify-osd.nix @imalison /modules/services/notify-osd.nix @imalison
/modules/services/opensnitch-ui.nix @onny
/modules/services/pantalaimon.nix @jojosch /modules/services/pantalaimon.nix @jojosch
/tests/modules/services/pantalaimon @jojosch /tests/modules/services/pantalaimon @jojosch

View file

@ -133,11 +133,16 @@
github = "hawkw"; github = "hawkw";
githubId = 2796466; githubId = 2796466;
}; };
pamplemousse = { pamplemousse = {
name = "Xavier Maso"; name = "Xavier Maso";
email = "xav.maso@gmail.com"; email = "xav.maso@gmail.com";
github = "pamplemousse"; github = "pamplemousse";
githubId = 2647236; githubId = 2647236;
}; };
onny = {
name = "onny";
email = "onny@project-insanity.org";
github = "onny";
githubId = 757752;
};
} }

View file

@ -2312,6 +2312,14 @@ in
A new module is available: 'services.gromit-mpx'. A new module is available: 'services.gromit-mpx'.
''; '';
} }
{
time = "2021-12-12T17:09:38+00:00";
condition = hostPlatform.isLinux;
message = ''
A new module is available: 'services.opensnitch-ui'.
'';
}
]; ];
}; };
} }

View file

@ -196,6 +196,7 @@ let
./services/network-manager-applet.nix ./services/network-manager-applet.nix
./services/nextcloud-client.nix ./services/nextcloud-client.nix
./services/notify-osd.nix ./services/notify-osd.nix
./services/opensnitch-ui.nix
./services/owncloud-client.nix ./services/owncloud-client.nix
./services/pantalaimon.nix ./services/pantalaimon.nix
./services/parcellite.nix ./services/parcellite.nix

View file

@ -0,0 +1,38 @@
{ 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 = {
Environment = "PATH=${config.home.profileDirectory}/bin";
ExecStart = "${pkgs.opensnitch-ui}/bin/opensnitch-ui";
};
Install = { WantedBy = [ "graphical-session.target" ]; };
};
};
}