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
2024-04-24 20:45:42 +10:00
.github fet: add pushover notifications 2024-04-24 09:47:06 +10:00
.taskfiles Add restic backups and glances (#89) 2024-04-13 22:46:48 +00:00
.vscode Feat: docs (#98) 2024-04-16 05:14:06 +00:00
docs feat: add shodan! (#119) 2024-04-24 15:50:08 +10:00
flyio/vaultwarden feat: add fly taskfile 2024-04-24 14:37:41 +10:00
images feat: add fly.io deploy workflow 2024-04-24 09:03:45 +10:00
nixos fix: plex 2024-04-24 20:45:42 +10:00
.envrc feat: add direnv shell 2024-03-18 20:02:10 +11:00
.gitignore Feat: containers and helios join the party (#79) 2024-04-10 18:00:25 +10:00
.gitleaksignore feat: warning for adguard schema mismatch (#109) 2024-04-18 11:38:42 +00:00
.pre-commit-config.yaml feat(deps): update pre-commit hook yuvipanda/pre-commit-hook-ensure-sops to v1.1 (#83) 2024-04-14 17:26:19 +10:00
.sops.yaml fix: plex 2024-04-24 20:45:42 +10:00
flake.lock chore(deps): lock file maintenance 2024-04-16 00:41:31 +00:00
flake.nix feat: add shodan! (#119) 2024-04-24 15:50:08 +10:00
garnix.yaml feat: mega-lint 2024-04-08 12:09:00 +10:00
LICENSE Initial commit 2024-03-13 22:52:59 +11:00
mkdocs.yml chore: add site_url 2024-04-16 15:20:41 +10:00
README.md feat: add VW on fly (#116) 2024-04-23 14:49:41 +10:00
shell.nix Feat: docs (#98) 2024-04-16 05:14:06 +00:00
Taskfile.yaml Feat: add probot settings ci & doc comments (#28) 2024-03-27 06:39:44 +00:00

Truxnell's homelab

NixOS NixOS MIT License

renovate built with garnix Code Comprehension

Leveraging nix, nix-os and other funny magic man words to apply machine and home configurations

Repository Documentation

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.
  • keep it simple, use trusted boring tools

TODO

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

Checklist

Adding new node

  • Ensure secrets are grabbed from note and all sops re-encrypte with task sops:re-encrypt
  • Add to relevant github action workflows
  • Add to .github/settings.yaml for PR checks

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

And browsing whats at a certain level in options - or just use nix-inspect TUI

nix eval .#nixosConfigurations.rickenbacker.config.home-manager.users.truxnell --apply builtins.attrNames --json

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

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