at 23.11-pre 617 B view raw
1{ config, lib, pkgs, ... }: 2 3with lib; 4 5let 6 cfg = config.programs.ausweisapp; 7in 8{ 9 options.programs.ausweisapp = { 10 enable = mkEnableOption (lib.mdDoc "AusweisApp2"); 11 12 openFirewall = mkOption { 13 description = lib.mdDoc '' 14 Whether to open the required firewall ports for the Smartphone as Card Reader (SaC) functionality of AusweisApp2. 15 ''; 16 default = false; 17 type = lib.types.bool; 18 }; 19 }; 20 21 config = mkIf cfg.enable { 22 environment.systemPackages = with pkgs; [ AusweisApp2 ]; 23 networking.firewall.allowedUDPPorts = lib.optionals cfg.openFirewall [ 24727 ]; 24 }; 25}