3 ms·
I'm trying to get something like this, but here's my situation: - I have two M1 Macs, running MacOS - I have a Ryzen desktop that dual-boots Windows 11 and Ni
by indemnity 4y ago
I'm trying to get something like this, but here's my situation:
- I have two M1 Macs, running MacOS
- I have a Ryzen desktop that dual-boots Windows 11 and NixOS 22.11
I would like to have one dotfiles repo with all my configs and home-manager setup, as well as the system / hardware config for the bare-metal NixOS installations.
I have gotten these working independently, but I still can't quite make the leap in a single repo to:
- Having some config be machine-specific
- Having other config be OS-specific
- On a particular machine (same OS - macOS), having some slightly different config, because it's a work machine vs personal (e.g. different .gitconfig setups).
Can all of the above be addressed with Nix?
There seems to be an assumption either you have gone all-in using NixOS (e.g. in a VM inside host OS, or bare-metal), or you are just using the package manager (+ a subset of home-manager), e.g. macOS or WSL inside Windows.
But on the whole, 80% of what I want to set up and configure is machine-agnostic (NeoVIM, fish shell, basic CLI utilities, etc), and I use direnv/shell.nix in individual project folders to load the tooling for that project.
- nalllar 4y agoYou want to split your config up into separate .nix files, with common parts living separately from machine specific parts. Then you can have multiple system and home configs that import the common files and then add your own config. You can also pass options in with suecialArgs / extraSpecialArgs to the nixos/hm modiles.