/nixos-config

My NixOS configuration

Primary LanguageNix

nixos-config

built with nix .github/workflows/ci.yml

Setup

git clone git@github.com:gaelreyrol/nixos-config.git ~/.config/nix
cd ~/.config/nix

Actions

Build system

make nixos-build

Switch system

make nixos-switch

Garbage collect

make nix-garbage-collect

Diff system & home-manager generations

make system-diff
make home-manager-diff

Post actions

Import Keybase keys

keybase pgp export -s | gpg --allow-secret-key-import --import

Setup Yubikey challenge-response

ykman otp chalresp --touch --generate 2
ykpamcfg -2 -v

Add a new host key to SOPS

# On user host
mkdir -p ~/.config/sops/age
ssh-to-age -private-key -i ~/.ssh/id_ed25519 > ~/.config/sops/age/keys.txt
age-keygen -y ~/.config/sops/age/keys.txt # Add output to .sops.yaml file
# On server host
cat /etc/ssh/ssh_host_ed25519_key.pub | ssh-to-age # Add output to .sops.yaml file

# Update secrets files with new keys
sops updatekeys secrets/default.yaml

Credits