mirror of
https://github.com/Horhik/dotfiles.git
synced 2024-11-13 04:03:17 +00:00
936 B
936 B
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 "#."