summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nixos/doc/manual/from_md/release-notes/rl-2205.section.xml14
-rw-r--r--nixos/doc/manual/release-notes/rl-2205.section.md7
-rw-r--r--nixos/lib/make-options-doc/options-to-docbook.xsl2
-rw-r--r--nixos/modules/services/misc/sourcehut/default.nix1455
-rw-r--r--nixos/modules/services/misc/sourcehut/service.nix431
-rw-r--r--nixos/modules/services/misc/sourcehut/sourcehut.xml24
-rw-r--r--nixos/tests/all-tests.nix1
-rw-r--r--nixos/tests/sourcehut.nix188
-rw-r--r--pkgs/applications/audio/sfizz/default.nix24
-rw-r--r--pkgs/applications/kde/kalzium.nix2
-rw-r--r--pkgs/applications/kde/kipi-plugins.nix2
-rw-r--r--pkgs/applications/kde/klettres.nix2
-rw-r--r--pkgs/applications/kde/kturtle.nix2
-rw-r--r--pkgs/applications/misc/inherd-quake/default.nix7
-rw-r--r--pkgs/applications/misc/marktext/default.nix1
-rw-r--r--pkgs/applications/misc/metadata-cleaner/default.nix8
-rw-r--r--pkgs/applications/networking/cluster/spark/default.nix2
-rw-r--r--pkgs/applications/networking/feedreaders/newsboat/default.nix3
-rw-r--r--pkgs/applications/radio/flex-ncat/default.nix6
-rw-r--r--pkgs/applications/version-management/gitlab/data.json14
-rw-r--r--pkgs/applications/version-management/gitlab/gitaly/Gemfile8
-rw-r--r--pkgs/applications/version-management/gitlab/gitaly/Gemfile.lock17
-rw-r--r--pkgs/applications/version-management/gitlab/gitaly/default.nix4
-rw-r--r--pkgs/applications/version-management/gitlab/gitaly/gemset.nix60
-rw-r--r--pkgs/applications/version-management/gitlab/gitlab-workhorse/default.nix4
-rw-r--r--pkgs/applications/version-management/gitlab/rubyEnv/Gemfile27
-rw-r--r--pkgs/applications/version-management/gitlab/rubyEnv/Gemfile.lock82
-rw-r--r--pkgs/applications/version-management/gitlab/rubyEnv/gemset.nix140
-rw-r--r--pkgs/applications/version-management/sourcehut/builds.nix27
-rw-r--r--pkgs/applications/version-management/sourcehut/core.nix7
-rw-r--r--pkgs/applications/version-management/sourcehut/default.nix2
-rw-r--r--pkgs/applications/version-management/sourcehut/dispatch.nix8
-rw-r--r--pkgs/applications/version-management/sourcehut/git.nix12
-rw-r--r--pkgs/applications/version-management/sourcehut/hg.nix8
-rw-r--r--pkgs/applications/version-management/sourcehut/hub.nix7
-rw-r--r--pkgs/applications/version-management/sourcehut/lists.nix8
-rw-r--r--pkgs/applications/version-management/sourcehut/man.nix8
-rw-r--r--pkgs/applications/version-management/sourcehut/meta.nix15
-rw-r--r--pkgs/applications/version-management/sourcehut/pages.nix30
-rw-r--r--pkgs/applications/version-management/sourcehut/paste.nix8
-rw-r--r--pkgs/applications/version-management/sourcehut/patches/redis-socket/build/0001-Revert-Add-build-submission-and-queue-monitoring.patch69
-rw-r--r--pkgs/applications/version-management/sourcehut/patches/redis-socket/meta/0001-Revert-Add-webhook-queue-monitoring.patch48
-rw-r--r--pkgs/applications/version-management/sourcehut/scm.nix10
-rw-r--r--pkgs/applications/version-management/sourcehut/todo.nix7
-rwxr-xr-xpkgs/applications/version-management/sourcehut/update.sh62
-rw-r--r--pkgs/applications/virtualization/buildkit-nix/default.nix4
-rw-r--r--pkgs/desktops/gnome/apps/gnome-power-manager/default.nix2
-rw-r--r--pkgs/development/embedded/fpga/icestorm/default.nix2
-rw-r--r--pkgs/development/go-modules/generic/default.nix1
-rw-r--r--pkgs/development/interpreters/lfe/generic-builder.nix2
-rw-r--r--pkgs/development/libraries/gf2x/default.nix2
-rw-r--r--pkgs/development/libraries/grantlee/5/default.nix2
-rw-r--r--pkgs/development/libraries/grantlee/default.nix2
-rw-r--r--pkgs/development/libraries/graphene/default.nix2
-rw-r--r--pkgs/development/libraries/gtksourceviewmm/4.x.nix2
-rw-r--r--pkgs/development/libraries/gtksourceviewmm/default.nix2
-rw-r--r--pkgs/development/libraries/libnotify/default.nix2
-rw-r--r--pkgs/development/libraries/zlib-ng/default.nix4
-rw-r--r--pkgs/development/lua-modules/generated-packages.nix4
-rw-r--r--pkgs/development/python-modules/angrcli/default.nix7
-rw-r--r--pkgs/development/python-modules/apache-airflow/default.nix2
-rw-r--r--pkgs/development/python-modules/certifi/default.nix2
-rw-r--r--pkgs/development/python-modules/certifi/python2.nix2
-rw-r--r--pkgs/development/python-modules/iso4217/default.nix23
-rw-r--r--pkgs/development/python-modules/pipx/default.nix4
-rw-r--r--pkgs/development/python-modules/pydicom/default.nix20
-rw-r--r--pkgs/development/python-modules/pynetdicom/default.nix13
-rw-r--r--pkgs/development/python-modules/pyupgrade/default.nix4
-rw-r--r--pkgs/development/python-modules/types-pytz/default.nix9
-rw-r--r--pkgs/development/tools/ammonite/default.nix2
-rw-r--r--pkgs/development/tools/build-managers/apache-ant/default.nix2
-rw-r--r--pkgs/development/tools/ddosify/default.nix8
-rw-r--r--pkgs/development/tools/rust/rust-analyzer/default.nix9
-rw-r--r--pkgs/development/tools/rust/rust-analyzer/no-1-57-map-while.patch20
-rw-r--r--pkgs/games/ddnet/default.nix4
-rw-r--r--pkgs/os-specific/linux/phc-intel/default.nix3
-rw-r--r--pkgs/servers/apache-kafka/default.nix2
-rw-r--r--pkgs/servers/heisenbridge/default.nix12
-rw-r--r--pkgs/servers/home-assistant/default.nix1
-rw-r--r--pkgs/servers/mail/dovecot/plugins/fts_xapian/default.nix1
-rw-r--r--pkgs/tools/filesystems/ceph/default.nix2
-rw-r--r--pkgs/tools/graphics/ibniz/default.nix2
-rw-r--r--pkgs/tools/misc/libbitcoin/libbitcoin-network.nix2
-rw-r--r--pkgs/tools/misc/libbitcoin/libbitcoin-protocol.nix2
-rw-r--r--pkgs/tools/misc/libbitcoin/libbitcoin.nix2
-rw-r--r--pkgs/tools/networking/ipinfo/default.nix4
-rw-r--r--pkgs/tools/security/expliot/default.nix12
-rw-r--r--pkgs/tools/security/ghidra/default.nix2
-rw-r--r--pkgs/tools/security/gitleaks/default.nix4
-rw-r--r--pkgs/tools/security/rekor/default.nix8
-rw-r--r--pkgs/tools/security/scorecard/default.nix6
91 files changed, 2556 insertions, 546 deletions
diff --git a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml
index aef16523b5ea..1e425248be0f 100644
--- a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml
+++ b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml
@@ -149,6 +149,20 @@
migration guide</link> for more details.
</para>
</listitem>
+ <listitem>
+ <para>
+ For <literal>pkgs.python3.pkgs.ipython</literal>, its direct
+ dependency
+ <literal>pkgs.python3.pkgs.matplotlib-inline</literal> (which
+ is really an adapter to integrate matplotlib in ipython if it
+ is installed) does not depend on
+ <literal>pkgs.python3.pkgs.matplotlib</literal> anymore. This
+ is closer to a non-Nix install of ipython. This has the added
+ benefit to reduce the closure size of
+ <literal>ipython</literal> from ~400MB to ~160MB (including
+ ~100MB for python itself).
+ </para>
+ </listitem>
</itemizedlist>
</section>
<section xml:id="sec-release-22.05-notable-changes">
diff --git a/nixos/doc/manual/release-notes/rl-2205.section.md b/nixos/doc/manual/release-notes/rl-2205.section.md
index c72f91896585..ca89732fa801 100644
--- a/nixos/doc/manual/release-notes/rl-2205.section.md
+++ b/nixos/doc/manual/release-notes/rl-2205.section.md
@@ -53,6 +53,13 @@ In addition to numerous new and upgraded packages, this release has the followin
- The `autorestic` package has been upgraded from 1.3.0 to 1.5.0 which introduces breaking changes in config file, check [their migration guide](https://autorestic.vercel.app/migration/1.4_1.5) for more details.
+- For `pkgs.python3.pkgs.ipython`, its direct dependency `pkgs.python3.pkgs.matplotlib-inline`
+ (which is really an adapter to integrate matplotlib in ipython if it is installed) does
+ not depend on `pkgs.python3.pkgs.matplotlib` anymore.
+ This is closer to a non-Nix install of ipython.
+ This has the added benefit to reduce the closure size of `ipython` from ~400MB to ~160MB
+ (including ~100MB for python itself).
+
## Other Notable Changes {#sec-release-22.05-notable-changes}
- The option [services.redis.servers](#opt-services.redis.servers) was added
diff --git a/nixos/lib/make-options-doc/options-to-docbook.xsl b/nixos/lib/make-options-doc/options-to-docbook.xsl
index b9ac26450514..b286f7b5e2c0 100644
--- a/nixos/lib/make-options-doc/options-to-docbook.xsl
+++ b/nixos/lib/make-options-doc/options-to-docbook.xsl
@@ -20,7 +20,7 @@
<title>Configuration Options</title>
<variablelist xml:id="configuration-variable-list">
<xsl:for-each select="attrs">
- <xsl:variable name="id" select="concat('opt-', str:replace(str:replace(str:replace(attr[@name = 'name']/string/@value, '*', '_'), '&lt;', '_'), '>', '_'))" />
+ <xsl:variable name="id" select="concat('opt-', str:replace(str:replace(str:replace(str:replace(attr[@name = 'name']/string/@value, '*', '_'), '&lt;', '_'), '>', '_'), ':', '_'))" />
<varlistentry>
<term xlink:href="#{$id}">
<xsl:attribute name="xml:id"><xsl:value-of select="$id"/></xsl:attribute>
diff --git a/nixos/modules/services/misc/sourcehut/default.nix b/nixos/modules/services/misc/sourcehut/default.nix
index c84a75b0ca02..1bd21c278e00 100644
--- a/nixos/modules/services/misc/sourcehut/default.nix
+++ b/nixos/modules/services/misc/sourcehut/default.nix
@@ -1,14 +1,90 @@
{ config, pkgs, lib, ... }:
-
with lib;
let
+ inherit (config.services) nginx postfix postgresql redis;
+ inherit (config.users) users groups;
cfg = config.services.sourcehut;
- cfgIni = cfg.settings;
- settingsFormat = pkgs.formats.ini { };
+ domain = cfg.settings."sr.ht".global-domain;
+ settingsFormat = pkgs.formats.ini {
+ listToValue = concatMapStringsSep "," (generators.mkValueStringDefault {});
+ mkKeyValue = k: v:
+ if v == null then ""
+ else generators.mkKeyValueDefault {
+ mkValueString = v:
+ if v == true then "yes"
+ else if v == false then "no"
+ else generators.mkValueStringDefault {} v;
+ } "=" k v;
+ };
+ configIniOfService = srv: settingsFormat.generate "sourcehut-${srv}-config.ini"
+ # Each service needs access to only a subset of sections (and secrets).
+ (filterAttrs (k: v: v != null)
+ (mapAttrs (section: v:
+ let srvMatch = builtins.match "^([a-z]*)\\.sr\\.ht(::.*)?$" section; in
+ if srvMatch == null # Include sections shared by all services
+ || head srvMatch == srv # Include sections for the service being configured
+ then v
+ # Enable Web links and integrations between services.
+ else if tail srvMatch == [ null ] && elem (head srvMatch) cfg.services
+ then {
+ inherit (v) origin;
+ # mansrht crashes without it
+ oauth-client-id = v.oauth-client-id or null;
+ }
+ # Drop sub-sections of other services
+ else null)
+ (recursiveUpdate cfg.settings {
+ # Those paths are mounted using BindPaths= or BindReadOnlyPaths=
+ # for services needing access to them.
+ "builds.sr.ht::worker".buildlogs = "/var/log/sourcehut/buildsrht-worker";
+ "git.sr.ht".post-update-script = "/usr/bin/gitsrht-update-hook";
+ "git.sr.ht".repos = "/var/lib/sourcehut/gitsrht/repos";
+ "hg.sr.ht".changegroup-script = "/usr/bin/hgsrht-hook-changegroup";
+ "hg.sr.ht".repos = "/var/lib/sourcehut/hgsrht/repos";
+ # Making this a per service option despite being in a global section,
+ # so that it uses the redis-server used by the service.
+ "sr.ht".redis-host = cfg.${srv}.redis.host;
+ })));
+ commonServiceSettings = srv: {
+ origin = mkOption {
+ description = "URL ${srv}.sr.ht is being served at (protocol://domain)";
+ type = types.str;
+ default = "https://${srv}.${domain}";
+ defaultText = "https://${srv}.example.com";
+ };
+ debug-host = mkOption {
+ description = "Address to bind the debug server to.";
+ type = with types; nullOr str;
+ default = null;
+ };
+ debug-port = mkOption {
+ description = "Port to bind the debug server to.";
+ type = with types; nullOr str;
+ default = null;
+ };
+ connection-string = mkOption {
+ description = "SQLAlchemy connection string for the database.";
+ type = types.str;
+ default = "postgresql:///localhost?user=${srv}srht&host=/run/postgresql";
+ };
+ migrate-on-upgrade = mkEnableOption "automatic migrations on package upgrade" // { default = true; };
+ oauth-client-id = mkOption {
+ description = "${srv}.sr.ht's OAuth client id for meta.sr.ht.";
+ type = types.str;
+ };
+ oauth-client-secret = mkOption {
+ description = "${srv}.sr.ht's OAuth client secret for meta.sr.ht.";
+ type = types.path;
+ apply = s: "<" + toString s;
+ };
+ };
# Specialized python containing all the modules
python = pkgs.sourcehut.python.withPackages (ps: with ps; [
gunicorn
+ eventlet
+ # For monitoring Celery: sudo -u listssrht celery --app listssrht.process -b redis+socket:///run/redis-sourcehut/redis.sock?virtual_host=5 flower
+ flower
# Sourcehut services
srht
buildsrht
@@ -19,72 +95,37 @@ let