1
0
Fork 0
mirror of https://github.com/Horhik/dotfiles.git synced 2024-11-10 19:03:13 +00:00
Dotfiles/nix
2021-08-26 09:47:50 +03:00
..
modules return to nixos 2021-08-26 09:47:50 +03:00
overlays some updtaes 2021-06-10 16:44:00 +03:00
packages some updtaes 2021-06-10 16:44:00 +03:00
programs some updtaes 2021-06-10 16:44:00 +03:00
configuration.nix return to nixos 2021-08-26 09:47:50 +03:00
flake.lock some updtaes 2021-06-10 16:44:00 +03:00
flake.nix return to nixos 2021-08-26 09:47:50 +03:00
fonts.nix some updtaes 2021-06-10 16:44:00 +03:00
hardware-configuration.nix return to nixos 2021-08-26 09:47:50 +03:00
install some updtaes 2021-06-10 16:44:00 +03:00
README.md return to nixos 2021-08-26 09:47:50 +03:00

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 "#."