Skip to content

Commit

Permalink
Merge pull request #29 from pub-solar/feat/flake-parts-devshell
Browse files Browse the repository at this point in the history
feat: use flake-parts for nix devshell
  • Loading branch information
teutat3s authored Nov 20, 2023
2 parents ab741da + 22b6606 commit 92acd30
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 38 deletions.
92 changes: 70 additions & 22 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 16 additions & 16 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
{
description = "hosting.de terraform provider";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
inputs.devshell.url = "github:numtide/devshell";
inputs.flake-parts.url = "github:hercules-ci/flake-parts";

flake-utils.url = "github:numtide/flake-utils";
outputs = inputs@{ self, flake-parts, devshell, nixpkgs }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
devshell.flakeModule
];

devshell.url = "github:numtide/devshell";
devshell.inputs.flake-utils.follows = "flake-utils";
devshell.inputs.nixpkgs.follows = "nixpkgs";
};
systems = [
"x86_64-linux"
];

outputs = { self, flake-utils, devshell, nixpkgs }:
flake-utils.lib.simpleFlake {
inherit self nixpkgs;
name = "hosting.de terraform provider";
overlay = devshell.overlays.default;
shell = { pkgs }:
pkgs.devshell.mkShell {
perSystem = { pkgs, ... }: {
devshells.default = {
# Add additional packages you'd like to be available in your devshell
# PATH here
devshell.packages = with pkgs; [
packages = with pkgs; [
go
errcheck
go-tools
Expand All @@ -29,8 +28,9 @@
];
bash.extra = ''
export GOPATH=~/.local/share/go
export PATH=$GOPATH:$PATH
export PATH=$GOPATH/bin:$PATH
'';
};
};
};
}

0 comments on commit 92acd30

Please sign in to comment.