Skip to content

snyssen/nixos-config

Repository files navigation

nixos-config

Initial setup

  1. Install NixOS using the official ISO
  2. Generate an SSH key with ssh-keygen and save the public key in github
  3. Start a nix shell with git in it
nix --extra-experimental-features 'nix-command flakes' shell nixpkgs#git
  1. Clone this repo
git clone [email protected]:snyssen/nixos-config.git && cd nixos-config
  1. Generate a new hardware-configuration.nix file for your host and add it to staged changes
nixos-generate-config --dir hosts/[host]/
git add hosts/[host]/hardware-configuration.nix
  1. Switch to the host configuration
sudo nixos-rebuild switch --flake .#[host]

Commands

Tip

You can use the Nix Determinate installter to install nix on any Linux distro

Unlock secrets file (depends on having the GPG private key locally)

nix shell nixpkgs#git-crypt --command git-crypt unlock

Switch to specific config, e.g. gaming

sudo nixos-rebuild switch --flake .#gaming

About

My NixOS configuration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages