A collection of personal Ansible/nixOS scripts.
host description NixOS Ansible
doylestone01 Dual-boot Ryzen desktop: Win11
doylestone02 Dual-boot Ryzen desktop: Ubuntu 22.04 ✅
doylestone03 Dual-boot Ryzen desktop: VM ✅
doylestone04 Dual-boot L380: Win11
doylestone05 rPi 400: monitoring, pi-hole etc
doylestone06 Dual-boot L380: NixOS ✅
madebyjon T480s NixOS ✅
Basic scripts for provisioning my dev laptop
cd nixos-config; make deploy
Coming to a fresh, new, machine? Read how to set up a git managed Flake on NixOS from scratch fresh-nixos-guide.md
- [x] Modularise
- [x] How to use this on a vanilla install NixOS
-
Keys:
-
Ensure public key for controller is in
authorized_keys
ondoylestone02
-
For GitHub ssh clone, copy private key to target
scp ~/.ssh/id_rsa fam@doylestone02:/home/fam/.ssh/
-
-
Activate virtualenv to gain access to Ansible
➜ cd provision-doylestone02/ansible ➜ poetry install
-
Sanity check Ansible connection with setup module
➜ ansible -i inventory doylestone02 -m setup 192.168.0.203 | SUCCESS => { "ansible_facts": { "ansible_all_ipv4_addresses": [ "192.168.0.97", "192.168.0.203" ], "ansible_all_ipv6_addresses": [ "fe80::b3ca:7bdf:f2d8:b7aa", "fe80::3ef5:2964:8942:db19" ], "ansible_apparmor": { "status": "enabled" }, "ansible_architecture": "x86_64", ... }
-
Run playbook
➜ pwd /home/jon/code/provisioning/provision-doylestone02/ansible ➜ ansible-playbook main.yml --vault-password-file=../../.vault-password
- code-server
- Jenkins
Run the Vagrantfile
with vagrant up --provision
to start the VM. Jenkins will be available on port 8080
➜ pwd
/home/jon/code/provisioning/provision-doylestone03/
➜ vagrant up --provision