Skip to content
vic

KiaraGrouwstra/cfg

my old laptop setup for NixOS, archived in favor of new repo `dots`

KiaraGrouwstra/cfg.json
{
"createdAt": "2023-06-12T17:05:17Z",
"defaultBranch": "main",
"description": "my old laptop setup for NixOS, archived in favor of new repo `dots`",
"fullName": "KiaraGrouwstra/cfg",
"homepage": "https://codeberg.org/kiara/dots",
"language": "Nix",
"name": "cfg",
"pushedAt": "2024-11-06T19:28:02Z",
"stargazersCount": 8,
"topics": [
"dotfiles",
"home-manager",
"nix",
"nix-flake",
"nixos",
"nixos-configuration"
],
"updatedAt": "2025-06-25T08:15:52Z",
"url": "https://github.com/KiaraGrouwstra/cfg"
}

Gitea Last Commit GitHub commit activity Gitea Issues

This is my setup for NixOS.

  • reproducible
    • NixOS with flakes to lock versions
    • ephemeral root to stay conscious about unreproduced state
  • ergonomics
    • keyboard-first favoring vim-like keybinds
  • intuitiveness
    • scrollable tiling

(credit: wallpaper by Alena Aenami.)

JIT-installed neofetch

neofetch

thefuck plugin for zsh (hit double Esc) filled the JIT-install command for the missing app neofetch. the expanded notification bar SwayNotificationCenter is shown with a notification about a completed rebuild. this menu can be opened using `Super+“ or by right-clicking the ‘Windows’ button.

file managers

yazi

yazi is a terminal-based file manager with vim-like keybindings. thunar is available as a graphical alternative.

thunar

firefox

firefox

Firefox is used as a web browser, with some basic add-ons.

terminal-based IDE

helix

running ide in the WezTerm terminal opens a terminal-based IDE at that directory, consisting of:

  • Git TUI lazygit, offering a terminal-based way to work with Git repositories, including vim keybindings.
  • helix, featuring language servers for nix (thru nixd) and others
  • a shell, using Zsh and decorated using powerline-go

lazygit

As a back-up, the graphical VSCodium is provided (with some plugins).

application menu

anyrun

Application menu anyrun can be opened using Super+Space or by left-clicking the ‘Windows’ button.

JIT application menu

jit menu

A menu to JIT-install and run applications can be opened using Super+Shift+Space.

audio volume

volume control

Right-clicking the volume icon in the bar opens Pulse Audio Volume Control.

wifi

nmtui

Pressing Super+i or right-clicking the wifi icon opens the Network Manager TUI.

show dependency age

just age

command just age showing the age of any dependencies included in flake.lock

emoji picker

emoji picker

pressing the Microsoft keyboard’s emoji key](https://support.microsoft.com/en-us/topic/use-microsoft-ergonomic-keyboard-c917dad0-3797-d97b-efb3-fbe27ac9703c#ID0EDFBBDDD) (Super-Ctrl-Alt-Shift-Space) triggers an emoji picker using fuzzy picker fzf.

symbol picker

anyrun symbols

keybind Super+B lets the user pick symbols using anyrun’s symbols plugin

file picker

file picker

pressing CTRL-T in the shell opens fzf’s file picker, copying the selected file or directory path to the clipboard.

This configuration was made with the following devices in mind:

NameUseModelConfig
hammerhome laptopLenovo IdeaPad Slim 5 16ABR8nixosConfigurations
orcawork laptopDell XPS 13 9340homeConfigurations
clean install from NixOS USB
Terminal window
cd Downloads
git clone https://codeberg.org/kiara/cfg.git
cd cfg
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko -f .#hammer
dest=/mnt/persist/home/kiara/.config/sops/age/
sudo mkdir -p $dest
sudo cp -r ./. $dest
sudo cp ~/Downloads/keys.txt $dest # import/create
sudo nixos-install --no-root-passwd --flake .#default --no-root-passwd
sudo nixos-enter --root /mnt
cp /etc/{machine-id,group,passwd,shadow} /persist/etc
install from existing NixOS system
Terminal window
$ nix --experimental-features "nix-command flakes" run nixpkgs#just -- switch
Terminal window
$ just -l
Available recipes:
age # Check when inputs were last updated
boot # Build a new configuration
clean # Remove all generations older than 7 days
decode # Decode secrets
default # default action: list actions
dry # Dry-build a new configuration
encode # Encode secrets
ephemeral dir="$HOME" # Show what has yet to be persisted in a folder. Usage: just ephemeral $HOME | $PAGER
fmt # Format code
gc # Garbage collect all unused nix store entries
home # Rebuild the home config
patch-desktop-xwayland # Patch persisted wine/steam desktop entries to run xwayland
repl # Open a Nix REPL - run manually to load flake: `:lf .`
switch # Rebuild the system
test # Run tests
up # Update all inputs
upp input # Update specific input. Usage: just upp nixpkgs

… or if just isn’t available yet:

Terminal window
nix run nixpkgs#just -- -l

to ensure you can persist useful state on an ephemeral system, you can find say:

  • newly created (5 mins) files: find ~ -cmin -5
  • files now on root: tree -x /
  • diffs from last backup: rsync --dry-run
  • the flake.locked nixpkgs is used for:
    • nix commands
    • ‘command not found’ errors
  • nix flake show is fixed using Flake Schemas
  • $SHELL is retained in nix shell
ComponentSoftware
Nix interpreterLix
Nix shellLorri
DMTUIgreet
CompositorNiri[^1]
BarWaybar
NotificationsSwaynotificationcenter
MenuAnyrun
Web browserFirefox
File browserYazi
TerminalWezterm
Text editorVSCodium
Editor (shell)Helix
ShellZsh
Fuzzy finderFzf
PagerNvimpager
Text-to-speechPiper thru LocalAI

[^1] !: While Niri uses Wayland, X11 applications can be emulated thru xwayland-run.

commanddrop-inimprovements
cdn/a(can skip it in Zsh)
cdzremembers visited locations
cdcd (enhancd)interactive directory picker using cd, cd . or cd ..
lseza (aliased to ls)friendlier output and interface
catbatsyntax highlighting
lessless (lesspipe)syntax highlighting
findfdfaster, friendlier interface, respects .gitignore
greprgfriendlier interface
makejustshow comments, friendlier file format
sshxxhuse your favorite shell

Used keyboard layouts, with Caps Lock remapped to Esc:

  • workman-programmer, with application keymaps modified to keep arrow actions h/j/k/l (+ actions ‘y’/‘n’) in their ergonomic qwerty positions (at the cost of moving actions e/o to keys h/l)
  • en-us (qwerty)

Application keybinds, tweaked to layout by setting config.keyboard.active:

moduleleft-clickright-clickscroll
start buttonopen anyrun application launchertoggle swaync notifications-
media playertoggle play/pauseskip aheadprevious/next
clock-toggle month/year in calendar pop-upprevious/next in calendar pop-up
bluetoothbluetuithbluetuith-
volumetoggle mutePulse Audio Volume Controlchange volume
memorymanage processes with Bottom--
CPUmanage processes with Bottom--
batteryrun battery viewer powersupply--
storagegarbage-collect nixshow big files/folders using dust-
networkmanage network by networkmanager_dmenumanage network by nmtui-
systray(application-specific)open application context menu-
whatwhere
system configuration./hosts/
home-manager configuration./home-manager/
binaries and command wrappers./home-manager/kiara/commands.nix
reusable modules./modules/
custom functions./lib/
custom packages./pkgs/*.nix (from flake inputs: ./pkgs/default.nix)
overlays./overlays/*.nix (from flake inputs: ./flake.nix)
LSP (vscodium / coc.nvim)./home-manager/kiara/features/development/
shell scripts./home-manager/kiara/scripts/*.sh
dotfiles./home-manager/kiara/dotfiles/ + ./home-manager/kiara/dotfiles.nix
custom desktop entries./home-manager/kiara/desktop.nix
MIME types./home-manager/kiara/mime.nix
file templates./home-manager/kiara/dotfiles/Templates/
keybinds./home-manager/kiara/niri.nix
persisted state./hosts/hammer/persistence.nix