diff --git a/nixos/modules/services/misc/ankisyncd.nix b/nixos/modules/services/misc/ankisyncd.nix index 7be8dc7dab8ff..5947d433126ef 100644 --- a/nixos/modules/services/misc/ankisyncd.nix +++ b/nixos/modules/services/misc/ankisyncd.nix @@ -48,6 +48,18 @@ in type = types.bool; description = lib.mdDoc "Whether to open the firewall for the specified port."; }; + + username = mkOption { + default = null; + type = types.nullOr types.str; + description = lib.mdDoc "Username of initial account."; + }; + + password = mkOption { + default = null; + type = types.nullOr types.str; + description = lib.mdDoc "Password of initial account."; + }; }; config = mkIf cfg.enable { @@ -59,6 +71,11 @@ in wantedBy = [ "multi-user.target" ]; path = [ cfg.package ]; + environment = { + ANKISYNCD_USERNAME = cfg.username; + ANKISYNCD_PASSWORD = cfg.password; + }; + serviceConfig = { Type = "simple"; DynamicUser = true;