Created
September 4, 2025 06:06
-
-
Save Widdershin/e4128ead1a7fc2a8669e758021d63e4f to your computer and use it in GitHub Desktop.
flake.nix template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dotenv_if_exists .env | |
if ! has nix_direnv_version || ! nix_direnv_version 3.1.0; then | |
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.1.0/direnvrc" "sha256-yMJ2OVMzrFaDPn7q8nCBZFRYpL/f0RcHzhmw/i6btJM=" | |
fi | |
if has nix; then | |
use_flake . | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "Basic devshell"; | |
inputs = { | |
# Uses the latest stable Nixpkgs release | |
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.05"; | |
# flake-utils is used to simplify multi-system support | |
flake-utils.url = "github:numtide/flake-utils"; | |
}; | |
outputs = | |
{ | |
self, | |
nixpkgs, | |
flake-utils, | |
}: | |
flake-utils.lib.eachDefaultSystem ( | |
system: | |
let | |
pkgs = nixpkgs.legacyPackages.${system}; | |
in | |
{ | |
# Use nix develop to enter the dev shell | |
devShells.default = pkgs.mkShell { | |
buildInputs = [ | |
# Add your development dependencies here | |
pkgs.nodejs_24 | |
]; | |
}; | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment