Skip to content

Repository files navigation

nixdots

NixOS config for a minimal SwayFX setup.

1 2 3 4 5

Stack

Role Package
WM SwayFX
Font JetBrainsMono Nerd Font
Bar Waybar
Launcher Rofi
Terminal Foot
Notifications Mako
Editor Zed + Neovim + VSCodium
Browser Zen Browser
File manager Yazi + Thunar
Shell Zsh + Oh-My-Zsh
Login SDDM + SilentSDDM
Theme Catppuccin Mocha (color scheme) + Papirus-Dark (icons) + Bibata-Modern-Classic (cursor)
AI opencode + ollama

Fresh Install

Install NixOS normally, then clone this dots

git clone https://github.com/shaaanuu/nixdots ~/nixdots

Symlink to /etc/nixos

sudo ln -s /home/{USER}/nixdots /etc/nixos

change {USER} with your username.

Swap in your hardware config

Replace hardware-configuration.nix with the one generated during your install (at /etc/nixos/hardware-configuration.nix before you symlink).

Build

sudo nixos-rebuild switch --flake /etc/nixos#nixos

The update alias in zsh does this exact command, so after the first build just run update.

Modules

modules/zen.nix

Zen Browser (beta) with:

modules/wireguard.nix

ProtonVPN WireGuard interface. Needs private key at:

sudo mkdir -p /etc/wireguard
snvim /etc/wireguard/proton.key  # paste the key

modules/swaycut.nix

Custom screenshot tool made by me. Bindings are Print, Super+Print, Super+Shift+Print.

modules/flutter.nix

Run this once after initial setup, and again any time you modify android package versions in flutter.nix.

flutter config --android-sdk "$ANDROID_HOME"

Aliases

Alias Command
update sudo nixos-rebuild switch --flake /etc/nixos#nixos
upgrade sudo nix flake update --flake /etc/nixos
clean sudo nix-collect-garbage -d
vpn Start WireGuard ProtonVPN
vpn-off Stop WireGuard ProtonVPN
ai Start ollama
ai-off Stop ollama
snvim sudo -E nvim (preserves env, so the theme works)
shutdown sudo shutdown now
restart / reboot sudo reboot now

Some would say it's not a good way to include sudo in it, but i don't care. I like this.

Configs

All configs under config/ are symlinked via home.nix using mkOutOfStoreSymlink so edits are live without rebuilding.

Currently rewriting most of this as possible in nix way into modules/.

Keybindings

Mod = Super

Key Action
Mod+Return Terminal (foot)
Mod+d Rofi launcher
Mod+q Kill window
Mod+h/j/k/l or arrow keys Focus left/down/up/right
Mod+Shift+h/j/k/l Move window
Mod+f Fullscreen toggle
Mod+v Split vertical
Mod+Shift+v Split horizontal
Mod+s/w/e Layout stack/tabbed/split
Mod+Shift+Space Float toggle
Mod+Space Focus float/tile toggle
Mod+r Resize mode
Mod+Shift+r Reload config
Mod+Shift+q Exit swayfx
Mod+1..0 Switch workspace
Mod+Shift+1..0 Move to workspace
Print Screenshot: focused workspace
Mod+Print Screenshot: focused window
Mod+Shift+Print Screenshot: region
XF86AudioRaise/Lower/Mute Volume (My keyboard has this special button)

Notes

  • Grub device is hardcoded to /dev/sda in configuration.nix. Change if needed.
  • Username is hardcoded to shaaanuu throughout. Global find-replace if forking. (lazy, that's why).
  • Intel GPU specific vars set: LIBVA_DRIVER_NAME=i965, intel-vaapi-driver, libvdpau-va-gl.
  • auto-cpufreq: powersave + no turbo on battery, performance + auto turbo on charger.
  • nix substituters include SJTU/USTC mirrors (currently for me, this is the fastest and less error showing ones).
  • Bun paths set in zsh init (no installation process included).
  • iOS support via usbmuxd + ifuse + libimobiledevice.

THIS CONFIG IS HEAVILY UNDER DEVELOPMENT AND NOT A PERFECT ONE. DON'T BLAME ME IF YOU GOT ANY ISSUES WITH THIS. IF YOU FOUND ANY ISSUES, PLEASE CONSIDER REPORTING IT.

About

I use NixOS btw...

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages