mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 01:44:40 +02:00
passwords: integrate flake
This commit is contained in:
parent
478cb89157
commit
33cc73c0b7
1 changed files with 40 additions and 0 deletions
40
modules/services/passworts/default.nix
Normal file
40
modules/services/passworts/default.nix
Normal file
|
@ -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}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue