diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/flake.lock b/flake.lock index e12ff47..710e4d1 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,28 @@ { "nodes": { + "alejandra": { + "inputs": { + "fenix": "fenix", + "flakeCompat": "flakeCompat", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1744324181, + "narHash": "sha256-Oi1n2ncF4/AWeY6X55o2FddIRICokbciqFYK64XorYk=", + "owner": "kamadorueda", + "repo": "alejandra", + "rev": "3e2a85506627062313e131bf8a85315f3387c8e0", + "type": "github" + }, + "original": { + "owner": "kamadorueda", + "ref": "4.0.0", + "repo": "alejandra", + "type": "github" + } + }, "elisp-helpers": { "inputs": { "fromElisp": "fromElisp" @@ -53,6 +76,28 @@ "type": "github" } }, + "fenix": { + "inputs": { + "nixpkgs": [ + "alejandra", + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1730615655, + "narHash": "sha256-2HBR3zLn57LXKNRtxBb+O+uDqHM4n0pz51rPayMl4cg=", + "owner": "nix-community", + "repo": "fenix", + "rev": "efeb50e2535b17ffd4a135e6e3e5fd60a525180c", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -89,6 +134,22 @@ "type": "github" } }, + "flakeCompat": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "fromElisp": { "flake": false, "locked": { @@ -239,6 +300,7 @@ }, "root": { "inputs": { + "alejandra": "alejandra", "emacs-builtins": "emacs-builtins", "epkgs": "epkgs", "flake-parts": "flake-parts_2", @@ -251,6 +313,23 @@ "twist": "twist" } }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1730555913, + "narHash": "sha256-KNHZUlqsEibg3YtfUyOFQSofP8hp1HKoY+laoesBxRM=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "f17a5bbfd0969ba2e63a74505a80e55ecb174ed9", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index 6be36f5..cff555e 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,11 @@ { inputs = { + alejandra = { + url = "github:kamadorueda/alejandra/4.0.0"; + inputs = { + nixpkgs.follows = "nixpkgs"; + }; + }; flake-parts.url = "github:hercules-ci/flake-parts"; systems.url = "github:nix-systems/default"; twist.url = "github:emacs-twist/twist.nix"; @@ -38,6 +44,13 @@ perSystem = { config, pkgs, ... }: let emacs-package = pkgs.emacs; in { + devShells.default = pkgs.mkShell { + buildInputs = with pkgs; [ + nil + just + alejandra + ]; + }; packages = { emacs = (inputs.twist.lib.makeEnv { inherit pkgs; diff --git a/justfile b/justfile new file mode 100644 index 0000000..8cf65b5 --- /dev/null +++ b/justfile @@ -0,0 +1,6 @@ +lock *args: + @nix run '.#lock' --impure -- {{args}} +update *args: + @nix run '.#update' --impure -- {{args}} +test *args: + @nix run '.#emacs' -- --init-directory . {{args}}