Skip to content

juliamertz/nix-config

Repository files navigation

My system configurations

Bootstrapping a new system

SSH Keys

Before you try building a nix configuration make sure you've generated a ssh key and derived the sops age key

KEY=~/.ssh/id_ed25519
# Optionally generate a new ssh key if you don't have one
ssh-keygen -t ed25519 -a 32 -C "Name [email protected]" -f $KEY
# Outputs sops age key to ~/.config/sops/age/keys.txt
./scripts/derive-key $KEY

Get Nix

This step can be skipped for NixOS systems...

2. Install Nix

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install

After installation, open a new terminal session to make the nix executable available in your $PATH. You'll need this in the steps ahead.

Rebuilding system

Important

If you're on a new system make sure to generate a hardware configuration

NAME=myname nixos-generate-config --show-hardware-config > ./hardware/$NAME.nix

Then import it for your system configuration in ./flake.nix

  {
    workstation = nixosSystem {
      ...
      modules = base ++ [
        ...
        ./hardware/myname.nix
      ];
    };
  }

To build a configuration and switch to it for the first time run the script in ./scripts/rebuild-switch passing the desired profile name to it as the first argument like this:

./scripts/rebuild-switch homelab

Note

Consider setting up your home directory on a fresh system with ./scripts/setup-home This will clone my dotfiles to the home directory and create ~/notes ~/projects etc..

Dotfiles

All my favourite programs are wrapped and exported from my dotfiles repo These are also included as a flake input in this repository and avaiable under dotfiles.pkgs in the global namespace

# Open up new shell with all my configured software
nix develop github:juliamertz/dotfiles

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published