A place for me to dump nix configs
deploy-rs is used to deploy the configurations.
# all hosts
nix run github:serokell/deploy-rs -- -s "."
# per host
nix run github:serokell/deploy-rs -- -s ".#dennis"
catalog.nix
is a global state file of sorts. The idea is that anything that is shared across nodes is defined here so that they can build their respective configs.
Services is a mapping of service name to service attributes, it can accept:
host
- The node that runs this service
port
- Port this service runs on
dns.enable
- Whether a DNS rewrite entry should be created on the DNS server
- i.e. gives the service a
$SERVICE.svc.joannet.casa
hostname
dashy.section
- What section in dashy it should fall under
dashy.description
- The description to use in dashy
dashy.icon
- The icon to display in dashy
blackbox.name
- Whether the service name in healthchecks differs from the DNS name
blackbox.path
- The path that blackbox healthchecks should use, if it differs from root
/
- The path that blackbox healthchecks should use, if it differs from root
- dee
- Raspberry Pi 4 4GB
- Replaced dee_rpi3
- dennis
- VM on a Proxmox hypervisor
- macbook
- MBP with nix-darwin
Hosts are defined in nodes
, which can have these attributes:
ip.private
- Private IP address
ip.tailscale
- IP address as tailscale sees it
domain
- If the host is on an 'external' domain to the homelab
shouldScrape
- If Prometheus should scrape this node for metrics
- This is only temporary while I decom the non-NixOS hosts
isNixOS
- Whether this node is on NixOS or not
- Infers some properties about the node
-
Update nix flake
nix flake upgrade
-
Update overlays
-
Update container images
- Go here for how blank hashes are structured
- If after updating there are complaints about options no longer present, it's likely that they are no longer available, so they need to be removed
- You can use
nixos-option
to find what options are available, and their specification
- Better file structure, look to flake-parts for this
- i.e.:
- generic Nix settings across all systems
- generic NixOS
- generic nix-darwin
- host-level configs
- generic home-manager
- generic Linux home-manager
- generic macOS home-manager
- i.e.:
Resources that I've used to help create the repo, please follow them as they are more talented engineers than I!