···55> [!CAUTION]
66> These dots are highly prone to change / breakage.
77>
88-> ~I am not a nix os expert (this is my first time touching nix), so I'm not sure if this will work or not. I'm just trying to get my dots up on github.~
88+> ~~I am not a nix os expert (this is my first time touching nix), so I'm not sure if this will work or not. I'm just trying to get my dots up on github.~~
99>
1010-> After `284` successful days of these dots being in constant operation, many many rebuilds, and `364` commits these dots have been rock solid and I have no complaints.
1010+> After `591` days of these dots being in constant operation, many many rebuilds, and `776` commits these dots have been rock solid and I have no complaints.
11111212## The layout
13131414-```bash
1515-~/dots # symlinked to /etc/nixos
1616-├── dots # any config files that need to be symlinked go here, e.g. my hyprland config
1414+```
1515+~/dots
1616+├── .github/workflows # CI/CD (deploy-rs + per-service reusable workflow)
1717+├── dots # config files symlinked by home-manager
1718│ └── wallpapers
1819├── machines
1919-│ ├── atalanta # my macOS M4 machine
2020-│ ├── ember # my dell r210 server (in my basement)
2121-│ ├── moonlark # my framework 13 <dead>
2222-│ ├── nest # shared tilde server through hc
2323-│ ├── prattle # oracle cloud x86_64 server
2424-│ ├── tacyon # rpi 5
2525-│ └── terebithia # oracle cloud aarch64 server
2020+│ ├── atalanta # macOS M4 (nix-darwin)
2121+│ ├── ember # dell r210 server (basement)
2222+│ ├── moonlark # framework 13 (dead)
2323+│ ├── nest # shared tilde server (home-manager only)
2424+│ ├── prattle # oracle cloud x86_64
2525+│ ├── tacyon # rpi 5
2626+│ └── terebithia # oracle cloud aarch64 (main server)
2627├── modules
2727-│ ├── lib # shared nix utilities
2828-│ │ └── mkService.nix # base service factory
2929-│ ├── home # home-manager modules
2828+│ ├── lib
2929+│ │ └── mkService.nix # service factory (see Deployment section)
3030+│ ├── home # home-manager modules
3031│ │ ├── aesthetics # theming and wallpapers
3131-│ │ ├── apps # any app specific config
3232-│ │ │ └── crush # vendored for now
3333-│ │ ├── system # home-manager system configs
3434-│ │ └── wm # window managers; just hyprland for now
3535-│ │ └── hyprland
3636-│ └── nixos # nixos modules
3737-│ ├── apps # also app specific configs
3838-│ ├── services # self-hosted services with automatic backup
3939-│ │ └── restic # backup system (see modules/nixos/services/restic/README.md)
4040-│ └── system # pam and my fancy wifi module for now
4141-└── secrets # keep your grubby hands (or paws) off my data
4242-4343-16 directories
3232+│ │ ├── apps # app configs (ghostty, helix, git, ssh, etc.)
3333+│ │ ├── system # shell, environment
3434+│ │ └── wm/hyprland
3535+│ └── nixos # nixos modules
3636+│ ├── apps # system-level app configs
3737+│ ├── services # self-hosted services (mkService-based + custom)
3838+│ │ ├── restic # backup system with CLI
3939+│ │ └── bore # tunnel proxy
4040+│ └── system # pam, wifi
4141+├── packages # custom nix packages
4242+└── secrets # agenix-encrypted secrets
4443```
45444645## Installation
···4847> [!WARNING]
4948> Also to note that this configuration will **not** work if you do not change any of the [secrets](./secrets) since they are encrypted.
50495151-You could either install a NixOS machine (rn there is just `moonlark`), use the home-manager instructions, or use nix-darwin for macOS.
5050+You could install a NixOS machine, use the home-manager instructions, or use nix-darwin for macOS.
52515352### macOS with nix-darwin
5453···115114116115#### Using nixos-anywhere (Recommended for remote installations)
117116118118-> [!WARN]
117117+> [!WARNING]
119118> This only currently works with `prattle` and `terebithia` as they have the proper disko configs setup.
120119121120For remote installations (like Oracle Cloud), use [nixos-anywhere](https://github.com/nix-community/nixos-anywhere):
···141140./install.sh
142141```
143142144144-#### The manual way
145145-146146-Install NixOS via the [official guide](https://nixos.org/download.html)
147147-148148-Connect to wifi
149149-150150-```bash
151151-wpa_passphrase your-ESSID your-passphrase | sudo tee /etc/wpa_supplicant.conf
152152-sudo systemctl restart wpa_supplicant
153153-```
143143+#### Post-install
154144155155-Check with `ping 1.1.1.1` if that doesn't work then use `wpa_cli`
156156-157157-```bash
158158-sudo systemctl start wpa_supplicant
159159-wpa_cli
160160-161161-add_network 0
162162-163163-set_network 0 ssid "put your ssid here"
164164-165165-set_network 0 psk "put your password here"
166166-167167-enable network 0
168168-169169-exit
170170-```
171171-172172-Aquire root permissions while keeping your current context with
173173-174174-```bash
175175-sudo -i
176176-```
177177-178178-Enable git and rebuild your flake with the following
179179-180180-```bash
181181-sed -i 's/^{$/{\n programs.git.enable = true;/' /etc/nixos/configuration.nix
182182-nixos-rebuild switch
183183-```
184184-185185-Download the disk configuration and run it
186186-187187-```bash
188188-curl -L https://github.com/taciturnaxolotl/dots/raw/main/moonlark/disk-config.nix -o /tmp/disk-config.nix
189189-nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode destroy,format,mount /tmp/disk-config.nix
190190-```
191191-192192-Run nixos generate config and cd into it
193193-194194-```bash
195195-nixos-generate-config --root /mnt
196196-cd /mnt/etc/nixos
197197-```
198198-199199-Clone this repo to your `/mnt/etc/nixos` folder
200200-201201-```bash
202202-rm *
203203-git clone https://github.com/taciturnaxolotl/dots.git .
204204-```
205205-206206-Add your ssh private key to `/mnt/etc/ssh/id_rsa`
207207-208208-install the flake, and umount the filesystem, and then reboot
209209-210210-```bash
211211-nixos-install --flake .#moonlark --no-root-passwd
212212-reboot
213213-```
214214-215215-Pray to the nix gods that it works 🙏
216216-217217-If it worked then you should be able to login with the user `kierank` and the password `lolzthisaintsecure!`
218218-219219-You should immediately change the password
145145+After first boot, log in with user `kierank` and the default password, then change it immediately:
220146221147```bash
222148passwd kierank
223149```
224150225225-Move the config to your local directory, link to `/etc/nixos`, and change permissions
151151+Move the config to your home directory and symlink:
226152227153```bash
228154sudo mv /etc/nixos ~/dots
229155sudo ln -s ~/dots /etc/nixos
230156sudo chown -R $(id -un):users ~/dots
231231-sudo chown kierank -R ~/dots
232232-sudo chown kierank -R ~/dots/.*
233157```
234158235235-17. Setup the fingerprint reader and verify it works (you may need to swipe your finger across the fingerprint sensor instead of simply laying it there)
236236-237237-```bash
238238-sudo fprintd-enroll -f right-index-finger kierank
239239-sudo fprintd-verify kierank
240240-```
241241-242242-Finally enable [atuin](https://atuin.sh/)
159159+Set up [atuin](https://atuin.sh/) for shell history sync:
243160244161```bash
245162atuin login