Commit Graph

2212 Commits

Author SHA1 Message Date
Pierre Bourdon
91a00709ae
Merge pull request #273219 from Lurkki14/tuxclocker-master
tuxclocker: init at 1.4.0
2023-12-17 17:30:18 +01:00
Jussi Kuokkanen
60cb6ee94f nixos/tuxclocker: init module 2023-12-17 18:16:45 +02:00
Gabriel Arazas
5fb40a5816
nixos/guix: remove Service.MemoryDenyWriteExecute for GC service
Guile 3 uses JIT needing write and execute permissions.
2023-12-12 10:19:37 +08:00
Peder Bergebakken Sundt
e43bbcfaec
Merge pull request #272557 from ambroisie/update-tandoor-recipes
tandoor-recipes: 1.5.6 -> 1.5.10
2023-12-09 03:12:36 +01:00
Gabriel Arazas
85fcb9b4ef
nixos/guix: fix user activation script 2023-12-08 17:56:54 +08:00
Bruno BELANYI
d23f965f8b nixos/tandoor-recipes: fix deprecated config key
See the 1.5.10 release notes [1].

[1]: https://github.com/TandoorRecipes/recipes/releases/tag/1.5.10
2023-12-07 19:12:15 +00:00
Nick Cao
c0443ea94c
Merge pull request #271869 from wentasah/redmine-assertions
nixos/redmine: Fix database assertions
2023-12-04 08:56:45 -05:00
Michal Sojka
8667baf161 nixos/redmine: Fix database assertions
Recent PR 266270[1] modified an assertion related to database settings
of the redmine service. There are two problems with that change:

1. Assert message was not updated to reflect the change in the assert
   condition.

2. The new condition applies only to postgresql, not the default
   mysql. Therefore, the assertion breaks existing mysql-based
   installations without any reason.

This commit fixes these by 1) reverting the modified assertion to the
previous value, making the message match the condition and 2) adding a
new assertion that applies only to postgresql.

[1]: https://github.com/NixOS/nixpkgs/pull/266270
2023-12-03 14:41:42 +01:00
Weijia Wang
f5f2b471f3
Merge pull request #271437 from martinetd/ankisyncd-deprecation
ankisyncd: mark module as deprecated
2023-12-03 14:35:57 +01:00
Weijia Wang
4e81387d5b
Merge pull request #264331 from foo-dogsquared/add-nixos-guix-module
nixos/guix: init
2023-12-03 13:03:43 +01:00
LDprg
6f33e6e4ab nixos/preload: fix log permission 2023-12-02 19:19:33 +01:00
Dominique Martinet
8a2c07ba40 ankisyncd: mark module as deprecated 2023-12-01 21:21:35 +09:00
Gabriel Arazas
ad277ea47e nixos/guix: init 2023-12-01 09:10:37 +01:00
Weijia Wang
07183914f1
Merge pull request #257692 from telotortium/anki-sync-server
nixos/anki-sync-server: init
2023-12-01 08:30:36 +01:00
h7x4
79d3d59f58
treewide: replace mkPackageOptionMD with mkPackageOption 2023-11-30 19:03:14 +01:00
Weijia Wang
b474de4779 nixos/anki-sync-server: minor cleanup 2023-11-30 17:32:03 +01:00
Robert Irelan
8fe9c18ed3 nixos/anki-sync-server: init
Provide a NixOS module for the [built-in Anki Sync
Server](https://docs.ankiweb.net/sync-server.html) included in recent
versions of Anki. This supersedes the `ankisyncd` module, but we should
keep that for now because `ankisyncd` supports older versions of Anki
clients than this module.
2023-11-30 17:25:17 +01:00
Weijia Wang
8c734937d6 nixos/sourcehut: fix eval 2023-11-30 02:52:50 +01:00
Weijia Wang
feeae486de
Merge pull request #261702 from h7x4/replace-mkoption-with-mkpackageoption
treewide: use `mkPackageOption`
2023-11-30 02:49:30 +01:00
tomberek
a2de752222
Merge pull request #267538 from nessdoor/pkgs/paste.sr.ht
sourcehut.pastesrht: add missing backend component
2023-11-28 12:40:09 -05:00
Nick Cao
e0ece67a97
Merge pull request #270256 from schmittlauch/gite-forgejo-migration-phrasing
nixos/forgejo docs: correct phrasing
2023-11-27 09:33:21 -05:00
Tomas Antonio Lopez
9e6f9c6d83 nixos/sourcehut: remove usages of 'with lib;'
Inherit library attributes at a finer granularity, instead.
2023-11-27 08:22:48 -03:00
Tomas Antonio Lopez
ba6817ed22 nixos/sourcehut: add myself as maintainer 2023-11-27 08:22:48 -03:00
Tomas Antonio Lopez
087c83f45c nixos/sourcehut: reformat expressions using nixpkgs-fmt 2023-11-27 08:22:48 -03:00
h7x4
0a37316d6c
treewide: use mkPackageOption
This commit replaces a lot of usages of `mkOption` with the package
type, to be `mkPackageOption`, in order to reduce the amount of code.
2023-11-27 01:28:36 +01:00
Trolli Schmittlauch
0e893a9f22 nixos/forgejo docs: correct phrasing 2023-11-26 21:43:32 +01:00
Maciej Krüger
b63af5d7ea
Merge pull request #265728 from nbraud/nixos/sudo-rs/ssm-agent 2023-11-26 21:37:15 +01:00
Lin Jian
5ba42a0de2
Merge pull request #260902 from LDprg/master
preload: init at 0.6.4
2023-11-25 23:29:40 -06:00
LDprg
a0f5d5e500 nixos/preload: init 2023-11-25 20:07:10 +01:00
Robert Hensing
779e50580c
Merge pull request #224611 from srhb/kafka-settings-module
Kafka: Settings and KRaft support
2023-11-23 17:35:29 +01:00
Sarah Brofeldt
cfe3ca1f2f nixos/apache-kafka: Add manual chapter 2023-11-22 06:47:09 +01:00
Sarah Brofeldt
45f84cdfd5 nixos/apache-kafka: structured settings
- Use lazyAttrs (for config references) settings for main server.properties.
- Drop dangerous default for "log.dirs"
- Drop apache-kafka homedir; unused and confusing
- Support formatting kraft logdirs
2023-11-22 06:47:08 +01:00
Mario Rodas
fa14a14694
Merge pull request #258036 from anthonyroussel/fix-ssm-seelog
nixos/amazon-ssm-agent: fix missing seelog.xml file
2023-11-19 18:55:57 -05:00
Nick Cao
d936414252
Merge pull request #268132 from bendlas/forgejo-release-notes
nixos/forgejo/docs: fix typo
2023-11-18 09:39:29 -05:00
emilylange
b3e8dae766 nixos/forgejo: remove postgresql_15 permission work-around
This is no longer necessary as of
ccfe07c316.

Previously: b8585a119c.
2023-11-18 12:14:09 +01:00
Ryan Lahfa
ccfe07c316
Merge pull request #266270 from Ma27/postgresql-ownership-15 2023-11-17 18:02:17 +01:00
Herwig Hochleitner
8c441fc2a7 nixos/forgejo/docs: fix typo 2023-11-17 17:18:57 +01:00
Herwig Hochleitner
20832d5995
nixos/forgejo: changelog and migration instructions (#267248)
* nixos/forgejo: changelog and migration instructions

* nixos/forgejo/docs: clarify sentence

Co-authored-by: Trolli Schmittlauch <schmittlauch@users.noreply.github.com>

* nixos/forgejo/docs: document migration via gitea impersonation

* nixos/forgejo/docs: note about url change on migration

* nixos/forgejo/docs: note about migration (non-)requirement

* nixos/forgejo/docs: header ids

* nixos/forgejo/docs: clarify release notes entry

Co-authored-by: Emily <git@emilylange.de>

* nixos/forgejo/docs: improve manual entry

Co-authored-by: Emily <git@emilylange.de>

* nixos/forgejo/docs: move changelog line to the middle of the section

as noted <!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->

---------

Co-authored-by: Trolli Schmittlauch <schmittlauch@users.noreply.github.com>
Co-authored-by: Emily <git@emilylange.de>
2023-11-17 15:55:24 +01:00
Raito Bezarius
7cd63bff21 nixos/sourcehut: do not use ensureDBOwnership
Given that SourceHut uses unfortunate defaults for database name, it will not
be realistic to fix this in time for 23.11.

We will leave the workaround and leave it to SourceHut maintainers to pick up the work
to clean this up after 23.11.
2023-11-17 15:52:51 +01:00
zzywysm
3f4c802d26 initrd/autofs4: remove legacy references to autofs4 kernel module
Back in 2018, the kernel decided to remove the autofs4 module.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a2225d931f75ddd3c39f4d0d195fad99dfd68671

This caused immediate problems with systemd, so the kernel allowed autofs4 as a config option that would simply map back to autofs.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d02d21ea007b6b33cdaf15c2f84fb1fea996ecc2

Earlier this year, in July 2023, the kernel got tired of people not adapting to the autofs change, and forced the issue by fixing it within the kernel defconfigs, which NixOS uses as a starting point for their own kernel configs.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1f2190d6b7112d22d3f8dfeca16a2f6a2f51444e

This commit reflects the post-2018 reality by changing the remaining autofs4 references to autofs. Since this change initially happened in kernel 4.18 and we no longer support 4.x kernels, we don't need any backwards-compatibility tweaks.
2023-11-14 15:37:50 -05:00
Tomas Antonio Lopez
5476b490d4 nixos/sourcehut: compile and integrate paste.sr.ht API component 2023-11-14 11:12:14 +01:00
Maximilian Bosch
48459567ae nixos/postgresql: drop ensurePermissions, fix ensureUsers for postgresql15
Closes #216989

First of all, a bit of context: in PostgreSQL, newly created users don't
have the CREATE privilege on the public schema of a database even with
`ALL PRIVILEGES` granted via `ensurePermissions` which is how most of
the DB users are currently set up "declaratively"[1]. This means e.g. a
freshly deployed Nextcloud service will break early because Nextcloud
itself cannot CREATE any tables in the public schema anymore.

The other issue here is that `ensurePermissions` is a mere hack. It's
effectively a mixture of SQL code (e.g. `DATABASE foo` is relying on how
a value is substituted in a query. You'd have to parse a subset of SQL
to actually know which object are permissions granted to for a user).

After analyzing the existing modules I realized that in every case with
a single exception[2] the UNIX system user is equal to the db user is
equal to the db name and I don't see a compelling reason why people
would change that in 99% of the cases. In fact, some modules would even
break if you'd change that because the declarations of the system user &
the db user are mixed up[3].

So I decided to go with something new which restricts the ways to use
`ensure*` options rather than expanding those[4]. Effectively this means
that

* The DB user _must_ be equal to the DB name.
* Permissions are granted via `ensureDBOwnerhip` for an attribute-set in
  `ensureUsers`. That way, the user is actually the owner and can
  perform `CREATE`.
* For such a postgres user, a database must be declared in
  `ensureDatabases`.

For anything else, a custom state management should be implemented. This
can either be `initialScript`, doing it manual, outside of the module or
by implementing proper state management for postgresql[5], but the
current state of `ensure*` isn't even declarative, but a convergent tool
which is what Nix actually claims to _not_ do.

Regarding existing setups: there are effectively two options:

* Leave everything as-is (assuming that system user == db user == db
  name): then the DB user will automatically become the DB owner and
  everything else stays the same.

* Drop the `createDatabase = true;` declarations: nothing will change
  because a removal of `ensure*` statements is ignored, so it doesn't
  matter at all whether this option is kept after the first deploy (and
  later on you'd usually restore from backups anyways).

  The DB user isn't the owner of the DB then, but for an existing setup
  this is irrelevant because CREATE on the public schema isn't revoked
  from existing users (only not granted for new users).

[1] not really declarative though because removals of these statements
    are simply ignored for instance: https://github.com/NixOS/nixpkgs/issues/206467
[2] `services.invidious`: I removed the `ensure*` part temporarily
    because it IMHO falls into the category "manage the state on your
    own" (see the commit message). See also
    https://github.com/NixOS/nixpkgs/pull/265857
[3] e.g. roundcube had `"DATABASE ${cfg.database.username}" = "ALL PRIVILEGES";`
[4] As opposed to other changes that are considered a potential fix, but
    also add more things like collation for DBs or passwords that are
    _never_ touched again when changing those.
[5] As suggested in e.g. https://github.com/NixOS/nixpkgs/issues/206467
2023-11-13 17:16:25 +01:00
dadada
f192930a79
nixos/soft-serve: fix typos in option descriptions 2023-11-12 22:34:54 +01:00
tomberek
7859adb9d6
Merge pull request #245394 from christoph-heiss/pkgs/sourcehut
sourcehut: update all component; lots of fixes
2023-11-11 13:42:19 -05:00
Christoph Heiss
88a3d2a0b4
sourcehut: fix postgresql database permission for postgresql >= 15
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
2023-11-11 15:50:16 +01:00
Christoph Heiss
66b86f8a2e
sourcehut: de-duplicate nginx add_header directives
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
2023-11-11 14:14:59 +01:00
Christoph Heiss
acd21dad52
sourcehut: use systemd.tmpfiles instead of manually creating logfiles
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
2023-11-11 14:14:59 +01:00
Christoph Heiss
641e54bb28
sourcehut: create logs directory unconditionally
An empty log directory, in case it stays unused, does not hurt anyone.

Signed-off-by: Christoph Heiss <christoph@c8h4.io>
2023-11-11 13:01:47 +01:00
Christoph Heiss
fc6addb147
sourcehut: reword api-origin option description
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
2023-11-11 13:01:47 +01:00
Christoph Heiss
78cc2783c8
sourcehut: drop obsolete services array in favor of indivdual enable flags
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
2023-11-11 13:01:47 +01:00