-
Notifications
You must be signed in to change notification settings - Fork 2
/
devenv.nix
36 lines (30 loc) · 900 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
35
36
{ pkgs, config, ... }:
{
env = {
LD_LIBRARY_PATH = "${config.devenv.profile}/lib";
};
packages = with pkgs; [
git
libyaml
terraform
azure-cli
glib
vips
sshuttle
sshpass
rsync
];
languages.ruby.enable = true;
languages.ruby.version = "3.1.6";
scripts.generate-env-file.exec = ''
terraform output -raw devenv_local_nix > devenv.local.nix
'';
scripts.proxy-vps.exec = ''
exec sshuttle -e "ssh -o CheckHostIP=no -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" -r "$(terraform output --raw vm_username)@$(terraform output --raw vm_ip)" 0/0
'';
scripts.start-app-service-ssh.exec = ''
resource_group=$(terraform output --raw "resource_group")
app_name=$(terraform output --raw "app_service_app_name")
exec az webapp create-remote-connection --resource-group $resource_group --name $app_name
'';
}