Configuration for NixOS and user home (dot files). It is provided via Nix flakes and includes the following components:
- lib
- library functions to be used with flakes or within Nix.
kebabCaseToCamelCase
- convert kebab case to camel case (hello-world -> helloWorld)
listNixFilesRecursiveToAttrs
- given a directory list all nix files recursively and create a flat attribute set with a key corresponding to each file path.
modulesFromDir
- given a directory create an attribute set for each module and create a default module importing all those modules.
- homeConfigurations
- user configuration for Home Manager.
- homeModules
- modules that can be used together with Home Manager.
- nixosConfigurations
- host configurations for NixOS.
- nixosModules
- modules that can be used together with NixOS.
- overlays
- custom overlays.
- default
- package overlay including a subset of packages.
- fromInputs
- composed overlay from all input overlays.
- packages
- packages not in the default nixpkgs.
- drduh-gpg-conf
- GPG config per drduh recommendation.
- drduh-yubikey-guide
- The drduh YubiKey guide readable via the terminal.
- yubikeyInstallerImage
- YubiKey Installer ISO.
Show what is provided:
nix flake show
Switch both system (NixOS) and home:
nix run nixpkgs#nixos-rebuild -- switch --flake .
Switch home only:
nix run home-manager -- switch --flake .
Update all inputs:
nix flake update
Update a single input:
nix flake lock --update-input nixpkgs
Use a local input during development:
nix flake lock --override-input nixpkgs path:../nixpkgs
If you use a custom shell, you need to manually set the default shell, this is done by:
echo $HOME/.nix-profile/bin/fish | sudo tee -a /etc/shells
chsh -s $HOME/.nix-profile/bin/fish
Used to create a safe environment for YubiKey operations having all the necessary tools.
Build the ISO:
nix build -L .#yubikeyInstallerImage
Copy the ISO to a USB-key/storage device:
sudo dd if=result/iso/*.iso of=/dev/sda status=progress
sync