diff --git a/provision/hosts/osprey/configuration.nix b/provision/hosts/osprey/configuration.nix index f2de722d..efb9d4fd 100644 --- a/provision/hosts/osprey/configuration.nix +++ b/provision/hosts/osprey/configuration.nix @@ -25,7 +25,8 @@ docker-compose podman-tui dive - appgate-sdp + uhd + gnuradio ]; # Modules @@ -33,19 +34,16 @@ desktop = { enable = true; gnome.enable = true; - peripherals.enable = true; }; programs = { + appgate-sdp.enable = true; chezmoi.apply = true; kitty.enable = true; virt-manager.enable = true; }; services = { samba-client.enable = true; - }; - system = { ssh.enable = true; - terminal.enable = true; }; }; } diff --git a/provision/modules/programs/appgate-sdp.nix b/provision/modules/programs/appgate-sdp.nix new file mode 100644 index 00000000..46ba7ac9 --- /dev/null +++ b/provision/modules/programs/appgate-sdp.nix @@ -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" ]; + }; + }; +} diff --git a/provision/modules/programs/default.nix b/provision/modules/programs/default.nix index 3604682d..c3beaee1 100644 --- a/provision/modules/programs/default.nix +++ b/provision/modules/programs/default.nix @@ -1,6 +1,7 @@ { ... }: { imports = [ + ./appgate-sdp.nix ./base-terminal.nix ./beancount.nix ./borg.nix