-
Notifications
You must be signed in to change notification settings - Fork 260
Expand file tree
/
Copy pathflake.nix
More file actions
40 lines (36 loc) · 1.04 KB
/
flake.nix
File metadata and controls
40 lines (36 loc) · 1.04 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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
systems.url = "github:nix-systems/default";
treefmt-nix.url = "github:numtide/treefmt-nix";
};
outputs =
{
nixpkgs,
systems,
treefmt-nix,
...
}:
let
forAllSystems =
function: nixpkgs.lib.genAttrs (import systems) (system: function nixpkgs.legacyPackages.${system});
treefmtEval = forAllSystems (pkgs: treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
in
{
formatter = forAllSystems (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
checks = forAllSystems (pkgs: {
formatting = treefmtEval.${pkgs.system}.config.build.check (pkgs.path or ./.);
});
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
name = "Shell with Go toolchain";
packages = with pkgs; [
go
gopls
];
};
});
nixosModules.default = import ./nix/nixos.nix;
hmModules.default = import ./nix/home-manager.nix;
};
}