NixOS is an awesome Linux distribution that I’m using in my home machine with success. These files are my configuration for it, and it installs and configures all my applications and services.
Nix-Darwin is a way to get NixOS-like configurations on the MacOS system. I’m also using it on my work machine with success.
Notice my configuration only supports x86-64 systems. I don’t have access to an ARM system to try to adapt this configuration for it.
You’ll of course also need to replace my email configuration with your own.
You probably need to replace my hardware-config.nix
with your own
(generated by the NixOS installer) and adjust the configuration.nix
to use your own video drivers (mine uses Nvidia).
After that you need to create one symlink:
sudo rm -rf /etc/nixos && sudo ln -s $PWD/ /etc/nixos
Then you can run:
sudo nixos-rebuild switch
Install nix-darwin according to the official instructions. Then just run
darwin-rebuild switch --flake /path/to/nix-configurations