mirror of
https://github.com/Phundrak/georm.git
synced 2025-12-16 01:31:52 +01:00
chore: migrate development environment from Nix flakes to devenv
Replace Nix flake-based development setup with devenv for better developer experience and more streamlined environment management. Changes: - Remove flake.nix and flake.lock files - Add devenv.nix, devenv.yaml, and devenv.lock configuration - Update .envrc to use devenv instead of nix develop - Remove Docker development setup (compose.dev.yml, docker/mod.just) - Expand .gitignore with comprehensive IDE and OS exclusions - Remove Docker-related just commands from justfile
This commit is contained in:
36
devenv.nix
Normal file
36
devenv.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{ pkgs, nixpkgs, rust-overlay, ... }:
|
||||
let
|
||||
overlays = [ (import rust-overlay) ];
|
||||
system = pkgs.stdenv.system;
|
||||
rustPkgs = import nixpkgs { inherit system overlays; };
|
||||
rustVersion = (rustPkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml);
|
||||
in {
|
||||
dotenv.enable = true;
|
||||
|
||||
packages = with rustPkgs; [
|
||||
bacon
|
||||
cargo-deny
|
||||
just
|
||||
postgresql
|
||||
sqls
|
||||
sqlx-cli
|
||||
(rustVersion.override {
|
||||
extensions = [
|
||||
"rust-src"
|
||||
"rustfmt"
|
||||
"clippy"
|
||||
"rust-analyzer"
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
services.postgres = {
|
||||
enable = true;
|
||||
listen_addresses = "localhost";
|
||||
initialScript = ''
|
||||
CREATE USER georm WITH PASSWORD 'georm' SUPERUSER;
|
||||
CREATE DATABASE georm OWNER georm;
|
||||
GRANT ALL PRIVILEGES ON DATABASE georm TO georm;
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user