2023-08-08 16:48:09 +00:00
|
|
|
{ pkgs, nixpkgs-ruby, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
# Set environment variables
|
|
|
|
env = {
|
|
|
|
APPLICATION_HOST = "localhost:3000";
|
|
|
|
DB_HOST = "localhost";
|
|
|
|
PSQLPAGER = "pspg";
|
|
|
|
};
|
|
|
|
|
|
|
|
# Packages to install
|
|
|
|
packages = with pkgs; [
|
|
|
|
git
|
|
|
|
pspg
|
|
|
|
openssl
|
2023-10-13 15:49:33 +00:00
|
|
|
libyaml
|
2023-08-08 16:48:09 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
languages.ruby.enable = true;
|
|
|
|
languages.ruby.versionFile = ./.ruby-version;
|
|
|
|
|
|
|
|
services.postgres = {
|
|
|
|
enable = true;
|
|
|
|
listen_addresses = "127.0.0.1";
|
|
|
|
initialScript = ''
|
2023-09-17 11:24:54 +00:00
|
|
|
CREATE ROLE soc WITH LOGIN PASSWORD 'postgres' SUPERUSER;
|
2023-08-08 16:48:09 +00:00
|
|
|
'';
|
|
|
|
};
|
2023-08-19 14:38:38 +00:00
|
|
|
|
2023-10-06 07:38:53 +00:00
|
|
|
scripts = {
|
|
|
|
prodshell.exec = ''
|
|
|
|
kamal app exec -i --reuse bash
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2023-08-19 14:38:38 +00:00
|
|
|
services.mailhog = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2023-08-08 16:48:09 +00:00
|
|
|
}
|