No description
This repository has been archived on 2024-07-08. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
renovate[bot] 1db0c9c058 ci(github-action)!: Update actions/checkout action to v4 (#14)
| datasource  | package          | from | to |
| ----------- | ---------------- | ---- | -- |
| github-tags | actions/checkout | v2   | v4 |

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Truxnell <19149206+truxnell@users.noreply.github.com>
2024-03-26 20:44:31 +00:00
.github ci(github-action)!: Update actions/checkout action to v4 (#14) 2024-03-26 20:44:31 +00:00
.taskfiles fix: finish hax? 2024-03-26 21:11:56 +11:00
.vscode fix: setting up sops 2024-03-16 23:46:36 +11:00
docs chore: hax 2024-03-25 22:51:18 +11:00
images chore: initial format 2024-03-18 20:26:02 +11:00
nixos Merge branch 'main' of https://github.com/truxnell/nix-config into module-refactor 2024-03-26 23:23:10 +11:00
.envrc feat: add direnv shell 2024-03-18 20:02:10 +11:00
.gitignore feat: add direnv shell 2024-03-18 20:02:10 +11:00
.pre-commit-config.yaml feat(deps): update pre-commit hook adrienverge/yamllint to v1.35.1 (#12) 2024-03-26 11:57:00 +00:00
.sops.yaml chore: update dns01 key (#8) 2024-03-26 10:58:20 +00:00
flake.lock chore: update flake 2024-03-19 12:41:19 +11:00
flake.nix fix 2024-03-26 23:26:32 +11:00
garnix.yaml feat: add garnix 2024-03-25 19:48:43 +11:00
LICENSE Initial commit 2024-03-13 22:52:59 +11:00
partition.sh chore: misc changes for pi setup 2024-03-21 09:17:01 +11:00
README.md Merge branch 'main' of https://github.com/truxnell/nix-config into module-refactor 2024-03-26 23:23:10 +11:00
renovate.json chore(deps): add renovate.json 2024-03-26 11:39:32 +00:00
shell.nix feat: initial lint 2024-03-18 20:06:00 +11:00
Taskfile.yaml chore: initial format 2024-03-18 20:26:02 +11:00

Truxnell's homelab

NixOS NixOS MIT License

built with garnix

Leveraging nix, nix-os to apply machine and home configurations

Background

Having used a variety of infracture as code solutions - and having found them lacking in some areas, it is time to give nix a go. Frustrations with other methods tend to be bitrot and config drift - very annoying to want to do a quick disaster recovery and find your have different versions of modules/utilities, breaking changes in code you didnt catch, etc.

Getting started

To Install

# nixos-rebuild switch --flake github:truxnell/nix-config#HOST

Goals

  • Learn nix
  • Mostly reproduce features from my existing homelab
  • Replace existing ubuntu-based 'NAS'
  • Expand usage to other shell environments such as WSL, etc
  • handle secrets - decide between sweet and simple SOPS or re-use my doppler setup.

TODO

  • Github Actions update fly.io instances (Bitwarden)
  • Bring over hosts
    • DNS01 Raspi4
    • DNS02 Raspi4
    • NAS
    • Latop
    • WSL
    • JJY emulator Raspi4
  • Documentation!
  • ssh_config build from computers?
  • Modularise host to allow vm builds and hw builds
  • Add license
  • Add taskfiles

Network map

TBC

Hardware

TBC

Applying configuration changes on a local machine can be done as follows:

cd ~/dotfiles
sudo nixos-rebuild switch --flake .
# This will automatically pick the configuration name based on the hostname

Applying configuration changes to a remote machine can be done as follows:

cd ~/dotfiles
nixos-rebuild switch --flake .#nameOfMachine --target-host machineToSshInto --use-remote-sudo

Hacking at nix files

Eval config to see what keys are being set.

nix eval .#nixosConfigurations.rickenbacker.config.security.sudo.WheelNeedsPassword
nix eval .#nixosConfigurations.rickenbacker.config.mySystem.security.wheelNeedsPassword

Quickly run a flake to see what the next error message is as you hack.

nixos-rebuild dry-run --flake . --fast --impure