Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 971b731fc18c
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4dd5c93998da
Choose a head ref

Commits on Mar 28, 2019

  1. Copy the full SHA
    44a798e View commit details
  2. Copy the full SHA
    7f3d0ae View commit details

Commits on Apr 22, 2019

  1. hostapd: 2.7 -> 2.8

    dtzWill committed Apr 22, 2019
    Copy the full SHA
    bc06931 View commit details

Commits on Apr 26, 2019

  1. editline: fix crash with term narrower than completions

    Fixes issue mentioned on #nixos earlier today by @edef1c.
    dtzWill committed Apr 26, 2019
    Copy the full SHA
    f052db1 View commit details

Commits on May 2, 2019

  1. python37Packages.gphoto2: 1.9.0 -> 2.0.0

    Semi-automatic update generated by
    https://github.com/ryantm/nixpkgs-update tools. This update was made
    based on information from
    https://repology.org/metapackage/python3.7-gphoto2/versions
    r-ryantm committed May 2, 2019
    Copy the full SHA
    4619414 View commit details
  2. python37Packages.jupyterlab: 0.35.4 -> 0.35.6

    Semi-automatic update generated by
    https://github.com/ryantm/nixpkgs-update tools. This update was made
    based on information from
    https://repology.org/metapackage/python3.7-jupyterlab/versions
    r-ryantm authored and marsam committed May 2, 2019
    Copy the full SHA
    39e686f View commit details

Commits on May 6, 2019

  1. nixos/systemd-boot: add support for memtest86 EFI app

    This commit adds support for installing the memtest86 EFI app and adding
    a boot entry for it with systemd-boot.
    cdepillabout committed May 6, 2019
    Copy the full SHA
    b12ea62 View commit details
  2. Copy the full SHA
    4806c8c View commit details

Commits on May 7, 2019

  1. symengine: init at 0.3.0

    costrouc committed May 7, 2019
    Copy the full SHA
    1c87fac View commit details
  2. Copy the full SHA
    b78f689 View commit details
  3. Copy the full SHA
    9f2bea9 View commit details
  4. Copy the full SHA
    9833f55 View commit details
  5. Copy the full SHA
    2e32421 View commit details
  6. Copy the full SHA
    b536b12 View commit details
  7. Copy the full SHA
    150980c View commit details

Commits on May 8, 2019

  1. symengine: init at 0.3.0

    symengine: init at 0.3.0
    costrouc committed May 8, 2019
    Copy the full SHA
    fe2d30e View commit details

Commits on May 9, 2019

  1. libcbor: init at 2019-02-23

    dtzWill committed May 9, 2019
    Copy the full SHA
    bbc0128 View commit details
  2. libfido2: init at 1.0.0

    dtzWill committed May 9, 2019
    Copy the full SHA
    7cbd6d3 View commit details
  3. Copy the full SHA
    f74f518 View commit details
  4. Copy the full SHA
    b6e91ba View commit details
  5. Copy the full SHA
    b178309 View commit details

Commits on May 12, 2019

  1. Copy the full SHA
    73d64d4 View commit details

Commits on May 14, 2019

  1. aws-sdk-cpp: fix cross compilation

    aws-sdk-cpp tries to run code at build time using check_c_source_runs
    [0] and therefore needs to be told about the expected exit code [1].
    
    [0] https://cmake.org/cmake/help/latest/module/CheckCSourceRuns.html
    [1] https://cmake.org/cmake/help/latest/command/try_run.html#behavior-when-cross-compiling
    erictapen committed May 14, 2019
    Copy the full SHA
    2d8b3df View commit details

Commits on May 18, 2019

  1. mkcl: 1.1.10.2017-11-14 -> 1.1.11

    Tomas Hlavaty committed May 18, 2019
    Copy the full SHA
    dd2ad65 View commit details
  2. Copy the full SHA
    d5e745f View commit details
  3. Copy the full SHA
    fb455c6 View commit details

Commits on May 19, 2019

  1. spice-gtk: 0.35 -> 0.37

    Meson!
    
    Pulseaudio backend has been deprecated upstream
    so it has been disabled. Celt has also been disabled
    because there's opus.
    
    Other than that optional features have been enabled.
    
    https://gitlab.freedesktop.org/spice/spice-gtk/blob/v0.36/NEWS
    https://gitlab.freedesktop.org/spice/spice-gtk/blob/v0.37/NEWS
    worldofpeace committed May 19, 2019
    Copy the full SHA
    5f7c701 View commit details
  2. Copy the full SHA
    aba04ea View commit details
  3. Copy the full SHA
    e3da5d4 View commit details
  4. spice: cleanup features

    * disabled celt for opus
    * enabled gstreamer support
    worldofpeace committed May 19, 2019
    Copy the full SHA
    edcda4b View commit details
  5. Copy the full SHA
    915c2de View commit details
  6. Copy the full SHA
    b62a4c0 View commit details
  7. Copy the full SHA
    fbfc8b1 View commit details
  8. Copy the full SHA
    4ca821f View commit details
  9. Copy the full SHA
    ef22dd0 View commit details
  10. nrfutil: init at 5.2.0

    gebner committed May 19, 2019
    Copy the full SHA
    131d9e5 View commit details
  11. stilo-themes: init at 3.32-3

    romildo committed May 19, 2019
    Copy the full SHA
    1f44657 View commit details
  12. spark: 2.2.1 -> 2.4.3

    xiorcale committed May 19, 2019
    Copy the full SHA
    9c17484 View commit details
  13. Copy the full SHA
    15a2343 View commit details
  14. Copy the full SHA
    f469572 View commit details
  15. Copy the full SHA
    45afc64 View commit details
  16. Copy the full SHA
    f654606 View commit details

Commits on May 20, 2019

  1. Copy the full SHA
    c03630a View commit details
  2. acl2: 8.1 -> 8.2

    Semi-automatic update generated by
    https://github.com/ryantm/nixpkgs-update tools. This update was made
    based on information from
    https://repology.org/metapackage/acl2/versions
    r-ryantm committed May 20, 2019
    Copy the full SHA
    c5d08e4 View commit details
  3. Merge pull request #61720 from etu/update-phpstan

    phpPackages.phpstan: 0.11.6 -> 0.11.7
    aanderse authored May 20, 2019
    Copy the full SHA
    01dba63 View commit details
  4. Merge pull request #60721 from r-ryantm/auto-update/python3.7-jupyterlab

    python37Packages.jupyterlab: 0.35.4 -> 0.35.5
    marsam authored May 20, 2019
    Copy the full SHA
    bbd8dbe View commit details
  5. Merge pull request #61732 from r-ryantm/auto-update/acl2

    acl2: 8.1 -> 8.2
    7c6f434c authored May 20, 2019
    Copy the full SHA
    d8afea0 View commit details
  6. Merge pull request #60717 from r-ryantm/auto-update/python3.7-gphoto2

    python37Packages.gphoto2: 1.9.0 -> 2.0.0
    marsam authored May 20, 2019
    Copy the full SHA
    10e77ee View commit details
  7. passff-host: 1.0.2 -> 1.2.1

    evax committed May 20, 2019
    Copy the full SHA
    af29de6 View commit details
  8. Merge #61715: linux_hardkernel_4_14: 4.14.102-156 -> 4.14.120-160

    This contains fixes for the recent MDS vulnerabilities in Intel processors.
    vcunat committed May 20, 2019
    Copy the full SHA
    1741386 View commit details
Showing with 3,086 additions and 1,113 deletions.
  1. +17 −2 maintainers/maintainer-list.nix
  2. +6 −1 nixos/doc/manual/release-notes/rl-1903.xml
  3. +3 −1 nixos/doc/manual/release-notes/rl-1909.xml
  4. +1 −2 nixos/modules/hardware/all-firmware.nix
  5. +89 −2 nixos/modules/services/databases/postgresql.nix
  6. +260 −0 nixos/modules/services/networking/syncthing.nix
  7. +1 −1 nixos/modules/services/networking/xinetd.nix
  8. +11 −1 nixos/modules/services/security/fprintd.nix
  9. +22 −0 nixos/modules/services/web-apps/nextcloud.nix
  10. +6 −0 nixos/modules/services/web-apps/nextcloud.xml
  11. +27 −0 nixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py
  12. +15 −0 nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix
  13. +1 −0 nixos/tests/all-tests.nix
  14. +4 −0 nixos/tests/nextcloud/basic.nix
  15. +48 −5 nixos/tests/redmine.nix
  16. +30 −0 nixos/tests/syncthing-init.nix
  17. +3 −3 pkgs/applications/editors/android-studio/default.nix
  18. +2 −2 pkgs/applications/editors/featherpad/default.nix
  19. +7 −44 pkgs/applications/editors/vscode/{default.nix → generic.nix}
  20. +55 −0 pkgs/applications/editors/vscode/vscode.nix
  21. +54 −0 pkgs/applications/editors/vscode/vscodium.nix
  22. +9 −14 pkgs/applications/graphics/openscad/default.nix
  23. +38 −0 pkgs/applications/misc/pstree/default.nix
  24. +7 −9 pkgs/applications/misc/pwsafe/default.nix
  25. +48 −21 pkgs/applications/misc/xmind/default.nix
  26. +40 −0 pkgs/applications/misc/xmind/java-env-config-fixes.patch
  27. +32 −0 pkgs/applications/networking/Sylk/default.nix
  28. +397 −397 pkgs/applications/networking/browsers/firefox-bin/release_sources.nix
  29. +2 −1 pkgs/applications/networking/browsers/firefox/common.nix
  30. +4 −4 pkgs/applications/networking/browsers/firefox/packages.nix
  31. +1 −1 pkgs/applications/networking/cluster/spark/default.nix
  32. +2 −2 pkgs/applications/networking/instant-messengers/zoom-us/default.nix
  33. +1 −4 pkgs/applications/science/logic/coq/default.nix
  34. +8 −6 pkgs/applications/version-management/pijul/default.nix
  35. +75 −0 pkgs/applications/virtualization/cri-o/default.nix
  36. +22 −0 pkgs/data/fonts/redhat-official/default.nix
  37. +3 −3 pkgs/data/themes/mojave/default.nix
  38. +27 −0 pkgs/data/themes/stilo/default.nix
  39. +2 −2 pkgs/data/themes/zuki/default.nix
  40. +2 −2 pkgs/desktops/gnome-3/core/eog/default.nix
  41. +3 −3 pkgs/development/compilers/mkcl/default.nix
  42. +2 −2 pkgs/development/compilers/rust/rustc.nix
  43. +36 −14 pkgs/development/compilers/solc/default.nix
  44. +6 −12 pkgs/development/compilers/terra/default.nix
  45. +3 −2 pkgs/development/coq-modules/mathcomp/default.nix
  46. +9 −10 pkgs/development/coq-modules/mathcomp/extra.nix
  47. +3 −3 pkgs/development/interpreters/acl2/default.nix
  48. +2 −2 pkgs/development/libraries/alembic/default.nix
  49. +2 −2 pkgs/development/libraries/avro-c/default.nix
  50. +5 −3 pkgs/development/libraries/aws-sdk-cpp/default.nix
  51. +6 −0 pkgs/development/libraries/editline/default.nix
  52. +27 −0 pkgs/development/libraries/libcbor/default.nix
  53. +25 −0 pkgs/development/libraries/libfido2/default.nix
  54. +21 −8 pkgs/development/libraries/libfprint/default.nix
  55. +4 −4 pkgs/development/libraries/liburing/default.nix
  56. +80 −29 pkgs/development/libraries/spice-gtk/default.nix
  57. +4 −3 pkgs/development/libraries/spice-protocol/default.nix
  58. +26 −0 pkgs/development/libraries/spice/correct-meson.patch
  59. +74 −19 pkgs/development/libraries/spice/default.nix
  60. +47 −0 pkgs/development/libraries/symengine/default.nix
  61. +34 −0 pkgs/development/python-modules/cgen/default.nix
  62. +8 −1 pkgs/development/python-modules/fire/default.nix
  63. +41 −0 pkgs/development/python-modules/fitbit/default.nix
  64. +29 −0 pkgs/development/python-modules/genpy/default.nix
  65. +2 −2 pkgs/development/python-modules/gphoto2/default.nix
  66. +7 −5 pkgs/development/python-modules/intelhex/default.nix
  67. +41 −0 pkgs/development/python-modules/islpy/default.nix
  68. +2 −2 pkgs/development/python-modules/jupyterlab/default.nix
  69. +51 −0 pkgs/development/python-modules/loo-py/default.nix
  70. +38 −0 pkgs/development/python-modules/macropy/default.nix
  71. +4 −4 pkgs/development/python-modules/mypy/default.nix
  72. +51 −0 pkgs/development/python-modules/pc-ble-driver-py/default.nix
  73. +19 −0 pkgs/development/python-modules/piccata/default.nix
  74. +24 −0 pkgs/development/python-modules/pyatmo/default.nix
  75. +44 −0 pkgs/development/python-modules/pymbolic/default.nix
  76. +38 −0 pkgs/development/python-modules/pysonos/default.nix
  77. +21 −0 pkgs/development/python-modules/pyspinel/default.nix
  78. +35 −0 pkgs/development/python-modules/pyxl3/default.nix
  79. +30 −0 pkgs/development/python-modules/spyder-kernels/default.nix
  80. +18 −34 pkgs/{applications/science → development/python-modules}/spyder/default.nix
  81. +43 −0 pkgs/development/python-modules/stravalib/default.nix
  82. +52 −0 pkgs/development/python-modules/symengine/default.nix
  83. +21 −0 pkgs/development/python-modules/units/default.nix
  84. +12 −12 pkgs/development/python-modules/zxcvbn-python/default.nix
  85. +2 −2 pkgs/development/tools/ammonite/default.nix
  86. +8 −6 pkgs/development/tools/analysis/hotspot/default.nix
  87. +3 −3 pkgs/development/tools/build-managers/bear/default.nix
  88. +15 −0 pkgs/development/tools/misc/indent/darwin.patch
  89. +11 −7 pkgs/development/tools/misc/indent/default.nix
  90. +33 −0 pkgs/development/tools/misc/nrfutil/default.nix
  91. +15 −9 pkgs/development/web/minify/default.nix
  92. +0 −74 pkgs/development/web/minify/deps.nix
  93. +2 −5 pkgs/games/openra/common.nix
  94. +7 −7 pkgs/games/openra/engines.nix
  95. +3 −3 pkgs/games/openra/mod-launch-game.sh
  96. +18 −9 pkgs/games/openra/mod-update.sh
  97. +24 −24 pkgs/games/openra/mods.nix
  98. +3 −0 pkgs/games/steam/chrootenv.nix
  99. +2 −2 pkgs/misc/cups/filters.nix
  100. +2 −2 pkgs/misc/vscode-extensions/cpptools/default.nix
  101. +2 −2 pkgs/misc/vscode-extensions/wakatime/default.nix
  102. +16 −11 pkgs/os-specific/linux/criu/default.nix
  103. +2 −2 pkgs/os-specific/linux/hostapd/default.nix
  104. +3 −3 pkgs/os-specific/linux/kernel/linux-hardkernel-4.14.nix
  105. +0 −9 pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix
  106. +4 −4 pkgs/os-specific/linux/kernel/linux-testing.nix
  107. +5 −4 pkgs/os-specific/linux/kernel/manual-config.nix
  108. +2 −2 pkgs/servers/atlassian/confluence.nix
  109. +23 −0 pkgs/servers/endlessh/default.nix
  110. +7 −6 pkgs/servers/foundationdb/cmake.nix
  111. +3 −3 pkgs/servers/foundationdb/default.nix
  112. +4 −4 pkgs/servers/home-assistant/component-packages.nix
  113. +24 −21 pkgs/servers/ldap/389/default.nix
  114. +0 −34 pkgs/servers/ldap/389/perl-path.patch
  115. +2 −2 pkgs/servers/matrix-synapse/default.nix
  116. +2 −2 pkgs/servers/nextcloud/default.nix
  117. +3 −3 pkgs/shells/zsh/oh-my-zsh/default.nix
  118. +10 −7 pkgs/tools/X11/arandr/default.nix
  119. +22 −0 pkgs/tools/admin/certigo/default.nix
  120. +2 −2 pkgs/tools/admin/lxd/default.nix
  121. +9 −23 pkgs/tools/backup/borg/default.nix
  122. +2 −2 pkgs/tools/filesystems/btrfs-progs/default.nix
  123. +2 −2 pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix
  124. +30 −0 pkgs/tools/misc/fluent-bit/default.nix
  125. +2 −2 pkgs/tools/networking/chrony/default.nix
  126. +7 −2 pkgs/tools/networking/ngrok-2/default.nix
  127. +15 −15 pkgs/tools/networking/ngrok-2/versions.json
  128. +8 −1 pkgs/tools/networking/openvpn/default.nix
  129. +2 −2 pkgs/tools/networking/ubridge/default.nix
  130. +31 −0 pkgs/tools/security/dnsenum/default.nix
  131. +44 −0 pkgs/tools/security/dnsrecon/default.nix
  132. +23 −0 pkgs/tools/security/fierce/default.nix
  133. +8 −4 pkgs/tools/security/fprintd/default.nix
  134. +6 −6 pkgs/tools/security/monkeysphere/default.nix
  135. +0 −21 pkgs/tools/security/monkeysphere/monkeysphere.patch
  136. +12 −2 pkgs/tools/security/nmap/default.nix
  137. +3 −6 pkgs/tools/security/passff-host/default.nix
  138. +6 −7 pkgs/tools/security/theharvester/default.nix
  139. +13 −13 pkgs/tools/text/ruby-zoom/Gemfile.lock
  140. +24 −12 pkgs/tools/text/ruby-zoom/gemset.nix
  141. +2 −1 pkgs/tools/typesetting/tikzit/default.nix
  142. +0 −1 pkgs/top-level/aliases.nix
  143. +46 −9 pkgs/top-level/all-packages.nix
  144. +36 −0 pkgs/top-level/perl-packages.nix
  145. +2 −2 pkgs/top-level/php-packages.nix
  146. +37 −0 pkgs/top-level/python-packages.nix
19 changes: 17 additions & 2 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
@@ -1746,13 +1746,13 @@
github = "fps";
name = "Florian Paul Schmidt";
};

fragamus = {
email = "innovative.engineer@gmail.com";
github = "fragamus";
name = "Michael Gough";
};

fredeb = {
email = "im@fredeb.dev";
github = "fredeeb";
@@ -2486,6 +2486,11 @@
github = "jtojnar";
name = "Jan Tojnar";
};
juaningan = {
email = "juaningan@gmail.com";
github = "juaningan";
name = "Juan Rodal";
};
juliendehos = {
email = "dehos@lisic.univ-littoral.fr";
github = "juliendehos";
@@ -4377,6 +4382,11 @@
github = "samdroid-apps";
name = "Sam Parkinson";
};
samrose = {
email = "samuel.rose@gmail.com";
github = "samrose";
name = "Sam Rose";
};
samueldr = {
email = "samuel@dionne-riel.com";
github = "samueldr";
@@ -4397,6 +4407,11 @@
github = "sargon";
name = "Daniel Ehlers";
};
saschagrunert = {
email = "mail@saschagrunert.de";
github = "saschagrunert";
name = "Sascha Grunert";
};
sauyon = {
email = "s@uyon.co";
github = "sauyon";
7 changes: 6 additions & 1 deletion nixos/doc/manual/release-notes/rl-1903.xml
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
xmlns:xi="http://www.w3.org/2001/XInclude"
version="5.0"
xml:id="sec-release-19.03">
<title>Release 19.03 (“Koi”, 2019/03/??)</title>
<title>Release 19.03 (“Koi”, 2019/04/11)</title>

<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
@@ -18,6 +18,11 @@
</para>

<itemizedlist>
<listitem>
<para>
End of support is planned for end of October 2019, handing over to 19.09.
</para>
</listitem>
<listitem>
<para>
The default Python 3 interpreter is now CPython 3.7 instead of CPython
4 changes: 3 additions & 1 deletion nixos/doc/manual/release-notes/rl-1909.xml
Original file line number Diff line number Diff line change
@@ -19,7 +19,9 @@

<itemizedlist>
<listitem>
<para />
<para>
End of support is planned for end of April 2020, handing over to 20.03.
</para>
</listitem>
</itemizedlist>
</section>
3 changes: 1 addition & 2 deletions nixos/modules/hardware/all-firmware.nix
Original file line number Diff line number Diff line change
@@ -63,8 +63,7 @@ in {
b43Firmware_5_1_138
b43Firmware_6_30_163_46
b43FirmwareCutter
facetimehd-firmware
];
] ++ optional (pkgs.stdenv.hostPlatform.isi686 || pkgs.stdenv.hostPlatform.isx86_64) facetimehd-firmware;
})
];
}
91 changes: 89 additions & 2 deletions nixos/modules/services/databases/postgresql.nix
Original file line number Diff line number Diff line change
@@ -105,6 +105,80 @@ in
'';
};

ensureDatabases = mkOption {
type = types.listOf types.str;
default = [];
description = ''
Ensures that the specified databases exist.
This option will never delete existing databases, especially not when the value of this
option is changed. This means that databases created once through this option or
otherwise have to be removed manually.
'';
example = [
"gitea"
"nextcloud"
];
};

ensureUsers = mkOption {
type = types.listOf (types.submodule {
options = {
name = mkOption {
type = types.str;
description = ''
Name of the user to ensure.
'';
};
ensurePermissions = mkOption {
type = types.attrsOf types.str;
default = {};
description = ''
Permissions to ensure for the user, specified as an attribute set.
The attribute names specify the database and tables to grant the permissions for.
The attribute values specify the permissions to grant. You may specify one or
multiple comma-separated SQL privileges here.
For more information on how to specify the target
and on which privileges exist, see the
<link xlink:href="https://www.postgresql.org/docs/current/sql-grant.html">GRANT syntax</link>.
The attributes are used as <code>GRANT ''${attrName} ON ''${attrValue}</code>.
'';
example = literalExample ''
{
"DATABASE nextcloud" = "ALL PRIVILEGES";
"ALL TABLES IN SCHEMA public" = "ALL PRIVILEGES";
}
'';
};
};
});
default = [];
description = ''
Ensures that the specified users exist and have at least the ensured permissions.
The PostgreSQL users will be identified using peer authentication. This authenticates the Unix user with the
same name only, and that without the need for a password.
This option will never delete existing users or remove permissions, especially not when the value of this
option is changed. This means that users created and permissions assigned once through this option or
otherwise have to be removed manually.
'';
example = literalExample ''
[
{
name = "nextcloud";
ensurePermissions = {
"DATABASE nextcloud" = "ALL PRIVILEGES";
};
}
{
name = "superuser";
ensurePermissions = {
"ALL TABLES IN SCHEMA public" = "ALL PRIVILEGES";
};
}
]
'';
};

enableTCPIP = mkOption {
type = types.bool;
default = false;
@@ -256,17 +330,30 @@ in
# Wait for PostgreSQL to be ready to accept connections.
postStart =
''
while ! ${pkgs.sudo}/bin/sudo -u ${cfg.superUser} psql --port=${toString cfg.port} -d postgres -c "" 2> /dev/null; do
PSQL="${pkgs.sudo}/bin/sudo -u ${cfg.superUser} psql --port=${toString cfg.port}"
while ! $PSQL -d postgres -c "" 2> /dev/null; do
if ! kill -0 "$MAINPID"; then exit 1; fi
sleep 0.1
done
if test -e "${cfg.dataDir}/.first_startup"; then
${optionalString (cfg.initialScript != null) ''
${pkgs.sudo}/bin/sudo -u ${cfg.superUser} psql -f "${cfg.initialScript}" --port=${toString cfg.port} -d postgres
$PSQL -f "${cfg.initialScript}" -d postgres
''}
rm -f "${cfg.dataDir}/.first_startup"
fi
'' + optionalString (cfg.ensureDatabases != []) ''
${concatMapStrings (database: ''
$PSQL -tAc "SELECT 1 FROM pg_database WHERE datname = '${database}'" | grep -q 1 || $PSQL -tAc "CREATE DATABASE ${database}"
'') cfg.ensureDatabases}
'' + ''
${concatMapStrings (user: ''
$PSQL -tAc "SELECT 1 FROM pg_roles WHERE rolname='${user.name}'" | grep -q 1 || $PSQL -tAc "CREATE USER ${user.name}"
${concatStringsSep "\n" (mapAttrsToList (database: permission: ''
$PSQL -tAc "GRANT ${permission} ON ${database} TO ${user.name}"
'') user.ensurePermissions)}
'') cfg.ensureUsers}
'';

unitConfig.RequiresMountsFor = "${cfg.dataDir}";
Loading