Skip to content

Latest commit

 

History

History
61 lines (47 loc) · 2.21 KB

README.md

File metadata and controls

61 lines (47 loc) · 2.21 KB

NixOS Configuration ❄️

Initial setup

  1. Install NixOS (or Nix)

    NB! Make sure $USER- and $HOSTname match the configuration.

  2. Put your SSH key with access to the sops-protected vault and authentication access to your GitHub account on your host (~/.ssh/id_nix),
    and add it to the ssh agent

    eval $(ssh-agent)
    ssh-add ~/.ssh/id_nix
  3. Clone this repository (to path matching $FLAKE)

    git clone git@github.com:runarsf/dotfiles.git ~/.config/nixos
    cd ~/.config/nixos
  4. Copy hardware-configuration.nix to the host configuration

    cp /etc/nixos/hardware-configuration.nix ./hosts/${HOST}/hardware-configuration.nix
  5. Build and switch

    # NB! If your hostname doesn't match the configured one, temporarily change it in the shell
    ./packages/niks/niks.sh os switch --ask --hostname ${HOST:?} .
  6. You should now be able to log in with the same username and the password set in the config (changeme).
    After logging in, make sure to change your password, and check that all the substituters are applied correctly.

    passwd
    
    nix config show | egrep "^substituters"

Useful tools and resources

Core library functions are shamelessly stolen from avatar imatpot/dotfiles