From f514cc25a0d7ee4c36743bf28f4f844e19293156 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 10 Oct 2025 07:13:48 +0100 Subject: [PATCH] Update configuration files Signed-off-by: Oliver Davies --- .envrc | 2 +- flake.nix | 35 +++++++++++++++++++++-------------- 2 files changed, 22 insertions(+), 15 deletions(-) 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 + ]; + }; }; }; }