-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdevshell.nix
More file actions
70 lines (66 loc) · 1.55 KB
/
devshell.nix
File metadata and controls
70 lines (66 loc) · 1.55 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
59
60
61
62
63
64
65
66
67
68
69
70
{
pkgs,
perSystem,
flake,
...
}:
perSystem.devshell.mkShell {
# Set name of devshell from config
devshell.name = "suderman/nixos";
# Startup script of devshell, plus extra
devshell.startup.nixos.text = "";
env = [
{
name = "DERIVATION_INDEX";
value = toString flake.derivationIndex;
}
];
# Base list of commands for devshell, plus extra
commands = [
{
category = "development";
name = "nixos";
help = "Deploy hosts and generate files";
package = perSystem.self.default;
}
{
category = "development";
name = "agenix";
help = "Manage secrets and identity";
package = perSystem.self.agenix;
}
{
category = "development";
name = "browse";
help = "Browse flake";
command = "nix-inspect --path .";
}
{
category = "development";
name = "cachix-push";
help = "Push devshell to binary cache";
command =
# bash
''
sys=$(nix eval --raw --impure --expr builtins.currentSystem)
out=$(nix build --no-link --print-out-paths ".#devShells.''${sys}.default")
nix path-info -r "$out" | cachix push suderman
'';
}
];
# Base list of packages for devshell, plus extra
packages = [
pkgs.age
pkgs.alejandra
pkgs.cachix
pkgs.git
pkgs.nix-inspect
pkgs.openssl
(pkgs.python3.withPackages (ps: [ps.cryptography]))
perSystem.self.agenix
perSystem.self.default
perSystem.self.derive
perSystem.self.ipaddr
perSystem.self.sshed
];
}