diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..1d953f4 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use nix diff --git a/.gitignore b/.gitignore index 44cc532..e023299 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .mozilla **/*.tmp.sops.yaml result +.direnv diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 204d9a9..6e5d382 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,11 +2,6 @@ fail_fast: false repos: - - repo: https://github.com/kamadorueda/alejandra - rev: 3.0.0 - hooks: - - id: alejandra-system - - repo: https://github.com/adrienverge/yamllint rev: v1.32.0 hooks: diff --git a/shell.nix b/shell.nix index 459fe9c..0677706 100644 --- a/shell.nix +++ b/shell.nix @@ -1,26 +1,18 @@ -# Shell for bootstrapping flake-enabled nix and other tooling -{ - pkgs ? - # If pkgs is not defined, instanciate nixpkgs from locked commit - let - lock = - (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.nixpkgs.locked; +# Shell for bootstrapping flake-enabled nix and home-manager +{ pkgs ? let + # If pkgs is not defined, instantiate nixpkgs from locked commit + lock = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.nixpkgs.locked; nixpkgs = fetchTarball { url = "https://github.com/nixos/nixpkgs/archive/${lock.rev}.tar.gz"; sha256 = lock.narHash; }; + system = builtins.currentSystem; + overlays = [ ]; # Explicit blank overlay to avoid interference in - import nixpkgs {overlays = [];}, - ... -}: -pkgs.mkShell { - NIX_CONFIG = "extra-experimental-features = nix-command flakes repl-flake"; - nativeBuildInputs = with pkgs; [ - nixpkgs-fmt - nil - sops - pre-commit - go-task - alejandra - ]; + import nixpkgs { inherit system overlays; } +, ... +}: pkgs.mkShell { + # Enable experimental features without having to specify the argument + NIX_CONFIG = "experimental-features = nix-command flakes"; + nativeBuildInputs = with pkgs; [ nix home-manager git nil nixpkgs-fmt go-task sops ]; }