20 Commits
Author SHA1 Message Date
sternenseemann 2b6bde5a53 cgit: 1.2.3 -> 1.3
https://lists.zx2c4.com/pipermail/cgit/2026-February/004968.html

The NixOS modules for cgit now also serve the new cgit.js file.
Note that the modules will always serve it even if the user disables
js, but that's probably fine.
2026-02-25 13:36:52 +01:00
Martin Fischer 98db29967f nixos/cgit: make checkExportOkFiles not nullable again
When I introduced the checkExportOkFiles option in
a722a999d1 I missed `(cfg.settings ? strict-export)`
in the assertions. This was fixed in bf9ccd1a68
but that also made the option nullable (which is confusing for a required option)
and introduced a small type error. This now makes the option not nullable again
and also fixes the type error.

Fixes #478320.
2026-01-14 17:46:15 +01:00
benaryorg bf9ccd1a68 nixos/cgit: handle unset strict-export option
The new export check mechanic introduced in #475112 does check whether or not the `strict-export` setting is set for *cgit* to catch configurations with lacking or superfluous options.
This change ensures that the assert statements do not cause evaluation errors when the setting is absent.
Instead the absense is handled appropriately for each assert.
When the option is required to be set to a specific value it will cause the assertion to fail, thereby displaying the assertion message rather than an evaluation error.
In case the option is required to be unset it may now be either null or unset, instead of failing the evaluation.

As an example, prior to this commit having `checkExportOkFiles` set to false, and `strict-export` entirely unset did fail the evaluation of the assert.
Now this is a valid pattern, meaning users who want to allow access to all repositories need only specify `checkExportOkFiles = false`, and can leave `strict-export` unset.

Signed-off-by: benaryorg <binary@benary.org>
2026-01-05 15:38:13 +00:00
Martin Fischer a722a999d1 nixos/cgit: add gitHttpBackend options 2026-01-03 14:24:24 +01:00
Axel Karjalainen d634694bdd nixos/cgit: use alias option for assets
This makes it easier to replace an asset by just setting the Nginx
virtual host's `locations."= robots.txt".alias`. Previously you had to
either replace the extraConfig with mkForce or clear it and use the
`alias` option.
2025-07-29 15:20:24 +03:00
Peder Bergebakken Sundt 953f72e76e nixos/*: tag manpage references 2025-01-27 02:47:01 +01:00
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Felix BuehlerandJörg Thalheim 87c989da08 nixos/services.cgit: remove with lib; 2024-09-15 10:43:52 +02:00
euxaneandBjørn Forsman 1768115589 nixos/cgit: handle list setting type
The cgitrc file allows list of values to be set for some keys as
multiple definition lines.

This allows setting multiple "css" files to include or multiple
"readme" branch and file lookup paths to be set.
2024-08-19 08:13:49 +02:00
4f2da6c9c1 nixos/fcgiwrap: add option migration instruction errors
This adds migration instructions for the removed global shared instance
configuration of fcgiwrap.

Adding those explicit messages to the previous options requires moving
the newly defined options from `services.fcgiwrap.*` to
`services.fcgiwrap.instances.*` due to an option namespace clash.

`mkRenamedOptionModule` was not used because the previous options do
not directly map to the new ones. In particular, `user` and `group`
were described as setting the socket's permission, but were actually
setting the process' running user.

Co-authored-by: Minijackson <minijackson@riseup.net>
2024-07-31 11:02:37 +02:00
euxane 3d10deb7a5 nixos/cgit: fix GIT_PROJECT_ROOT ownership
The GIT_PROJECT_ROOT directory is now created at runtime instead of
being assembled at build time.

This fixes ownership issues which prevented those repositories to be
read by users other than root. This also avoids creating symlinks in
the nix store pointing to the outside.
2024-06-22 19:45:25 +02:00
euxane 2d8626bf0a nixos/cgit: configurable user instead of root
This allows running cgit instances using dedicated users instead of
root. This is now set to "cgit" by default.
2024-06-22 19:45:25 +02:00
euxane c5dc3e2034 nixos/fcgiwrap: adapt consumer modules and tests 2024-06-22 19:45:25 +02:00
euxane 8101ae41f8 nixos/fcgiwrap: adapt consumer modules and tests 2024-06-22 19:45:25 +02:00
euxane bf2ad6f48c nixos/fcgiwrap: adapt consumer modules and tests
This also fixes the gitolite-fcgiwrap test by running git through
fcgiwrap as the proper user.
2024-06-22 19:45:25 +02:00
stuebinmandJonathan Ringer 6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
h7x4 79d3d59f58 treewide: replace mkPackageOptionMD with mkPackageOption 2023-11-30 19:03:14 +01:00
schnusch 8980fdd9b5 nixos/cgit: fix \v and \f in regexEscape 2023-07-14 21:14:01 +02:00
schnusch 45f06d9712 nixos/cgit: add package option 2023-01-31 12:13:56 +01:00
schnusch 218c7795a6 nixos/cgit: init 2023-01-31 12:06:12 +01:00