add appgate with overlay and wrapper

This commit is contained in:
Tyler Starr 2024-11-12 10:09:03 -08:00
parent 1b065d5687
commit c33125ae05
3 changed files with 38 additions and 1 deletions

View File

@ -25,7 +25,6 @@
docker-compose
podman-tui
dive
appgate-sdp
];
# Modules
@ -37,6 +36,7 @@
programs = {
chezmoi.apply = true;
kitty.enable = true;
appgate-sdp.enable = true;
};
services = {
peripherals.enable = true;

View File

@ -0,0 +1,36 @@
{ config, lib, pkgs, user, ... }:
let cfg = config.modules.programs.appgate-sdp;
in {
options.modules.programs.appgate-sdp.enable = lib.mkEnableOption "appgate-sdp";
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
appgate-sdp
(pkgs.writeScriptBin "appgate-sdp-wrapped" ''
#!/bin/sh
appgate
sudo systemctl restart resolvconf.service
'')
];
home-manager.users.${user} = {
# Custom entry that uses wrapped binary
xdg.desktopEntries.appgate = {
name="Appgate SDP";
exec="pkexec appgate-sdp-wrapped";
icon="appgate-icon";
terminal = false;
type = "Application";
mimeType= ["x-scheme-handler/appgate"];
categories= ["Network"];
};
};
boot.kernelModules = [ "tun" ];
services.dbus.packages = [ pkgs.appgate-sdp ];
systemd = {
packages = [ pkgs.appgate-sdp ];
# https://github.com/NixOS/nixpkgs/issues/81138
services.appgatedriver.wantedBy = [ "multi-user.target" ];
};
};
}

View File

@ -1,6 +1,7 @@
{ ... }:
{
imports = [
./appgate-sdp.nix
./beancount.nix
./chrome
./firefox