diff options
author | a-kenji <aks.kenji@protonmail.com> | 2022-09-12 10:34:55 +0200 |
---|---|---|
committer | Yt <happysalada@proton.me> | 2022-09-12 18:39:54 -0400 |
commit | 5519e1b89bf02443b056fac9acf5f6d607bb622f (patch) | |
tree | 144982564ebcc2185321b0144f2bd8826f549865 /nixos/modules/services/web-apps/lemmy.nix | |
parent | fdabbea239e9bbe723df31fb93adb3fdb0bf3f9a (diff) | |
download | nixlib-5519e1b89bf02443b056fac9acf5f6d607bb622f.tar nixlib-5519e1b89bf02443b056fac9acf5f6d607bb622f.tar.gz nixlib-5519e1b89bf02443b056fac9acf5f6d607bb622f.tar.bz2 nixlib-5519e1b89bf02443b056fac9acf5f6d607bb622f.tar.lz nixlib-5519e1b89bf02443b056fac9acf5f6d607bb622f.tar.xz nixlib-5519e1b89bf02443b056fac9acf5f6d607bb622f.tar.zst nixlib-5519e1b89bf02443b056fac9acf5f6d607bb622f.zip |
nixos/lemmy: remove `services.lemmy.jwtSecretPath`
Co-authored-by: Ctem <c@ctem.me> Co-authored-by: Brian Leung <leungbk@posteo.net> Co-authored-by: Shahar Dawn Or <mightyiampresence@gmail.com> Co-authored-by: Ilan Joselevich <personal@ilanjoselevich.com>
Diffstat (limited to 'nixos/modules/services/web-apps/lemmy.nix')
-rw-r--r-- | nixos/modules/services/web-apps/lemmy.nix | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/nixos/modules/services/web-apps/lemmy.nix b/nixos/modules/services/web-apps/lemmy.nix index 1f2168b2a4c6..1945c8291433 100644 --- a/nixos/modules/services/web-apps/lemmy.nix +++ b/nixos/modules/services/web-apps/lemmy.nix @@ -10,15 +10,14 @@ in # `pandoc lemmy.md -t docbook --top-level-division=chapter --extract-media=media -f markdown+smart > lemmy.xml` meta.doc = ./lemmy.xml; + imports = [ + (mkRemovedOptionModule [ "services" "lemmy" "jwtSecretPath" ] "As of v0.13.0, Lemmy auto-generates the JWT secret.") + ]; + options.services.lemmy = { enable = mkEnableOption (lib.mdDoc "lemmy a federated alternative to reddit in rust"); - jwtSecretPath = mkOption { - type = types.path; - description = lib.mdDoc "Path to read the jwt secret from."; - }; - ui = { port = mkOption { type = types.port; @@ -168,18 +167,14 @@ in requires = lib.optionals cfg.settings.database.createLocally [ "lemmy-postgresql.service" ]; - # script is needed here since loadcredential is not accessible on ExecPreStart script = '' ${pkgs.coreutils}/bin/install -m 600 ${settingsFormat.generate "config.hjson" cfg.settings} /run/lemmy/config.hjson - jwtSecret="$(< $CREDENTIALS_DIRECTORY/jwt_secret )" - ${pkgs.jq}/bin/jq ".jwt_secret = \"$jwtSecret\"" /run/lemmy/config.hjson | ${pkgs.moreutils}/bin/sponge /run/lemmy/config.hjson ${pkgs.lemmy-server}/bin/lemmy_server ''; serviceConfig = { DynamicUser = true; RuntimeDirectory = "lemmy"; - LoadCredential = "jwt_secret:${cfg.jwtSecretPath}"; }; }; |