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