forked from offsecginger/CTFd-Docker-Challenges
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
58 lines (53 loc) · 1.46 KB
/
Copy pathflake.nix
File metadata and controls
58 lines (53 loc) · 1.46 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 = "project_name";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
systems.url = "github:nix-systems/default";
};
outputs = {
self,
nixpkgs,
systems,
...
}: let
forEachSystem = nixpkgs.lib.genAttrs (import systems);
pkgsFor = forEachSystem (system: import nixpkgs {inherit system; config.allowUnfree = true;});
in {
formatter = forEachSystem (system: pkgsFor.${system}.alejandra);
devShells = forEachSystem (system: {
default = pkgsFor.${system}.mkShell {
packages = with pkgsFor.${system}; [
# DevOps tools
packer
ansible
terraform
docker
python3
vagrant
# LSPs
terraform-ls
ansible-language-server
bash-language-server
yaml-language-server
dockerfile-language-server-nodejs
vscode-langservers-extracted # includes html, css, json, eslint
sshpass # ansible
# Optional: Go, Node.js, etc.
go
nodejs
nodePackages.npm
nodePackages.typescript-language-server
];
};
});
packages = forEachSystem (system: {
default = pkgsFor.${system}.hello;
});
apps = forEachSystem (system: {
default = {
type = "app";
program = "${self.packages.${system}.default}/bin/hello";
};
});
};
}