Deployment of NixOS
via terraform
with monitoring and log collection along with some packages for the solana cli and wallet tracking
- Login to
aws-cli
- Symlink it to your deployment repository
- Install a
.pem
file for aws deployments- The key name that you used here in the AWS console will be used in the
aws_instance.machine.key_name
- The key name that you used here in the AWS console will be used in the
├── *.auto.tfvars
├── README.md
├── id_rsa.pem
├── main.tf
├── nixos
│ ├── README.md
│ ├── configuration.nix
│ ├── flake.lock
│ ├── flake.nix
│ ├── grafana
│ │ ├── dashboards
│ │ │ ├── logging.json
│ │ │ └── node_exporter.json
│ │ └── grafanaDatasources.yml
│ ├── home.nix
│ └── promtail.yaml
└── variables
└── base.tfvars
- Terraform is used for deploying to various cloud environment
- Terraform
.tfvars
files specified in the./variables
directory for different configurations
- Terraform
- NixOS configurations deployed for deployment of identical systems
- Includes deployment and management of default services
fail2ban
for basic DDOS protectiongrafana
with system monitoring dashboardsloki
for system log collectionprometheus
for system statistics collection
- Includes deployment and management of default services
# copy `variables/base.tfvars`
cp ./variables/base.tfvars *.auto.tfvars
# enter the variables you want to deploy with into `*.auto.tfvars`
# note this is were you enter your AWS keys
# plan and then apply the configuration
terraform plan
terraform apply
If you want to develop on the host remote vscode-server
has been added but you will have to enable once in the server with
systemctl --user enable auto-fix-vscode-server.service
systemctl --user start auto-fix-vscode-server.service
In order to have the address tracking for solana as a dashboard you will need to
# edit `/etc/nixos/services/prometheus_account_exporter/projects/solana/solana.rs` and add your address in the address vector
# build the binary
nix-shell -p cargo libiconv openssl pkgconfig --run "cargo build --release --example solana --feature=hyper_server"
following a standard nixos-rebuld switch --flake /etc/nixos#nixos
you should be good to go