repositories

NixDaemon

NixOS pentest workstation as one flake — IceBreaker's successor

clonegit clone https://git.daemon-sec.xyz/NixDaemon.git
desktop-theme.mdMarkdown92 lines4.7 KiBrendered raw download
# Gruvpine desktop theme

The selected palette in `theme.nix` drives Zen, GTK 3, GTK 4/libadwaita, and the
Gruvpine Pixel icon theme. All configuration and icon artwork are built by Nix;
no downloads or manual browser theme imports are needed.

![Gruvpine pixel icons](images/gruvpine-pixel-icons.svg)

## Zen

`modules/home/zen.nix` manages the existing `~/.zen/daemon` profile's `user.js`,
`chrome/userChrome.css`, and `chrome/userContent.css`. It keeps the shared
encrypted bookmark export and existing session, history, extensions, passwords,
and workspaces. The one-time bookmark import is never set in `user.js`.

The browser uses charcoal surfaces, cream text, sage focus and active-tab marks,
lavender selection, compact corners, and the same DM Mono font as Kitty. Menus,
the address popup, pinned tabs, workspace buttons, notifications, and internal
pages follow the palette. Website styling stays under each website's control.
Security indicators remain visible. The browser restores the previous session,
asks where to save downloads, and starts with the sidebar visible. Compact mode
can still be toggled during the session.

Quit and reopen Zen after applying the configuration. Preferences set in Nix are
reapplied at browser startup. Edit the preference attribute set in `zen.nix` or
the CSS in `modules/home/zen/`; CSS source colour tokens are rendered through
`modules/_palette.nix`. Existing unmanaged CSS files are backed up by Home Manager
as `.hm-bak`. The old imports from Noctalia's cache are replaced by these managed
stylesheets. Noctalia's user theme generation is already disabled in its saved
configuration.

Zen's [CSS guide](https://docs.zen-browser.app/guides/live-editing) and
[preference reference](https://docs.zen-browser.app/guides/about-config-flags)
document the customization hooks.

## GTK and icons

`modules/home/gtk.nix` configures `adw-gtk3-dark`, DM Mono, dark preference, and
Gruvpine Pixel icons. GTK 3 uses the named colours and widget rules in
`modules/home/gtk/`; GTK 4 uses matching named colours plus the current
[libadwaita CSS variables](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/css-variables.html).
Windows, views, sidebars, cards, dialogs, popovers, headers, and status colours
share the palette. Sage accents use charcoal foregrounds for contrast.

`modules/home/_icons/render.py` generates original pixel SVGs and launcher
aliases. Extend `MARKS` with a 12×12 character grid, then add the application's
desktop `Icon=` name to `ICONS`. The Nix package renders the artwork from the
selected palette and creates an icon cache. Apps without custom artwork inherit
Papirus Dark, Adwaita, then hicolor. Symbolic controls retain their native icons.
The rmpc desktop entry preserves its upstream launcher metadata and adds its
missing music icon.

Caido, Chromium, NordVPN, Alacritty, Satty/Screenshot, and CUPS printing have
dedicated pixel artwork. Alacritty uses its own mark rather than Kitty's terminal
icon. Launcher and window-class aliases point to the same artwork. Home Manager
also links the theme into `~/.local/share/icons/Gruvpine-Pixel`, the standard user
icon directory shared by GTK and Qt.

Qt's GTK 3 platform integration shares the icon theme and fonts with GTK, so
Noctalia and other Qt applications can resolve the pixel artwork too. This
setting also enters the user service environment; log out and back in to refresh
all running desktop processes.

Restart GTK apps after activation. Some sandboxed apps and apps that draw their
own interfaces may use their own theme settings.

## Home Manager activation repair

The previous activations failed because `~/.config/rmpc`, `~/.config/yazi`, and `~/.config/mpv`
were dangling whole-directory links into an old `*-home-manager-files` store
path. New configurations manage files beneath these directories; `mkdir` cannot
replace the dangling directory links.

`config-migrations.nix` runs the migration after Home Manager's write boundary
and before `linkGeneration`. Only these three known Home Manager link patterns are
matched. Each old link is moved to `<directory>.hm-directory-link`; existing
backups receive numbered suffixes. Then a writable directory is created and Home
Manager links its files. Ordinary directories and user-maintained dotfile links
are untouched. Home Manager dry runs skip the migration, and subsequent
activations leave the repaired directories alone.

Validation:

```sh
python3 -B -m unittest discover -s tests -p test_config_migrations.py
nix build --no-link .#nixosConfigurations.nixos.config.system.build.toplevel
```

For this laptop, the verified host is `nixos` and the user is `daemonsec`. Apply
with `nh os switch` from this checkout when ready; do not add a host override.
Inspect `journalctl -u home-manager-daemonsec.service -b --no-pager` if activation
reports another error.