Dotfiles deployed with nix/home-manager. Feel free to take what you like!
My NixOS-managed dotfiles repository.
These can be installed using nixos-anywhere, however the installation steps are subtly different from the upstream ones:
Warning yui has not yet been set up for this process
/root/.ssh/authorized_keys
secret.key
), ensuring it does not end in a newline (echo -e
).nix run --inputs-from . nixos-anywhere -- -f .#<hostname> root@<ip> --no-reboot --disk-encryption-keys /tmp/secret.key secret.key
secret.key
pops up, rerun the--disk-encryption-keys
. They will already/mnt/var/lib/sops
/etc/sops/secrets.yaml
in /mnt/etc/sops/secrets.yaml
.nixos-enter
and passwd
Before the configuration can be installed, we need to set up a few basic things.
It's easiest to do this when the system in question is already running, and we're ssh'd into it, so we can read out some device data. So boot into the NixOS installer first (will be useful later anyway).
Create a new subdirectory of nixos-config
named after the new host,
and create a new nixosConfigurations
entry for it.
Then set up:
hardware-configuration.nix
:
nixos-generate-config --no-filesystems --show-hardware-config
.sops.yaml
, and/etc/sops/secrets.yaml
.For non-NixOS hosts, this requires nix >=2.4 with flakes enabled. To install this on an arbitrary Linux distro, follow the upstream nix installation instructions and then run:
nix-env -iA nixpkgs.nixFlakes
mkdir -p ~/.config/nix
echo 'experimental-features = nix-command flakes' > ~/.config/nix/nix.conf
After that, enter a devshell for this flake and install it with home-manager:
nix develop github:tlater/dotfiles
home-manager switch --flake github:tlater/dotfiles#gnome-vm