-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevenv.nix
34 lines (29 loc) · 883 Bytes
/
devenv.nix
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
{ pkgs, lib, config, inputs, ... }:
{
packages = [
pkgs.git
pkgs.insomnia
pkgs.kind
pkgs.kubectl
pkgs.kubectl-neat
pkgs.kubernetes-helm
pkgs.helmfile
pkgs.kubeseal
pkgs.terraform
pkgs.cloud-init
];
languages.nix.enable = true;
languages.python.enable = true;
languages.python.directory = "./restapi-flask";
languages.python.venv.enable = true;
languages.python.venv.requirements = ./restapi-flask/requirements.txt;
languages.ansible.enable = true;
scripts.k.exec = ''kubectl "$@"'';
scripts.ta.exec = ''terraform apply -auto-approve'';
scripts.td.exec = ''terraform destroy -auto-approve'';
scripts.gip.exec = ''
sudo virsh domifaddr ubuntu-qcow2 | tail -n 2 | head -n 1 | awk '{print $4}' | tr '/' '\n' | head -n 1
'';
scripts.dossh.exec = ''ssh ubuntu@$(gip)'';
pre-commit.hooks.black.enable = true;
}