Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forgejo: locales are missing from the source tree #390590

Closed
3 tasks done
soulwhisper opened this issue Mar 17, 2025 · 11 comments
Closed
3 tasks done

Forgejo: locales are missing from the source tree #390590

soulwhisper opened this issue Mar 17, 2025 · 11 comments
Labels
0.kind: bug Something is broken

Comments

@soulwhisper
Copy link

Nixpkgs version

  • Stable (24.11)

Describe the bug

forgejo v10.0.1 failed to start, report

01 ...rvices/cron/tasks.go:210:RegisterTaskFatal() [F] Unable to register cron task update_mirrors Error: translation is missing for task "update_mirrors", please add translation for "admin.dashboard.update_mirrors"

related solution method could be link.

Steps to reproduce

fresh install

Expected behaviour

service init should have no errors and be functional.

Screenshots

No response

Relevant log output

Additional context

No response

System metadata

  • system: "x86_64-linux"
  • host os: Linux 6.6.76, NixOS, 24.11 (Vicuna), 24.11.20250316.a1185f4
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.24.12
  • nixpkgs: /nix/store/l75sdw6vydkwaa6cfrf33h2pnzikpxm8-source

Notify maintainers

@emilylange @urandom2 @bendlas @adamcstephens @NyCodeGHG @pyrox0


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

@soulwhisper soulwhisper added the 0.kind: bug Something is broken label Mar 17, 2025
@soulwhisper soulwhisper changed the title Forgejo Forgejo: locales are missing from the source tree Mar 17, 2025
@eclairevoyant
Copy link
Contributor

@adamcstephens
Copy link
Contributor

I wouldn't trust the gitea docs to be appropriate for forgejo any longer. The relevant link would be:

https://forgejo.org/docs/next/contributor/from-source/

Also the originally linked issue is here, there's no reason to go through the (somewhat slow) Internet Archive for it.

@emilylange
Copy link
Member

Also, this sounds like you are trying to run Forgejo on NixOS without using the nixos/forgejo module (services.forgejo).
Please use the provided NixOS module instead of running the bare executable from the CLI.

See https://search.nixos.org/options?query=services.forgejo.

In case my guess is wrong, please share the bits of your NixOS configuration that use services.forgejo. There might be some misconfiguration or footgun we can improve upon and fix.

@soulwhisper
Copy link
Author

@emilylange my config here.

@emilylange
Copy link
Member

Remove services.forgejo.settings.server.STATIC_ROOT_PATH and this will fix your issue.

Also, you probably don't need

systemd.tmpfiles.rules = [
  "d ${cfg.dataDir} 0755 appuser appuser - -"
];

either, given the NixOS module sets

"d '${cfg.stateDir}' 0750 ${cfg.user} ${cfg.group} - -"

If I may ask, what made you want to set STATIC_ROOT_PATH in the first place?

@soulwhisper
Copy link
Author

soulwhisper commented Mar 19, 2025

@emilylange I am moving all my apps to some dir like '/{zfs-pool}/apps/appname' for backup. so may be I need to change related ROOT in such service? Thank you for your help.

EDIT: As adamcstephens replied below, I suggest hiding misleading or unnecessary configurations from users. In the first place, this option suggests that its example is '/var/lib/forgejo/data'.

@adamcstephens
Copy link
Contributor

I would expect that changing stateDir alone should be sufficient to change location where forgejo stores its data.

@emilylange perhaps we should warn on setting of STATIC_ROOT_PATH? It's not clear to me why users would need to change this?

STATIC_ROOT_PATH: StaticRootPath: Upper level of template and static files path.

@mweinelt
Copy link
Member

@emilylange I am moving all my apps to some dir like '/{zfs-pool}/apps/appname' for backup. so may be I need to change related ROOT in such service? Thank you for your help.

Just (bind?) mount your ZFS dataset on top of the state directory in that case.

@soulwhisper
Copy link
Author

soulwhisper commented Mar 19, 2025

@mweinelt Believe me I made research about directory changing. bind/bindfs is slow. overlayfs is better but complicated for my goals. rewrite a little bit systemd services with a specific app user is just fine. A staging vm example config here.

@mweinelt
Copy link
Member

There is no need to bind-mount if you can just use a regular mount, as implied by my previous post.

@adamcstephens
Copy link
Contributor

zfs set mountpoint=/var/lib/forgejo yourpool/yourdataset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

5 participants