diff --git a/.envrc b/.envrc index 3550a30..a5dbbcb 100644 --- a/.envrc +++ b/.envrc @@ -1 +1 @@ -use flake +use flake . diff --git a/flake.nix b/flake.nix index da5f0fd..6e57ace 100644 --- a/flake.nix +++ b/flake.nix @@ -1,19 +1,26 @@ { - inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + inputs = { + devshell.url = "github:numtide/devshell"; + flake-parts.url = "github:hercules-ci/flake-parts"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + }; - outputs = inputs: - let - system = "x86_64-linux"; - pkgs = import inputs.nixpkgs { inherit system; }; - in - { - devShells.${system}.default = - with pkgs; - mkShell { - buildInputs = [ - go - gopls - ]; + outputs = + inputs: + inputs.flake-parts.lib.mkFlake { inherit inputs; } { + imports = [ inputs.devshell.flakeModule ]; + + systems = [ "x86_64-linux" ]; + + perSystem = + { pkgs, ... }: + { + devshells.default = { + packages = with pkgs; [ + go + gopls + ]; + }; }; }; }