From 33cc73c0b70637de672b0a485b8bcb95e053514c Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Thu, 10 Nov 2022 20:24:59 +0100 Subject: [PATCH] passwords: integrate flake --- modules/services/passworts/default.nix | 40 ++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 modules/services/passworts/default.nix diff --git a/modules/services/passworts/default.nix b/modules/services/passworts/default.nix new file mode 100644 index 0000000..d395bf1 --- /dev/null +++ b/modules/services/passworts/default.nix @@ -0,0 +1,40 @@ +# a password-generator using the marokov model +{ config, lib, pkgs, ... }: +let + cfg = config.my.services.passworts; + domain = config.networking.domain; +in +{ + options.my.services.passworts = with lib; { + enable = mkEnableOption "Navidrome Music Server"; + 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; + }; + + my.services.nginx.virtualHosts = [ + { + subdomain = "passworts"; + inherit (cfg) port; + } + ]; + + webapps.apps.passworts = { + dashboard = { + name = "Passworts"; + category = "other"; + icon = "lock"; + link = "https://passworts.${domain}"; + }; + }; + }; +}