2022-09-11 15:47:08 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.ausweisapp;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.programs.ausweisapp = {
|
2024-05-15 15:35:15 +00:00
|
|
|
enable = lib.mkEnableOption "AusweisApp";
|
2022-09-11 15:47:08 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
openFirewall = lib.mkOption {
|
2024-04-21 15:54:59 +00:00
|
|
|
description = ''
|
2023-11-16 04:20:00 +00:00
|
|
|
Whether to open the required firewall ports for the Smartphone as Card Reader (SaC) functionality of AusweisApp.
|
2022-09-11 15:47:08 +00:00
|
|
|
'';
|
|
|
|
default = false;
|
|
|
|
type = lib.types.bool;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
config = lib.mkIf cfg.enable {
|
2023-11-16 04:20:00 +00:00
|
|
|
environment.systemPackages = with pkgs; [ ausweisapp ];
|
2022-09-11 15:47:08 +00:00
|
|
|
networking.firewall.allowedUDPPorts = lib.optionals cfg.openFirewall [ 24727 ];
|
|
|
|
};
|
|
|
|
}
|