- Create a new configuration in the machine directory (with a
default.nix
and ahardware.nix
) and symlink thedefault.nix
to/etc/nixos/configuration.nix
:sudo ln -s machine/<machine>/default.nix /etc/nixos/configuration.nix
If you’re on darwin:
sudo ln -s machine/<machine>/default.nix $HOME/.nixpkgs/darwin-configuration.nix
- Symlink the overlays:
sudo ln -s overlays /etc/nixos/overlays
If you’re on darwin:
sudo ln -s overlays $HOME/.nixpkgs/overlays
- Remove your channels ( I use a fixed version of
nixpkgs
managed byniv
)nix-channel --remove <channel_name> # the root channel as well sudo nix-channel --remove <channel_name>
- Rebuild the nixos configuration:
nix-shell --run 'rebuild'
- machine - machine configurations
- modules - reusable chunks to build a machine configuration. Includes
modules from home-manager and
nixos
- overlays - nixpkgs overlays
- pkgs - custom packages that are either not in nixpkgs or are newer versions
source.*
- niv files
- cprussin/dotfiles
- peel/dotfiles - for darwin configs