diff options
author | Cara Salter <cara@devcara.com> | 2022-04-24 22:40:30 -0400 |
---|---|---|
committer | Cara Salter <cara@devcara.com> | 2022-04-24 23:36:33 -0400 |
commit | e06d062e15d171d37f249d83b1938df6a594d82c (patch) | |
tree | 772aae583ac194fd64194949d10e986fee40996e /flake.nix | |
parent | ffacf1c8fc820de3890ba6231b644e9e4a65ce28 (diff) | |
download | glitch-ng-e06d062e15d171d37f249d83b1938df6a594d82c.tar.gz glitch-ng-e06d062e15d171d37f249d83b1938df6a594d82c.zip |
flake: Add gcc to nativeBuildInputs
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -16,11 +16,13 @@ pkg-config openssl gcc + glibc ]; packages.glitch-ng = naersk-lib.buildPackage { pname = "glitch-ng"; root = ./.; buildInputs = deps; + nativeBuildInputs = deps; }; defaultPackage = packages.glitch-ng; @@ -42,7 +44,8 @@ config = lib.mkIf config.services.glitch-ng.enable { users.groups.glitch-ng = { - members = [ "glitch-ng" ]; + members = [ "glitch-ng" + "${config.services.postgresql.superUser}" ]; }; users.users.glitch-ng = { createHome = true; @@ -73,13 +76,15 @@ script = with pkgs; '' if ! [ -e /var/lib/glitch-ng/.db-created ]; then - runuser -u ${config.services.postgresql.superUser} -- ${config.services.postgresql.package}/bin/createuser glitch-ng - runuser -u ${config.services.postgresql.superUser} -- ${config.services.postgresql.package}/bin/createdb -O glitch-ng glitch + ${config.services.postgresql.package}/bin/createuser glitch-ng + ${config.services.postgresql.package}/bin/createdb -O glitch-ng glitch touch /var/lib/glitch-ng/.db-created fi ''; serviceConfig = { Type = "oneshot"; + User = "${config.services.postgresql.superUser}"; + Group = "glitch-ng"; }; }; |