Add accentor nix shell configs
This commit is contained in:
parent
c47b99a8c1
commit
e3abd332af
2 changed files with 38 additions and 0 deletions
29
programs/direnv/shells/accentor-api.nix
Normal file
29
programs/direnv/shells/accentor-api.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
let
|
||||
pkgs = import <nixpkgs> {};
|
||||
in
|
||||
pkgs.mkShell {
|
||||
buildInputs = [
|
||||
pkgs.ffmpeg
|
||||
pkgs.postgresql
|
||||
pkgs.ruby_2_7
|
||||
pkgs.taglib
|
||||
pkgs.zlib
|
||||
];
|
||||
shellHook = ''
|
||||
export PGDATA=$PWD/tmp/postgres_data
|
||||
export PGHOST=$PWD/tmp/postgres
|
||||
export PGDATABASE=postgres
|
||||
export DATABASE_URL="postgresql:///postgres?host=$PGHOST"
|
||||
if [ ! -d $PGHOST ]; then
|
||||
mkdir -p $PGHOST
|
||||
fi
|
||||
if [ ! -d $PGDATA ]; then
|
||||
echo 'Initializing postgresql database...'
|
||||
initdb $PGDATA --auth=trust >/dev/null
|
||||
fi
|
||||
cat >"$PGDATA/postgresql.conf" <<HERE
|
||||
listen_addresses = '''
|
||||
unix_socket_directories = '$PGHOST'
|
||||
HERE
|
||||
'';
|
||||
}
|
9
programs/direnv/shells/accentor-web.nix
Normal file
9
programs/direnv/shells/accentor-web.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
let
|
||||
pkgs = import <nixpkgs> {};
|
||||
in
|
||||
pkgs.mkShell {
|
||||
buildInputs = [
|
||||
pkgs.nodejs-12_x
|
||||
pkgs.yarn
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue