From 95ae96147d26d6f7b785f341ee5a222e6288ca11 Mon Sep 17 00:00:00 2001 From: padreug Date: Sat, 1 Nov 2025 11:29:35 +0100 Subject: [PATCH] Removes workaround for extension directory permissions Removes the systemd tmpfiles rule and service that attempted to fix permissions for extensions deployed to `/var/lib/lnbits/extensions`. This change is necessary because the initial approach of fixing permissions was not reliable and caused more issues than it solved. The intended approach is to provide a better method for managing extensions in a future update. --- config/lnbits.nix | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/config/lnbits.nix b/config/lnbits.nix index b3bb6fd..273755d 100644 --- a/config/lnbits.nix +++ b/config/lnbits.nix @@ -104,21 +104,12 @@ in # This will DELETE any extensions installed via the LNBits UI. # # Option 1: Replace extensions directory entirely (use with caution) - # Create symlink and fix ownership of deployed extensions - systemd.tmpfiles.rules = [ - "L+ /var/lib/lnbits/extensions - lnbits lnbits - /var/src/lnbits-extensions" - ]; - - # Fix ownership of deployed extensions (krops deploys as root:root) - systemd.services.lnbits-fix-extensions-ownership = { - description = "Fix ownership of deployed LNBits extensions"; - before = [ "lnbits.service" ]; - wantedBy = [ "lnbits.service" ]; - serviceConfig = { - Type = "oneshot"; - ExecStart = "${pkgs.coreutils}/bin/chown -R lnbits:lnbits /var/src/lnbits-extensions"; - }; - }; + # systemd.tmpfiles.rules = [ + # # Set permissions on source directory so lnbits user can read it + # "d /var/src/lnbits-extensions 0755 lnbits lnbits - -" + # # Create symlink with proper ownership + # "L+ /var/lib/lnbits/extensions - lnbits lnbits - /var/src/lnbits-extensions" + # ]; # # Option 2: Manually merge deployed extensions with existing ones # Copy deployed extensions into the extensions directory without replacing it: