Configuration for NixOS and user home (dot files). It is provided via Nix flakes and includes the following components:
- apps
- commands to run to utilize the flake or for development.
home-switch- run the
home-managerswitch command for this flake. nixos-switch- run the
nixos-rebuildswitch command for this flake. use-caches- add caches to project
nix.conf. Only needed when modifying the caches. install-qutebrowser-dicts- install dictionaries to be used within qutebrowser.
backup- backup fish history and GnuPG sshcontrol.
- devShells
- developer shells
- default
- a shell with tools used for development and required setup for flakes.
- lib
- library functions to be used with flakes or within Nix.
kebabCaseToCamelCase- convert kebab case to camel case (hello-world -> helloWorld)
importDirToAttrs- given a directory import all files into a set corresponding to each file name.
pkgsForSystem- import the input nixpkgs with overlays provided by this flake for a system.
forAllSystem- create an attrset by all the supported systems and runs a function which receives the packages for that system.
nixosSystem- wrapper around the corresponding function in nixpkgs which integrates packages, overlays, NixOS modules, Home Manager modules from this flake.
nixosSystemFor- helper function to build configuration for target host, this can be an input for another flake where you can extend the host configuration (e.g. I use it for my private configuration additions).
homeManagerConfiguration- wrapper around the corresponding function in Home Manager that adds modules from this flake and enables generic Linux support in case it is a Linux machine (assuming NixOS users would use the NixOS intergarion instead.)
- homeConfigurations
- user configuration for Home Manager.
- homeManagerModules
- modules that can be used together with Home Manager.
- custom-defaultBrowser
- configure a default browser.
- custom-keybindings
- enable vi/emacs keybindings across the system.
- profiles-development
- development profile module.
- profiles-gnome
- configure gnome (e.g. disable gnome-keyring-ssh).
- profiles-highContrast
- enable high contrast where possible.
- programs-editorconfig
- configure editorconfig.
- programs-gnomeShell
- gnome-shell configuration module.
- programs-ripgrep
- configure ripgrep.
- targets-genericLinux
- fixes for generic Linux module.
- nixosConfigurations
- host configurations for NixOS.
- nixosModules
- modules that can be used together with NixOS.
- custom-dictionaries
- configure dictionaries (both aspell and hunspell) via one setting.
- custom-i18n
- configure internationalization.
- custom-keyboard
- configure keyboard for console, kmscon and xserver via one setting.
- custom-shell
- configure shell environment.
- overlays
- custom overlays.
- default
- package overlay including the mentioned packages.
- iosevka
- iosevka configured with the slab set.
- packages
- packages not in the default nixpkgs.
Show what is provided:
nix flake showSwitch both system (NixOS) and home:
nix run .#nixos-switchSwitch home only:
nix run .#home-switchUpdate all inputs:
nix flake update --commit-lock-fileUpdate a single input:
nix flake lock --update-input nixpkgs --commit-lock-fileUse a local input during development:
nix flake lock --override-input nixpkgs path:../nixpkgsIf 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/fishUsed to create a safe environment for YubiKey operations having all the necessary tools.
Build the ISO:
nix build -L .#yubikeyInstallerImageCopy the ISO to a USB-key/storage device:
sudo dd if=result/iso/*.iso of=/dev/sda status=progress
sync