Skip to content

SlashyOS

A personal, multi-host NixOS configuration spanning an AMD desktop and a Framework laptop. It's built with flake-parts and import-tree, so every .nix file under modules/ is auto-imported — no manual wiring, just drop a file in and it's part of the flake.

Both machines run niri (a scrollable-tiling Wayland compositor) with the Noctalia shell. niri, Noctalia, kitty, btop, git, fastfetch and opencode are wrapped declaratively via nix-wrapper-modules instead of imperative dotfiles, and everything is themed by Stylix from a single per-host wallpaper — from the boot splash and login screen to the shell and every app.

Shared configuration is written once: a slashyos base bundle pulls in everything common (system and home-manager level), and each host adds only its hardware, bootloader, and a handful of per-host values. Adding an app to both machines is a one-line change.

Repository

Source lives at GitLab · wallpapers at nixos-projects/wallpapers · NixOS 26.05 · 2 hosts

Flake structure

SlashyOS/
├── flake.nix                     # inputs + flake-parts entrypoint
├── .gitlab-ci.yml                # CI: `nix flake check` + formatting on every push
├── modules/
│   ├── default.nix               # the `slashyos` base bundle every host imports
│   ├── parts.nix                 # systems, `flake.variables` option, nix fmt formatter
│   ├── checks.nix                # flake checks: deadnix, statix
│   ├── devshells/
│   │   └── devshells.nix         # `devShells` outputs (python, frontendServer, docs, zola, cisco)
│   ├── features/                 # reusable modules, grouped by concern
│   │   ├── appearance/           # stylix, ly, plymouth
│   │   ├── desktop/              # niri, noctalia (+ noctalia.toml)
│   │   └── system/               # vars, common, common-home, common-hardware, lockdown,
│   │                             # shell, starship, ssh, nvf, yazi, ntfy, virtualisation
│   ├── wrappedPrograms/          # 🛠️ kitty, btop, git, fastfetch, opencode
│   └── hosts/
│       ├── pallidus/             # 🖥️ AMD desktop
│       │   ├── default.nix       # nixosSystem definition
│       │   ├── pallidus.nix      # host config: imports + `slashyos.vars` + stateVersion + bootloader
│       │   ├── hardware.nix      # generated hardware scan
│       │   ├── desktop-hardware.nix  # desktop-only hardware (LACT, NTFS)
│       │   ├── lanzaboote.nix    # 🔐 Secure Boot
│       │   ├── sunshine.nix      # game streaming (available, not enabled)
│       │   ├── home.nix          # host-only home-manager extras
│       │   └── variables.nix     # this host's values
│       └── theseus/              # 💻 Framework AMD laptop
│           ├── default.nix
│           ├── theseus.nix
│           ├── hardware.nix
│           ├── laptop-hardware.nix   # laptop-only hardware (fans, fingerprint, power)
│           ├── grub.nix          # GRUB theme
│           ├── home.nix
│           └── variables.nix
└── config/
    ├── ssh/                      # public keys per host
    ├── banner.svg                # README banner
    └── pfp.png                   # profile picture (Noctalia)

Anything under modules/ is auto-imported regardless of subfolder — the folders are purely for humans. A module only becomes active on a host when that host's config imports it by name.

Module layers

Deduplication works in layers:

Layer Module Contains
Base bundle slashyos (modules/default.nix) Imports everything every machine gets, grouped by area: base (vars, commonHardware, common, commonHome), appearance (stylix, plymouth, ly), desktop (niri, noctalia), system (shell, starship, ssh, lockdown, ntfy, nvf, yazi, virtualisation) and wrapped programs (kitty, btop, git, fastfetch, opencode)
Shared hardware commonHardware Both machines are AMD: firmware, microcode, amdgpu in initrd, amd_pstate, latest kernel, graphics (+32-bit), Bluetooth, Wooting, zram, fstrim, fwupd
Shared system common NixOS-level config both hosts share: nix settings, locale, keyboard, pipewire, portals, Steam, Thunar, LocalSend, Tailscale, printing, users
Shared home commonHome Home-manager config both hosts share: user dirs, packages, Flatpaks, Zen Browser, VSCodium, Obsidian

A host file then reads as "the OS, plus this hardware, plus this bootloader", and hands its values to the shared modules with one line:

# modules/hosts/theseus/theseus.nix
imports = [
  self.nixosModules.slashyos
  self.nixosModules.theseusHome
  self.nixosModules.theseusHardware
  self.nixosModules.laptopHardware
  self.nixosModules.grub
];

slashyos.vars = self.variables.theseus;

Where does a change go?

  • App / setting for both machines → common.nix (system) or common-home.nix (user); hardware for both → common-hardware.nix
  • App for one machine → that host's home.nix
  • New feature for both → new file under features/, add one line to the slashyos bundle (modules/default.nix)
  • New machine → copy the closest host folder — see Usage

Tags

Tag Meaning
🟢 Enabled / active
🛠️ Declaratively wrapped via nix-wrapper-modules
🔐 Security-related (Secure Boot, etc.)
🖥️ Desktop-only (pallidus)
💻 Laptop-only (theseus)

Hosts

Host Platform Machine Bootloader Keyboard Notes
pallidus x86_64-linux 🖥️ AMD desktop systemd-boot + 🔐 Lanzaboote gb,fr Dual-boots Windows 11, LACT for GPU tuning
theseus x86_64-linux 💻 Framework AMD (AI 300) GRUB us,fr Tuned via nixos-hardware, fingerprint reader, fan control, power-profiles-daemon

Each host is a separate entry in flake.nixosConfigurations. You build the one matching the machine — see Usage.

Per-host variables

Values that differ between machines (username, hostname, SSH key, keyboard layout, wallpaper) live in each host's variables.nix under flake.variables.<host>:

# modules/hosts/theseus/variables.nix
flake.variables.theseus = {
  username = "dias";
  hostname = "theseus";
  sshKey = "framework";
  kbLayout = "us,fr";
  wallpaper = "${inputs.wallpapers}/japan.jpg";
};

The flake.variables output is declared as an option in parts.nix, which is what lets each host contribute its own set without collisions. Each host then passes its set into the NixOS config through the typed slashyos.vars option from vars.nix:

# modules/hosts/theseus/theseus.nix
slashyos.vars = self.variables.theseus;

Shared modules read it from config, and vars.nix also sets networking.hostName from it:

image = config.slashyos.vars.wallpaper;

So a single stylix.nix themes both hosts, each with its own wallpaper. Because the option is typed, a missing or misspelled key fails the build with a clear error. To add a value, declare it in vars.nix and add it to every host's variables.nix.

Desktop environment

niri

  • 🟢🛠️ Scrollable-tiling Wayland compositor, wrapped declaratively (programs.niri + wrapper-modules). The base config is a flake package; each host layers its Stylix colors, cursor and keyboard settings on top. The keyboard layout and Alt+Shift toggle are defined once, in services.xserver.xkb (common.nix), and niri reads them from there.
  • Rounded window corners (12px), background blur, 8px gaps, focus ring in Stylix colors.
  • phinger-cursors-dark cursor, size 32. Flat mouse acceleration.
  • Keyboard layout is per-host, Alt+Shift to toggle. Workspace keys work on both QWERTY and AZERTY.
  • Electron apps run natively on Wayland (NIXOS_OZONE_WL); X11 apps go through xwayland-satellite.
  • 💻 Closing the laptop lid locks the screen.

Keybinds (shared across hosts; Mod = Super)

Bind Action
Super+Shift+Enter Toggle Noctalia launcher
Super+Shift+I / Super+Shift+W / Super+Shift+Q Noctalia settings / wallpaper selector / session menu
Super+Enter Open kitty
Super+W Open Zen Browser
Super+D Open vesktop (Discord)
Super+T Open thunar
Super+Shift+B Open emote (emoji picker)
Super+1 … Super+0 / Super+Shift+1 … Super+Shift+0 Go to / move column to workspace
Super+H Super+J Super+K Super+L or arrows Move focus
Super+Shift+H Super+Shift+J Super+Shift+K Super+Shift+L Move the window or column
Super+Ctrl+H Super+Ctrl+J Super+Ctrl+K Super+Ctrl+L Resize column width / window height
Super+Shift+S Screenshot region (Space saves + copies, Ctrl+C copies)
Super+Ctrl+S Screenshot whole screen → clipboard
Super+Q Close window
Super+F / Super+Shift+F Fullscreen / toggle floating
Super+G / Super+C / Super+R Maximize / center / cycle preset width of column
Super+Tab Toggle overview
Super+Alt+L Toggle lockdown mode
Super+Shift+Esc Show hotkey overlay
Super+Shift+E Quit niri

Media, volume and brightness keys work everywhere, including the lock screen.

Noctalia

  • 🟢🛠️ Noctalia v5 (the C++ rewrite) as shell / bar / launcher / dock / notifications / OSD / lock screen for niri, wrapped as a package and driven by niri keybinds through noctalia msg ….
  • Settings come from noctalia.toml (an export from Noctalia's settings window), with a few overrides in noctalia.nix so a fresh export can't undo them: colors from Stylix instead of the wallpaper, the avatar from config/pfp.png, the NixOS logo on the launcher, and the wallpaper picker pointed at the wallpapers input.
  • Each host gets its own copy carrying its Stylix palette (base00 for the background, a 25% mix of base00 and base01 for boxes and cards, base0D as the accent) and its wallpaper as the starting one.
  • Bar on the left at 70% opacity, its inner corners curving out into the screen edge. Top to bottom: launcher, media (only while playing), workspaces (empty ones hidden), active window, tray, privacy indicators (only while in use), stacked time and date, notifications, volume, battery with percentage, control center.
  • Auto-hiding dock, blurred wallpaper behind niri's overview, weather for Aarschot, and typing in the overview searches apps. The session menu and wallpaper picker open centered.
  • Idle handling: screen off after 10 minutes, lock after 11, lock and suspend after 30.

Keeping changes from the settings window

Changes made in Noctalia's settings window are saved to ~/.local/state/noctalia/settings.toml and win over the repo. To move them into the repo:

noctalia config export > ~/SlashyOS/modules/features/desktop/noctalia.toml
rm ~/.local/state/noctalia/settings.toml
fr

Theming (Stylix)

  • 🟢 Stylix generates the color palette from each host's wallpaper (polarity = "dark") and themes the whole system with it.
  • Covers GTK and Qt apps, Zen Browser, the Plymouth boot splash, the TTY console and the Ly login screen. The wrapped kitty, btop and niri read their colors from Stylix too, and Noctalia gets a mapped version of the palette.
  • JetBrainsMono Nerd Font as the monospace font, Papirus-Dark icons, phinger-cursors-dark cursor, 80% terminal/application opacity.
  • View the current palette with xdg-open /etc/stylix/palette.html (or cat /etc/stylix/palette.json).

Boot & security

Shared

  • 🟢 Plymouth — Stylix-themed boot splash with silent boot: quiet kernel params, hidden initrd logs.
  • 🟢 Ly — TUI login manager with the colormix animation in Stylix colors and a big clock. Logging in unlocks GNOME Keyring; fingerprint login is disabled so the keyring always gets your password.
  • 🟢🔐 SSH — GNOME Keyring is the SSH agent, so keys unlock at login. Hosts that shouldn't be public live in ~/.ssh/config.d/ on each machine, outside the repo.
  • 🟢🔐 Lockdown mode — lockdown (or Super+Alt+L) for when you step away somewhere you don't trust. While on, it locks the screen now and after 1 minute idle, blocks USB devices plugged in after it started (USBGuard; built-in devices and whatever was already plugged in keep working, even if they reconnect after suspend), turns off Wi-Fi and Bluetooth, mutes the mic, clears the clipboard and forgets the cached sudo password. Turning it off restores Wi-Fi, Bluetooth and the mic to how they were, and tells you about any USB device that was blocked (replug it to use it).

    Command Does
    lockdown Toggle
    lockdown on / off Turn on / off
    lockdown status on, off, or off (restore pending) after a reboot during lockdown — lockdown off (or Super+Alt+L) puts things back

pallidus 🖥️

  • 🟢🔐 Lanzaboote — Secure Boot with a signed kernel/bootloader; sbctl included for key management (keys live on the machine, not in the repo).
  • systemd-boot, 5 generations kept, EFI variables writable, Windows 11 boot entry.

theseus 💻

  • 🟢 GRUB (EFI, device = nodev) with the grub-of-tsushima theme; Stylix's GRUB target disabled so the theme applies.
  • 🟢🔐 Fingerprint reader (fprintd) for sudo and other PAM prompts.

Shell & CLI

  • fish — default shell, fastfetch greeting.
  • starship — two-line prompt in the style of nix-prompt, in Stylix colors: a badge with the repo name inside git (user@host over SSH or as root, the hostname otherwise; the icon blinks after a failed command), the path, and a git badge with branch, state and __git_ps1-style markers (* modified, + staged, % untracked, plus commits ahead/behind).
  • nh — pretty nixos-rebuild wrapper, pointed at the repo, with weekly auto-clean (see Maintenance).
  • direnv + nix-direnv — per-project dev shells that auto-activate on cd.
  • zoxide — replaces cd with a smarter version that remembers directories. fzf — fuzzy search keybindings and completion.
  • 🛠️ fastfetch — custom system-info fetch with an ASCII ringed-planet logo, SlashyOS 1.0 as the OS, and the install's age in days.
  • 🛠️ git — wrapped with name, email and defaults.
  • 🛠️ opencode — terminal AI coding agent, wrapped with a Stylix theme and nixd + nixfmt on its PATH; self-updates and share links are off, and shell commands ask first (read-only ones run freely, sudo is blocked). Log in to a provider with /connect; keys stay in ~/.local/share/opencode/.
  • nvf — declaratively configured Neovim (LSP, Telescope, Treesitter; Nix and Python). yazi — terminal file manager. micro — default $EDITOR.
  • ntfy — a user service subscribes to the priority-ntfy topic on the ntfy server and relays messages to desktop notifications with a sound. The client config is generated by Nix; the access token never touches the repo — secretspec reads it from the GNOME keyring and passes it in as $NTFY_TOKEN.

Aliases

Alias Expands to
fr nh os switch
fu nix flake update (on this flake)
gc sudo nh clean all --keep 2 --no-gcroots
lint deadnix + statix check on the repo
lintfix deadnix -e + statix fix, then shows a git diff --stat

Formatting — the flake exposes nixfmt-tree as its formatter; nix fmt from the repo root formats the whole tree.

Dev shells

Defined in modules/devshells/devshells.nix as flake outputs, pinned to the same nixpkgs as the system:

Shell Provides
python Python 3 with numpy, pandas, matplotlib, pillow, jupyter, pytest, dbus-python (need a PyPI-only package? python -m venv .venv in the project)
frontendServer Node.js 24, prints the Node and npm versions on entry (frontend dev servers, React)
docs uv + Python 3 for Zensical (uvx zensical serve)
zola Zola static site generator
cisco Networking tools: PuTTY, minicom, bind, tcpdump, nmap (Wireshark is installed system-wide on theseus)
# one-off
nix develop ~/SlashyOS#python

# per project — auto-activates on cd, and creates a GC root
echo "use flake ~/SlashyOS#python" > .envrc && direnv allow

Maintenance

Garbage collection is automated without ever nuking dev shells:

  • nh clean runs weekly: keeps the last 5 generations and anything newer than 3 days, and runs with --no-gcroots so direnv's dev-shell roots are never removed.
  • gc cleans by hand, down to the last 2 generations.
  • nix.settings sets keep-outputs + keep-derivations, so build-time dependencies of rooted shells survive GC — nothing gets re-downloaded after a clean.
  • nix.optimise hardlinks duplicate store files daily to claw disk back, without slowing down builds.
  • lint / lintfix find and remove dead code (deadnix) and anti-patterns (statix).

Checks & CI

  • nix flake check evaluates both hosts (nothing is built) and runs the deadnix and statix checks from checks.nix. Run it before pushing to catch a broken config for the machine you're not on.
  • .gitlab-ci.yml runs the same nix flake check, plus a formatting check (nix fmt must leave no diff), on every push that touches Nix code, JSON, TOML or flake.lock.

Applications

Shared apps live in commonHome and common; host-only extras in that host's home.nix.

App Purpose
Zen Browser Browser (Firefox-based, declarative profile: containers, SearXNG search, extensions, bookmarks, wipe on close)
Brave Second browser
Thunar File manager (archive and removable-drive plugins)
VSCodium Code editor (curated extension set and formatters)
Obsidian Notes (vault in ~/Documents/Obsidian)
Vesktop Discord client
Element Matrix client
Thunderbird Email client
Proton Pass · Mail · VPN Password manager, email, VPN
Super Productivity To-do list and time tracking
Feishin Music player
VLC · imv Media / image viewing
Grayjay Video app (Flatpak)
🛠️ kitty Terminal (Stylix colors, fade tab bar)
🛠️ btop System monitor (Stylix theme)
Emote Emoji picker (Super+Shift+B)
LocalSend LAN file sharing (firewall ports opened)
Wootility Wooting keyboard configurator
virt-manager Virtual machines (libvirt + QEMU/KVM, TPM, USB redirection)
Steam Gamescope session, Proton-GE, GameMode
Beyond All Reason RTS game
Pandora Launcher Minecraft launcher

Host extras

  • pallidus 🖥️ — r2modman.
  • theseus 💻 — Cisco Packet Tracer 9, ONLYOFFICE, Wireshark (the wireshark group lets you capture without sudo; dialout gives access to USB-to-serial adapters).

Flatpaks are managed declaratively with nix-flatpak: unmanaged ones are removed, and the rest update on rebuild and weekly.

Wallpapers

The wallpaper collection lives in its own repo, nixos-projects/wallpapers (including a greyscale/ subset), pulled in as the wallpapers flake input with flake = false. Keeping the images out of the main repo keeps clones small and stops every rebuild from copying 40 MB into the Nix store. Each host picks its own wallpaper in its variables.nix ("${inputs.wallpapers}/japan.jpg"), and Stylix derives the whole color scheme from it — desktop, apps, shell, login screen, boot splash, and console alike.

Noctalia's wallpaper selector (Super+Shift+W) browses the same collection. Picking a wallpaper there changes only the picture; to change the colors as well, set wallpaper in variables.nix and rebuild.

Adding a wallpaper

Commit it to the wallpapers repo and push, then in SlashyOS run nix flake update wallpapers and fr, and commit the updated flake.lock.

Usage

Each machine builds its own host. From the repo root:

# On the machine itself — hostname is inferred:
fr                    # == nh os switch  (builds the host matching this machine)

# Or be explicit about which host:
sudo nixos-rebuild switch --flake .#pallidus
sudo nixos-rebuild switch --flake .#theseus

# Update flake inputs:
fu                    # == nix flake update (on this flake)

# Format, lint and check the tree:
nix fmt
lint
nix flake check

Build without switching (safe eval/compile check, e.g. testing the laptop's config from the desktop):

nixos-rebuild build --flake .#theseus     # drops ./result, changes nothing

Files that stay out of the repo

Create these by hand on each machine:

  • ~/.ssh/config.d/* — private SSH hosts (addresses, ports, users). chmod 600 them.
  • ntfy access token — stored in the GNOME keyring through secretspec (run secretspec set NTFY_TOKEN --provider keyring in ~/.config/ntfy).
  • /var/lib/sbctl — Secure Boot keys (pallidus, created with sbctl).

Adding a new host

To add a machine (e.g. orion): copy the closest existing host folder (pallidus for a desktop, theseus for a laptop), rename its per-host module attributes (<old>Configuration/Home/Hardware → <new>…), set flake.variables.<new> and slashyos.vars = self.variables.<new>; in the host file, set its system.stateVersion and home.stateVersion to the NixOS release you installed it with (never bump them later), drop in the machine's real hardware.nix, git add the new files, then sudo nixos-rebuild switch --flake .#<new> on that machine. Thanks to the slashyos bundle, the new host file is ~20 lines. The bundle includes commonHardware, which assumes an AMD machine — for anything else, move that import into the AMD hosts.

Inputs & credits

Input Used for
nixpkgs (nixos-26.05) Package set
flake-parts Modular flake composition
import-tree Auto-import of modules/
nix-wrapper-modules Declarative wrapping of niri, Noctalia, kitty, btop, git, fastfetch and opencode
nixos-hardware Framework laptop tuning (theseus)
lanzaboote Secure Boot (pallidus)
stylix (release-26.05) System-wide theming
home-manager (release-26.05) User-level config
nvf Declarative Neovim
nix-flatpak Declarative Flatpaks
zen-browser-flake Zen Browser (not yet in nixpkgs)
rycee/firefox-addons Store-pinned browser extensions
wallpapers Wallpaper collection (flake = false)