- Install nixos like you normaly would and use
initial-config.nix
by copying it in/mnt/etc/nixos/configuration.nix
before runningnixos-install
. - Reboot in your new, empty nixos system.
- Use
nixops
to deploy to this new device using the appropriate section of this readme (or clone this repo and install using nixos-rebuild).
Clone this repo using
git clone --recurse-submodules
Update submodules
git submodule update --recursive --remote
Make sure to symlink the corresponding config:
sudo ln -s ${PWD}/nixos/hosts/<Host>/configuration.nix /etc/nixos
# Be sure the hardware-configuration.nix you are linking is up to date!
# Especially after HDD/SSD change!
sudo ln -s ${PWD}/nixos/hosts/<Host>/hardware-configuration.nix /etc/nixos
When first building, specify config using:
sudo nixos-rebuild -I nixos-config=${PWD}/nixos/hosts/<Host>/configuration.nix -I nixpkgs=${HOME}/.nix-defexpr/channels/nixos/nixpkgs switch
https://nixos.org/nixos/manual/#sec-upgrading
nixops ssh-for-each 'nix-collect-garbage -d'
cd nixops
nixops create home.nix Bur.nix Mimir.nix Skuld.nix -d home
nixops deploy -d home # Deploy to all machines
nixops deploy -d home --include Skuld ## Deploy only to Skuld
nixops destroy -d <uid>
nixops delete -d <uid>
nixops list
nixops info -d home
Using a software without installing:
nix run nixpkgs.usbutils -c lsusb
Test a package while developing:
nix-env -f ~/src/github.com/m-gregoire/dotfiles-nix/vendor/nixpkgs-m-gregoire -i <PACKAGE>
Every applications is themed automatically using the defined base16 theme.
I manually created the templates in ./home/theme
expect for a few were I used base16-builder
.