setup mealie
This commit is contained in:
@@ -19,5 +19,6 @@
|
||||
./dnote.nix
|
||||
./octodns.nix
|
||||
./adguardhome.nix
|
||||
./mealie.nix
|
||||
];
|
||||
}
|
||||
|
||||
35
modules/services/mealie.nix
Normal file
35
modules/services/mealie.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.services.mealie;
|
||||
fqdn = "${cfg.subdomain}.${config.networking.domain}";
|
||||
in
|
||||
{
|
||||
options.services.mealie = {
|
||||
subdomain = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services = {
|
||||
mealie.settings = {
|
||||
BASE_URL = "https://${fqdn}";
|
||||
ALLOW_SIGNUP = true;
|
||||
DB_ENGINE = "postgres";
|
||||
POSTGRES_URL_OVERRIDE = "postgresql://mealie:@mealie?host=/var/run/postgresql";
|
||||
SMTP_FROM_NAME = "Mealie";
|
||||
};
|
||||
|
||||
webserver.vHosts.${fqdn}.locations."/".proxyPort = cfg.port;
|
||||
|
||||
postgresql = {
|
||||
enable = lib.mkDefault true;
|
||||
ensureDatabases = [ "mealie" ];
|
||||
ensureUsers = [{
|
||||
name = "mealie";
|
||||
ensureDBOwnership = true;
|
||||
}];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user