feat: add direnv shell
This commit is contained in:
parent
c807e69147
commit
8f96fbb0c5
4 changed files with 14 additions and 25 deletions
1
.envrc
Normal file
1
.envrc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
use nix
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
.mozilla
|
.mozilla
|
||||||
**/*.tmp.sops.yaml
|
**/*.tmp.sops.yaml
|
||||||
result
|
result
|
||||||
|
.direnv
|
||||||
|
|
|
@ -2,11 +2,6 @@
|
||||||
fail_fast: false
|
fail_fast: false
|
||||||
|
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/kamadorueda/alejandra
|
|
||||||
rev: 3.0.0
|
|
||||||
hooks:
|
|
||||||
- id: alejandra-system
|
|
||||||
|
|
||||||
- repo: https://github.com/adrienverge/yamllint
|
- repo: https://github.com/adrienverge/yamllint
|
||||||
rev: v1.32.0
|
rev: v1.32.0
|
||||||
hooks:
|
hooks:
|
||||||
|
|
32
shell.nix
32
shell.nix
|
@ -1,26 +1,18 @@
|
||||||
# Shell for bootstrapping flake-enabled nix and other tooling
|
# Shell for bootstrapping flake-enabled nix and home-manager
|
||||||
{
|
{ pkgs ? let
|
||||||
pkgs ?
|
# If pkgs is not defined, instantiate nixpkgs from locked commit
|
||||||
# If pkgs is not defined, instanciate nixpkgs from locked commit
|
lock = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.nixpkgs.locked;
|
||||||
let
|
|
||||||
lock =
|
|
||||||
(builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.nixpkgs.locked;
|
|
||||||
nixpkgs = fetchTarball {
|
nixpkgs = fetchTarball {
|
||||||
url = "https://github.com/nixos/nixpkgs/archive/${lock.rev}.tar.gz";
|
url = "https://github.com/nixos/nixpkgs/archive/${lock.rev}.tar.gz";
|
||||||
sha256 = lock.narHash;
|
sha256 = lock.narHash;
|
||||||
};
|
};
|
||||||
|
system = builtins.currentSystem;
|
||||||
|
overlays = [ ]; # Explicit blank overlay to avoid interference
|
||||||
in
|
in
|
||||||
import nixpkgs {overlays = [];},
|
import nixpkgs { inherit system overlays; }
|
||||||
...
|
, ...
|
||||||
}:
|
}: pkgs.mkShell {
|
||||||
pkgs.mkShell {
|
# Enable experimental features without having to specify the argument
|
||||||
NIX_CONFIG = "extra-experimental-features = nix-command flakes repl-flake";
|
NIX_CONFIG = "experimental-features = nix-command flakes";
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [ nix home-manager git nil nixpkgs-fmt go-task sops ];
|
||||||
nixpkgs-fmt
|
|
||||||
nil
|
|
||||||
sops
|
|
||||||
pre-commit
|
|
||||||
go-task
|
|
||||||
alejandra
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue