1
0
Fork 0
mirror of https://github.com/Horhik/dotfiles.git synced 2024-11-13 04:03:17 +00:00
Dotfiles/nix/README.md
2021-08-26 09:47:50 +03:00

936 B

NixOS setup

  1. Backup your old config
$ sudo mv /etc/nixos /etc/nixos.old
  1. 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
  1. Past your hardware-configuration
$ sudo cp /etc/nixos.old/hardware-configuration.nix /etc/nixos/
  1. 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
  1. Copy dotfiles
    stow --adopt -vt ~ $HOME/dotfiles/home/*
    
  2. Build nixos
  cd /etc/nixos
  sudo nixos-rebuild build --flake "#."