From e06d062e15d171d37f249d83b1938df6a594d82c Mon Sep 17 00:00:00 2001 From: Cara Salter Date: Sun, 24 Apr 2022 22:40:30 -0400 Subject: flake: Add gcc to nativeBuildInputs --- flake.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index b559c45..c113f40 100644 --- a/flake.nix +++ b/flake.nix @@ -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"; }; }; -- cgit v1.2.3