Skip to content

lks-hrsch/nixconf

Repository files navigation

nixconf

sudo nix-store --gc
sudo nix-store --optimise

# list generations 
sudo nix-env --list-generations --profile /nix/var/nix/profiles/system
nix-env --list-generations --profile ~/.local/state/nix/profiles/home-manager

# delete generations older than 7d
sudo nix-env --delete-generations 7d --profile /nix/var/nix/profiles/system
nix-env --delete-generations 7d --profile ~/.local/state/nix/profiles/home-manager

# complet clean up which deletes all generations
sudo nix-collect-garbage --delete-old

on nixos:

# update
sudo nix flake update

# apply configuration
sudo nixos-rebuild switch --upgrade --flake ".#workstation-nixos"

on darwin:

# update 
sudo determinate-nixd upgrade
sudo nix flake update

# apply configuration
sudo nix run nix-darwin -- switch --flake ".#MacBook-000553" # initial setup
sudo darwin-rebuild switch --flake ".#MacBook-000553"

build a nixos on darwin:

nix run nixpkgs#nixos-rebuild-ng -- switch --flake .#deimos --build-host root@10.10.1.18 --target-host root@10.10.1.18 --option sandbox false

working with git-crypt

# add a new gpg user
gpg --armor --export <KEYID> > new-public-key.asc
gpg --import new-public-key.asc
gpg --edit-key <KEYID>
# Type: trust
# Select trust level (usually 5 for ultimate if you verified it)
# Type: quit
git-crypt add-gpg-user <KEYID>

# unlock the repository
git-crypt unlock

working with sops

# edit secrets
SOPS_AGE_KEY_FILE=~/.config/sops/age/keys.txt sops secrets/secrets.yaml

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published