Fix Pixelfed service

This commit is contained in:
Nicolas Jeannerod 2025-01-27 17:49:09 +01:00
parent e43296dce0
commit e4ad4e266c
Signed by untrusted user: Niols
GPG key ID: 35DB9EC8886E1CB8

View file

@ -13,6 +13,14 @@ in
}:
lib.mkIf (config.fediversity.enable && config.fediversity.pixelfed.enable) {
## Pixelfed as packaged in nixpkgs has a permission issue that prevents Nginx
## from being able to serving the images. We fix it here, but this should be
## upstreamed. See https://github.com/NixOS/nixpkgs/issues/235147
services.pixelfed.package = pkgs.pixelfed.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [ ./pixelfed-group-permissions.patch ];
});
services.garage = {
ensureBuckets = {
pixelfed = {
@ -61,6 +69,8 @@ lib.mkIf (config.fediversity.enable && config.fediversity.pixelfed.enable) {
};
};
users.users.nginx.extraGroups = [ "pixelfed" ];
services.pixelfed.settings = {
## NOTE: This depends on the targets, eg. universities might want control
## over who has an account. We probably want a universal