Skip to content
/ home Public

Versioning $HOME: NixOS configurations, dotfiles, scripts, etc.

License

Notifications You must be signed in to change notification settings

f-f/home

Repository files navigation

home

Versioning $HOME. Contains nix configs, dotfiles, scripts.

Config for NixOS only.

Fresh install, NixOS

  1. Do the whole NixOS install thing, and in another machine put together a basic config in the flake.nix
  2. Clone this repo in the home folder: git clone https://github.com/f-f/home.git ~
  3. Copy out all the content: cd home && find . -maxdepth 1 -exec mv {} .. \;
  4. Fetch everything: cd ~ && git submodule update --init --recursive --remote
  5. Integrate into the config for this hostname the autogenerated hardware-configuration.nix and configuration.nix files, then nixos-switch

At this point is should be possible to ssh from another machine, so the rest can be done remotely:

  1. Add the fzf module:
    mkdir -p .zprezto/contrib && cd $_
    git clone https://github.com/gpanders/fzf-prezto.git fzf
    cd fzf
    git submodule update --init
  2. Make a new ssh key for github: ssh-keygen -t ed25519 -C "$USER+github@$(hostname)" -f github, add it as deploy key here
  3. Replace this repo remote from http to git: git remote set-url origin [email protected]:f-f/home.git

On macOS

It's a little more involved to bootstrap Nix on macOS, but it can be done. After cloning the stuff:

# In case of M1
softwareupdate --install-rosetta

# Install brew and nix
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
curl -L https://nixos.org/nix/install | sh

# Set hostname
export NEW_HOSTNAME=foo
sudo scutil --set HostName $NEW_HOSTNAME
sudo scutil --set LocalHostName $NEW_HOSTNAME
sudo scutil --set ComputerName $NEW_HOSTNAME

# At this point, edit nixos-config/flake.nix to add the new machine

# Then:
nixos-switch

# Note: it will complain at first that the nix command requires experimental features, so that will require executing the script by hand adding the right flags, but after that it's all fine

Useful reads:

About

Versioning $HOME: NixOS configurations, dotfiles, scripts, etc.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published