aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorCara Salter <cara@devcara.com>2022-04-24 22:40:30 -0400
committerCara Salter <cara@devcara.com>2022-04-24 23:36:33 -0400
commite06d062e15d171d37f249d83b1938df6a594d82c (patch)
tree772aae583ac194fd64194949d10e986fee40996e /flake.nix
parentffacf1c8fc820de3890ba6231b644e9e4a65ce28 (diff)
downloadglitch-ng-e06d062e15d171d37f249d83b1938df6a594d82c.tar.gz
glitch-ng-e06d062e15d171d37f249d83b1938df6a594d82c.zip
flake: Add gcc to nativeBuildInputs
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix11
1 files changed, 8 insertions, 3 deletions
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";
};
};