Need to put config in `nixos`

This commit is contained in:
niten 2024-01-17 14:12:39 -08:00
parent b17fbcd75e
commit 735dfab194
1 changed files with 23 additions and 21 deletions

View File

@ -74,7 +74,6 @@ in {
project.name = "mastodon";
services = {
mastodon = { pkgs, ... }: {
useSystemd = true;
service = {
restart = "always";
volumes = [
@ -83,27 +82,30 @@ in {
"mastodon-data:/var/lib/mastodon"
];
};
configuration = {
boot.tmp.useTmpfs = true;
system.nssModules = mkForce [ ];
services = {
nscd.enable = false;
postgresql.enable = true;
mastodon = {
enable = true;
webPort = cfg.port;
localDomain = cfg.domain;
extraEnvFiles = cfg.environment-files;
smtp = {
inherit (cfg.smtp) host port user;
fromAddress = cfg.smtp.from-address;
authenticate = !isNull cfg.smtp.password-file;
passwordFile = cfg.smtp.password-file;
nixos = {
useSystemd = true;
configuration = {
boot.tmp.useTmpfs = true;
system.nssModules = mkForce [ ];
services = {
nscd.enable = false;
postgresql.enable = true;
mastodon = {
enable = true;
webPort = cfg.port;
localDomain = cfg.domain;
extraEnvFiles = cfg.environment-files;
smtp = {
inherit (cfg.smtp) host port user;
fromAddress = cfg.smtp.from-address;
authenticate = !isNull cfg.smtp.password-file;
passwordFile = cfg.smtp.password-file;
};
redis.createLocally = true;
database.createLocally = true;
configureNginx = true;
automaticMigrations = true;
};
redis.createLocally = true;
database.createLocally = true;
configureNginx = true;
automaticMigrations = true;
};
};
};