This repository contains my NixOS system configuration.
It might look like I know what I'm doing, but this repository has been stitched together from examples I've found online.
sudo nixos-rebuild boot --flake .#$machine
(where $machine is the machine name - e.g. terminus).
Because maybe you're curious why this is structured like this. Or maybe you're me coming back after a few months without updating this config.
Roughly:
machinesrepresent physical machines this OS is installed on. Amachinecouples a (possibly customised)hardware-scanresult, with any custom configuration that particular machine requires. Eachmachinehas arole.rolesrepresent the way a particular machine is used. e.g. ahomerole might not install the Slack desktop app, while aworkrole might skip software needed for hobbyist game-dev. Eachrolehas multipleprofiles.profilesrepresent behaviours you want a particular OS install to exhibit. e.g. you might want a specificapplicationinstalled in a specific way, or you might want to make sure a certain set of dotfiles are available in a certain location, or use grub to dual-boot with Windows for gaming purposes.modulesare libraries which can be used to extract common patterns or build abstractions.overlayscan be used to provide additional or overriden packages on top of Nixpkgs. Ideally this isn't too necessary as each likely requires some degree of maintenance.