Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions nixos/modules/services/misc/ankisyncd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
Expand Down