X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Ftools%2Fmastodon%2Fdefault.nix;h=173a4b841b14e649dd802ad188322950e25dcb7f;hb=5315b439af1f72c3282549508ae58d86d66e38ec;hp=cea8710451db0e1ac6ccd65a4d2f7b394f327221;hpb=da30ae4ffdd153a1eb32fb86f9ca9a65aa19e4e2;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/websites/tools/mastodon/default.nix b/modules/private/websites/tools/mastodon/default.nix index cea8710..173a4b8 100644 --- a/modules/private/websites/tools/mastodon/default.nix +++ b/modules/private/websites/tools/mastodon/default.nix @@ -1,7 +1,7 @@ { lib, pkgs, config, ... }: let env = config.myEnv.tools.mastodon; - root = "/run/current-system/webapps/tools_mastodon"; + root = "${mcfg.workdir}/public/"; cfg = config.myServices.websites.tools.mastodon; mcfg = config.services.mastodon; in { @@ -10,11 +10,7 @@ in { }; config = lib.mkIf cfg.enable { - services.duplyBackup.profiles.mastodon = { - rootDir = mcfg.dataDir; - }; - secrets.keys = [{ - dest = "webapps/tools-mastodon"; + secrets.keys."webapps/tools-mastodon" = { user = "mastodon"; group = "mastodon"; permissions = "0400"; @@ -59,7 +55,7 @@ in { LDAP_UID="uid" LDAP_SEARCH_FILTER="${env.ldap.filter}" ''; - }]; + }; services.mastodon = { enable = true; configFile = config.secrets.fullPaths."webapps/tools-mastodon"; @@ -83,10 +79,6 @@ in { services.websites.env.tools.modules = [ "headers" "proxy" "proxy_wstunnel" "proxy_http" ]; - system.extraSystemBuilderCmds = '' - mkdir -p $out/webapps - ln -s ${mcfg.workdir}/public/ $out/webapps/tools_mastodon - ''; services.websites.env.tools.vhostConfs.mastodon = { certName = "eldiron"; addToCerts = true;