mirror of
https://github.com/Horhik/dotfiles.git
synced 2024-10-31 22:17:31 +00:00
.. | ||
modules | ||
overlays | ||
packages | ||
programs | ||
configuration.nix | ||
flake.lock | ||
flake.nix | ||
fonts.nix | ||
hardware-configuration.nix | ||
install | ||
README.md |
NixOS setup
- Backup your old config
$ sudo mv /etc/nixos /etc/nixos.old
- Copy repo and symlink new config from dotfiles
$ git clone https://github.com/horhik/dotfiles
$ cd dotfiles
$ sudo ln -s $HOME/dotfiles/nix /etc/nixos
- Past your hardware-configuration
$ sudo cp /etc/nixos.old/hardware-configuration.nix /etc/nixos/
- Install home-manager
$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
$ nix-channel --update
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-21.05.tar.gz home-manager
$ nix-channel --update
export NIX_PATH=$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH
$ nix-shell '<home-manager>' -A install
- Copy dotfiles
stow --adopt -vt ~ $HOME/dotfiles/home/*
- Build nixos
cd /etc/nixos
sudo nixos-rebuild build --flake "#."