Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/giyomoon/homenix
🏠 NixOS configuration for my homelab
https://github.com/giyomoon/homenix
Last synced: 2 days ago
JSON representation
🏠 NixOS configuration for my homelab
- Host: GitHub
- URL: https://github.com/giyomoon/homenix
- Owner: GiyoMoon
- Created: 2024-09-07T16:23:05.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-12-14T10:01:30.000Z (about 1 month ago)
- Last Synced: 2025-01-22T17:43:39.561Z (4 days ago)
- Language: Nix
- Homepage:
- Size: 103 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Homenix
NixOS configuration for my homelab.
## First time setup
After flashing the base [NixOS image](https://github.com/GiyoMoon/nixos-turing-rk1) to the nodes, some setup is required for this config to work:
1. Change the `sshUser` to `nixos` in `flake.nix`. This is only required for the initial deploy, after that we'll use the root user with an ssh key.
2. Configure `sops-nix` with the node's public age keys.
```bash
# Get public age key on the node
sudo nix-shell -p ssh-to-age --run 'cat /etc/ssh/ssh_host_ed25519_key.pub | ssh-to-age'
# Update keys in `.sops.yaml`
# Re-encrypt files
nix-shell -p sops --run "sops updatekeys secrets/secrets.json"
```
3. Make sure to include your public ssh keys in `./modules/common.nix`.
4. For k3s to work properly, you first need to deploy `node1`, retrieve the server token with `cat /var/lib/rancher/k3s/server/token` and edit it in the secret file to make sure k3s agents can connect to the server.## Deploy
Deploy the config:
```bash
nix run github:serokell/deploy-rs .
```
If you only want to deploy a certain node:
```bash
nix run github:serokell/deploy-rs .#node1
```