0
0
Fork 0
Find a file
2026-08-06 15:30:58 +02:00
hosts [flatpak][global] add flatpak vlc 2026-08-05 21:57:39 +02:00
modules [modules][global] add home manager options 2026-08-06 14:07:16 +02:00
secrets [sops][user:awd] add user core + secret test 2026-08-05 17:39:16 +02:00
users [sops][user:jmyr] add user core + secret test 2026-08-05 17:39:16 +02:00
.gitignore add gitignore 2026-07-22 12:34:30 +02:00
.sops.yaml [sops][user:jmyr] add user core + secret test 2026-08-05 17:39:16 +02:00
common.nix [homeManager][modules] add home manager 2026-08-04 15:06:43 +02:00
flake.lock [flatpak][modules] add flatpak 2026-08-05 19:29:41 +02:00
flake.nix [flatpak][modules] add flatpak 2026-08-05 19:29:41 +02:00
README.md [docs] add documentation for generating host key 2026-07-29 01:44:49 +02:00

NIXOS Dotfiles

Usage

Nixos Configurations

Due to the host module referencing /etc/nixos/hardware-configuration.nix, so that it is seperated from the repo, all rebuild commands will need --impure, unless you copy your configuration into the repo.

Create age private key from new ssh host key

sudo ssh-keygen -A
nix-shell -p 'import (fetchTarball "https://github.com/Mic92/ssh-to-age/archive/main.tar.gz") {}' --run "sudo ssh-to-age -i /etc/ssh/ssh_host_ed25519_key.pub -o key.txt"

Follow update encryption keys afterward

First install - On installed OS

change "<HOSTNAME>" in the rebuild command to the name of the host you are installing

nix-shell -p git --run "sudo git clone https://git.awdawd.eu/Shared/nix-dotfiles.git /etc/nixos"
sudo nixos-rebuild --impure --flake /etc/nixos/nix-dotfiles#<HOSTNAME> switch

You may need to go through the boot options, and boot from nixos for the OS to start with the new settings

Build and switch

sudo nixos-rebuild --impure switch

Append the full path and hostname if you are going to switch config

sudo nixos-rebuild --impure --flake /etc/nixos/nix-dotfiles#test01 switch

Update encryption keys

To update all age files with a new encryption key, first add the public key to .sops.nix Then to sync all files run the command below. Change the "secrets/shared" path if desired

find secrets/shared -type f -name "*.yaml" -exec sops updatekeys -y {} +

Modules

Priority

Most options in default modules have values set with priority. This can be used to override the options in other modules. Lowest priority will be used

Modules Priority
/modules/10-system/10-core 990
/modules/10-system/20-base 980
/modules/30-graphical/10-login 790
/modules/30-graphical/30-desktop 770
/modules/30-graphical/70-web 730
/modules/40-daemons/50-server 650
/modules/50-packages/20-text_editor 580

Credits/Inspiration