4 ms·
I switched to NixOS two years ago , and have installed it on about 6 personal machines, both latpops and desktops. I don't bother with building a custom ISO.
by the_duke 4y ago
I switched to NixOS two years ago , and have installed it on about 6 personal machines, both latpops and desktops.
I don't bother with building a custom ISO.
The way I do it:
* Boot with the default ISO
* Format the disk
* Git clone my dotfiles repo with all the configs
* Generate the hardware config and extend my flake.nix with the new machine.
* Install with my dotfiles config
* Reboot (aka profit!)
I can complete the whole process in about 10 minutes (on a fast CPU and with a good network).
Customizing the config up front, building the custom ISO , and writing it to a USB stick takes up way more time than just doing the above.
- infogulch 4y agoI guess ISOs are more useful if you're commissioning a fleet of identical machines.
- anon291 4y agoI don't even do that. My workflow is really easy. 1. Use netboot.xyz to boot Nixos 2. Copy over nix configurations. I use nix flakes, so I can pre-build all my packages on another machine and debug the config in a more comfortable environment. 3. Run nixos-install (and generate a hardware config if needed). 4. Reboot
- bmcgee84 4y agoNothing wrong with the workflow you described, done much the same in the past myself.
- abrouwers 4y agoOut of curiosity, how often do you "set things up from scratch?". It's such a rare thing for me, that usually dumping my list of installed packages / installing those, and then bringing in modified configs, is way less work than learning something as complex as Nix.
- indemnity 4y agoI'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.