34 lines
688 B
Nix
34 lines
688 B
Nix
|
{ pkgs, lib, config, inputs, ... }:
|
||
|
|
||
|
{
|
||
|
dotenv.enable = true;
|
||
|
|
||
|
packages = with pkgs; [
|
||
|
bacon
|
||
|
cargo-deny
|
||
|
just
|
||
|
postgresql
|
||
|
sqls
|
||
|
sqlx-cli
|
||
|
];
|
||
|
|
||
|
# https://devenv.sh/languages/
|
||
|
languages.rust = {
|
||
|
enable = true;
|
||
|
channel = "stable";
|
||
|
};
|
||
|
|
||
|
services.postgres = {
|
||
|
enable = true;
|
||
|
initialScript = ''
|
||
|
CREATE USER georm WITH PASSWORD 'georm';
|
||
|
CREATE DATABASE georm OWNER georm;
|
||
|
GRANT ALL PRIVILEGES ON DATABASE georm TO georm;
|
||
|
\c georm;
|
||
|
GRANT ALL ON SCHEMA public TO georm;
|
||
|
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO georm;
|
||
|
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO georm;
|
||
|
'';
|
||
|
};
|
||
|
}
|