2022-11-10 20:24:59 +01:00
|
|
|
# a password-generator using the marokov model
|
2023-11-07 22:00:00 +01:00
|
|
|
{ config, lib, ... }:
|
2022-11-10 20:24:59 +01:00
|
|
|
let
|
|
|
|
cfg = config.my.services.passworts;
|
2023-11-07 23:13:51 +01:00
|
|
|
inherit (config.networking) domain;
|
2022-11-10 20:24:59 +01:00
|
|
|
in
|
|
|
|
{
|
|
|
|
options.my.services.passworts = with lib; {
|
2025-02-25 23:53:44 +01:00
|
|
|
enable = mkEnableOption "Passwords Server";
|
2022-11-10 20:24:59 +01:00
|
|
|
port = mkOption {
|
|
|
|
type = types.port;
|
|
|
|
default = 5010;
|
|
|
|
example = 8080;
|
|
|
|
description = "Internal port for webui";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
services.passworts = {
|
|
|
|
enable = true;
|
|
|
|
inherit (cfg) port;
|
|
|
|
};
|
|
|
|
|
2025-01-26 00:34:16 +01:00
|
|
|
my.services.webserver.virtualHosts = [
|
2022-11-10 20:24:59 +01:00
|
|
|
{
|
|
|
|
subdomain = "passworts";
|
|
|
|
inherit (cfg) port;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
webapps.apps.passworts = {
|
|
|
|
dashboard = {
|
|
|
|
name = "Passworts";
|
|
|
|
category = "other";
|
|
|
|
icon = "lock";
|
2023-11-12 20:39:44 +01:00
|
|
|
url = "https://passworts.${domain}";
|
2022-11-10 20:24:59 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|