-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
58 lines (56 loc) · 1.6 KB
/
flake.nix
File metadata and controls
58 lines (56 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
description = "A development environment with Taskfile";
inputs = {
# Pinning a specific version of nixpkgs for reproducibility
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
};
outputs = { self, nixpkgs, ... }:
let
# Define the systems we want to support
supportedSystems = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ];
# Helper function to generate outputs for all supported systems
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
in
{
# Define formatters for each system
formatter = forAllSystems (system:
nixpkgs.legacyPackages.${system}.nixpkgs-fmt
);
# Define development shells
devShells = forAllSystems (system:
let
pkgs = import nixpkgs { inherit system; };
go = pkgs.go_1_23;
in
{
default = pkgs.mkShell {
# List packages you want available in the shell's PATH
packages = with pkgs; [
bash
chezmoi #
delve
gh
git
go-task # https://taskfile.dev/
go-tools
gofumpt
act
golangci-lint
golines
#gopls
goreleaser
#gosh
gotools
neo-cowsay
svu
nixpkgs-fmt
];
shellHook = ''
echo "🚀 Development environment loaded!"
echo "Run 'task --list' to see available tasks"
'';
};
}
);
};
}