Flaked it up

This commit is contained in:
2026-04-18 16:52:10 -04:00
parent 4b742ff211
commit 134a68f5ac
4 changed files with 100 additions and 0 deletions

1
backend/.envrc Normal file
View File

@@ -0,0 +1 @@
use flake

3
backend/.gitignore vendored
View File

@@ -35,3 +35,6 @@ out/
### VS Code ###
.vscode/
### Direnv ###
.direnv/

61
backend/flake.lock generated Normal file
View File

@@ -0,0 +1,61 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1776169885,
"narHash": "sha256-l/iNYDZ4bGOAFQY2q8y5OAfBBtrDAaPuRQqWaFHVRXM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4bd9165a9165d7b5e33ae57f3eecbcb28fb231c9",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

35
backend/flake.nix Normal file
View File

@@ -0,0 +1,35 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system};
in {
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
jdk25
gradle
];
shellHook = ''
mkdir -p .vscode
cat <<EOF > .vscode/settings.json
{
"java.compile.nullAnalysis.mode": "disabled",
"gradle.reuseTerminals": "all",
"java.import.gradle.java.home": "${pkgs.jdk25}/lib/openjdk",
"java.import.gradle.home": "${pkgs.gradle}/libexec/gradle",
"java.import.gradle.wrapper.enabled": false
}
EOF
echo Java Flake development environment ready!
'';
};
}
);
}