Restructure to focus on nix.

This commit is contained in:
Lorenzo Good 2025-06-04 01:13:22 -05:00
parent 6952570818
commit 588fdbd9f2
Signed by: lorenzo
GPG key ID: 7FCD64BD81180ED0
19 changed files with 4 additions and 25 deletions

View file

@ -1,51 +0,0 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib) mkEnableOption mkIf mkOption;
cfg = config.foehammer.services.vaultwarden;
in {
options.foehammer.services.vaultwarden = {
enable = mkEnableOption "Enable Vaultwarden Server";
port = mkOption {
type = lib.types.port;
default = 8222;
description = ''
What external port to serve over.
'';
};
signups = mkOption {
type = lib.types.bool;
default = false;
};
envPath = mkOption {
type = lib.types.path;
};
domain = mkOption {
type = lib.types.str;
};
};
config = mkIf cfg.enable {
services.vaultwarden = {
enable = true;
config = {
ROCKET_ADDRESS = "127.0.0.1";
ROCKET_PORT = cfg.port;
DOMAIN = cfg.domain;
ROCKET_LOG = "critical";
SIGNUPS_ALLOWED = cfg.signups;
};
environmentFile = cfg.envPath;
};
};
}