From 735dfab194c7809d018cfbb1ea62cce429de06a3 Mon Sep 17 00:00:00 2001 From: niten Date: Wed, 17 Jan 2024 14:12:39 -0800 Subject: [PATCH] Need to put config in `nixos` --- mastodon-container.nix | 44 ++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/mastodon-container.nix b/mastodon-container.nix index 667e694..84e78e1 100644 --- a/mastodon-container.nix +++ b/mastodon-container.nix @@ -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; }; }; };