diff --git a/.envrc b/.envrc index 5bf8fc1..e2be889 100644 --- a/.envrc +++ b/.envrc @@ -1,3 +1,7 @@ -source_url "https://raw.githubusercontent.com/cachix/devenv/95f329d49a8a5289d31e0982652f7058a189bfca/direnvrc" "sha256-d+8cBpDfDBj41inrADaJt+bDWhOktwslgoP5YiGJ1v0=" +#!/usr/bin/env bash -use devenv \ No newline at end of file +export DIRENV_WARN_TIMEOUT=20s + +eval "$(devenv direnvrc)" + +use devenv diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 01b9437..d4c53bd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,13 +11,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v26 - - uses: cachix/cachix-action@v14 + - uses: actions/checkout@v6 + - uses: cachix/install-nix-action@v31 + - uses: cachix/cachix-action@v17 with: name: devenv - name: Install devenv.sh - run: nix profile install nixpkgs#devenv + run: nix profile add nixpkgs#devenv - name: Build the devenv shell and run any pre-commit hooks run: devenv test diff --git a/devenv.lock b/devenv.lock index 82b9209..560a19e 100644 --- a/devenv.lock +++ b/devenv.lock @@ -3,10 +3,10 @@ "devenv": { "locked": { "dir": "src/modules", - "lastModified": 1731169617, + "lastModified": 1773937316, "owner": "cachix", "repo": "devenv", - "rev": "983153344922e5fb8545aae7e5e70127da981a71", + "rev": "450735a11ddd934e923aaea8b693336d31e7df32", "type": "github" }, "original": { @@ -19,30 +19,49 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1696426674, - "owner": "edolstra", + "lastModified": 1767039857, + "owner": "NixOS", "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", "type": "github" }, "original": { - "owner": "edolstra", + "owner": "NixOS", "repo": "flake-compat", "type": "github" } }, + "git-hooks": { + "inputs": { + "flake-compat": "flake-compat", + "gitignore": "gitignore", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1772893680, + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "8baab586afc9c9b57645a734c820e4ac0a604af9", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, "gitignore": { "inputs": { "nixpkgs": [ - "pre-commit-hooks", + "git-hooks", "nixpkgs" ] }, "locked": { - "lastModified": 1709087332, + "lastModified": 1762808025, "owner": "hercules-ci", "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c", "type": "github" }, "original": { @@ -53,61 +72,62 @@ }, "nixpkgs": { "locked": { - "lastModified": 1716977621, - "owner": "cachix", - "repo": "devenv-nixpkgs", - "rev": "4267e705586473d3e5c8d50299e71503f16a6fb6", + "lastModified": 1773628058, + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f8573b9c935cfaa162dd62cc9e75ae2db86f85df", "type": "github" }, "original": { - "owner": "cachix", - "ref": "rolling", - "repo": "devenv-nixpkgs", + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", "type": "github" } }, - "nixpkgs-stable": { + "nixpkgs-src": { + "flake": false, "locked": { - "lastModified": 1730963269, + "lastModified": 1769922788, + "narHash": "sha256-H3AfG4ObMDTkTJYkd8cz1/RbY9LatN5Mk4UF48VuSXc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "83fb6c028368e465cd19bb127b86f971a5e41ebc", + "rev": "207d15f1a6603226e1e223dc79ac29c7846da32e", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-24.05", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } }, - "pre-commit-hooks": { + "nixpkgs_2": { "inputs": { - "flake-compat": "flake-compat", - "gitignore": "gitignore", - "nixpkgs": [ - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable" + "nixpkgs-src": "nixpkgs-src" }, "locked": { - "lastModified": 1730814269, + "lastModified": 1773704619, "owner": "cachix", - "repo": "pre-commit-hooks.nix", - "rev": "d70155fdc00df4628446352fc58adc640cd705c2", + "repo": "devenv-nixpkgs", + "rev": "906534d75b0e2fe74a719559dfb1ad3563485f43", "type": "github" }, "original": { "owner": "cachix", - "repo": "pre-commit-hooks.nix", + "ref": "rolling", + "repo": "devenv-nixpkgs", "type": "github" } }, "root": { "inputs": { "devenv": "devenv", - "nixpkgs": "nixpkgs", - "pre-commit-hooks": "pre-commit-hooks" + "git-hooks": "git-hooks", + "nixpkgs": "nixpkgs_2", + "pre-commit-hooks": [ + "git-hooks" + ] } } }, diff --git a/devenv.nix b/devenv.nix index c59d2a1..772df4a 100644 --- a/devenv.nix +++ b/devenv.nix @@ -1,6 +1,8 @@ -{ pkgs, lib, config, inputs, ... }: +{ pkgs, ... }: { + devenv.warnOnNewVersion = false; + languages.java.enable = true; languages.java.maven.enable = true; languages.javascript.enable = true; @@ -11,7 +13,5 @@ osmctools ]; - pre-commit.hooks = { - conform.enable = true; - }; + git-hooks.hooks.conform.enable = true; } diff --git a/devenv.yaml b/devenv.yaml index 116a2ad..658e484 100644 --- a/devenv.yaml +++ b/devenv.yaml @@ -1,15 +1,5 @@ -# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json inputs: + git-hooks: + url: github:cachix/git-hooks.nix nixpkgs: url: github:cachix/devenv-nixpkgs/rolling - -# If you're using non-OSS software, you can set allowUnfree to true. -# allowUnfree: true - -# If you're willing to use a package that's vulnerable -# permittedInsecurePackages: -# - "openssl-1.1.1w" - -# If you have more than one devenv you can merge them -#imports: -# - ./backend