[go: nahoru, domu]

Skip to content

NixOS system configuration for my workstation(s)

Notifications You must be signed in to change notification settings

rubenhoenle/dotfiles

Repository files navigation

NixOS Configuration

sudo nixos-rebuild switch --flake .#deathstar

# temporary package installation
nix-shell -p <package_name>

# updating the system
nix flake update
fwupdmgr update

# code formatting
nix fmt

# The `clonerer` is a shitty bash script, which clones the defined git repos and adds the given git remotes to them.
clonerer

Backups

I use restic for my backups. The backups are stored on Backblaze B2 via the S3 API and on a local harddrive.

Backblaze B2 backup

The backup to Backblaze B2 is automated and runs every hour.

# showing the status of the backblaze b2 backup
systemctl status restic-backups-b2.service

# showing the snapshots of the backblaze b2 backup
restic-b2 snapshots

Local harddrive backup

restic documentation for restoring

# starting the HDD backup
systemctl start restic-backups-hdd

# showing the status of the HDD backup
systemctl status restic-backups-hdd

# showing the snapshots of the HDD backup
restic-hdd snapshots

# restoring the backup from the HDD
restic-hdd restore latest --target /

agenix

agenix is a tool for encrypted secrets in your NixOS config.

Restic environment variable file

AWS_ACCESS_KEY_ID=<MY_ACCESS_KEY>
AWS_SECRET_ACCESS_KEY=<MY_SECRET_ACCESS_KEY>

Adding a new secret to agenix

cd secrets
agenix -e secret1.age

Adding a new SSH key to agenix

Add the new public key into secrets.nix.

# rekey the secrets
agenix -r

Troubleshooting

Restarting Waybar manually

After doing a nixos-rebuild which changed some waybar settings, it might be necessary to restart the waybar manually to apply the changes.

systemctl --user restart waybar

Hibernation

Don't forget to set the proper sleep state option (Linux) in the BIOS in menu Config -> Power.

Links

About

NixOS system configuration for my workstation(s)

Topics

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •