Skip to content

❄️ Personal NixOS configuration

Notifications You must be signed in to change notification settings

runarsf/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NixOS Configuration ❄️

Initial setup

  1. Install NixOS (or Nix)

    NB! Make sure user- $USER and hostname $HOST match the configuration.

  2. Put your SSH key with access to the sops-protected vault and 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 [email protected]: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