2026-06-09 19:41:17 +01:00
|
|
|
# Graphical desktop layer: GUI apps, Wayland session env, and cursor theme.
|
|
|
|
|
# Imported only on hosts that run Sway (MBP, T400, Mac Pro); never pulled onto
|
|
|
|
|
# the headless WSL host. Login (and the Sway session launch) is handled by the
|
2026-06-29 13:06:23 +01:00
|
|
|
# greetd/ReGreet greeter -- see ../modules/sway.nix -- so there is no tty1
|
|
|
|
|
# autostart.
|
2026-06-09 21:14:00 +01:00
|
|
|
{
|
|
|
|
|
pkgs,
|
|
|
|
|
config,
|
|
|
|
|
inputs,
|
2026-06-29 13:06:23 +01:00
|
|
|
identity,
|
2026-06-09 21:14:00 +01:00
|
|
|
...
|
|
|
|
|
}:
|
2026-06-02 07:40:25 -07:00
|
|
|
{
|
|
|
|
|
imports = [
|
|
|
|
|
./sway.nix
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
home.packages = [
|
|
|
|
|
pkgs.element-desktop
|
|
|
|
|
pkgs.legcord
|
2026-06-09 20:30:32 +01:00
|
|
|
pkgs.nemo # file manager (launched via Mod+e, see ./sway.nix)
|
2026-06-02 07:40:25 -07:00
|
|
|
#pkgs.plex-desktop
|
|
|
|
|
#pkgs.plexamp
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
home.sessionVariables = {
|
|
|
|
|
MOZ_USE_XINPUT2 = "1";
|
|
|
|
|
XDG_CURRENT_DESKTOP = "sway";
|
|
|
|
|
};
|
|
|
|
|
|
2026-06-10 14:56:58 +01:00
|
|
|
# Default apps for the desktop (writes ~/.config/mimeapps.list). Firefox owns
|
|
|
|
|
# the web; nemo owns directories/file URIs; images, PDFs and plain text open
|
|
|
|
|
# in Firefox too -- no dedicated GUI viewer/editor is installed and vim is
|
|
|
|
|
# terminal-only (no usable GUI .desktop for double-click handoff). Kept
|
|
|
|
|
# minimal -- only the handlers actually present on these hosts.
|
|
|
|
|
xdg.mimeApps = {
|
|
|
|
|
enable = true;
|
|
|
|
|
defaultApplications = {
|
|
|
|
|
"text/html" = "firefox.desktop";
|
|
|
|
|
"x-scheme-handler/http" = "firefox.desktop";
|
|
|
|
|
"x-scheme-handler/https" = "firefox.desktop";
|
|
|
|
|
"x-scheme-handler/about" = "firefox.desktop";
|
|
|
|
|
"x-scheme-handler/unknown" = "firefox.desktop";
|
|
|
|
|
"inode/directory" = "nemo.desktop";
|
|
|
|
|
"image/png" = "firefox.desktop";
|
|
|
|
|
"image/jpeg" = "firefox.desktop";
|
|
|
|
|
"image/gif" = "firefox.desktop";
|
|
|
|
|
"image/webp" = "firefox.desktop";
|
|
|
|
|
"image/svg+xml" = "firefox.desktop";
|
|
|
|
|
"application/pdf" = "firefox.desktop";
|
|
|
|
|
"text/plain" = "firefox.desktop";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2026-06-09 20:30:32 +01:00
|
|
|
# Theme GTK apps (nemo, etc.) to match the Catppuccin Mocha desktop. Under
|
|
|
|
|
# Sway there is no XSettings daemon, so GTK reads these from the generated
|
|
|
|
|
# ~/.config/gtk-{3,4}.0/settings.ini directly. The Mocha theme is dark by
|
|
|
|
|
# design, so no separate prefer-dark hint is needed.
|
|
|
|
|
gtk = {
|
|
|
|
|
enable = true;
|
2026-06-09 20:59:50 +01:00
|
|
|
# Theme GTK4 apps too (for any added later). GTK4 ignores gtk-theme-name,
|
|
|
|
|
# but home-manager turns this into an `@import` of the theme's
|
|
|
|
|
# gtk-4.0/gtk.css into ~/.config/gtk-4.0/gtk.css -- which even libadwaita
|
|
|
|
|
# honours, since that file overrides the named colours it uses
|
|
|
|
|
# (window_bg_color, accent_bg_color, ...). Set explicitly (same value as the
|
|
|
|
|
# legacy default) so it also silences the stateVersion<26.05 warning.
|
|
|
|
|
gtk4.theme = config.gtk.theme;
|
2026-06-09 20:30:32 +01:00
|
|
|
theme = {
|
|
|
|
|
name = "catppuccin-mocha-blue-standard";
|
|
|
|
|
package = pkgs.catppuccin-gtk.override {
|
|
|
|
|
accents = [ "blue" ];
|
|
|
|
|
variant = "mocha";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
iconTheme = {
|
|
|
|
|
name = "Adwaita";
|
|
|
|
|
package = pkgs.adwaita-icon-theme;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2026-06-02 07:40:25 -07:00
|
|
|
home.pointerCursor = {
|
|
|
|
|
gtk.enable = true;
|
|
|
|
|
x11 = {
|
|
|
|
|
enable = true;
|
|
|
|
|
defaultCursor = "Adwaita";
|
|
|
|
|
};
|
|
|
|
|
package = pkgs.adwaita-icon-theme;
|
|
|
|
|
name = "Adwaita";
|
|
|
|
|
size = 24;
|
|
|
|
|
};
|
2026-06-09 21:14:00 +01:00
|
|
|
|
|
|
|
|
# Firefox is themed at the browser level (it does not follow the GTK theme).
|
2026-06-29 13:06:23 +01:00
|
|
|
# The system installs the binary (programs.firefox in ../modules/users.nix); here
|
2026-06-09 21:14:00 +01:00
|
|
|
# home-manager owns only the profile, hence package = null. Apply the
|
|
|
|
|
# Catppuccin Mocha theme add-on (only the mauve accent is packaged upstream;
|
|
|
|
|
# the rest of the desktop uses blue) and make content + UI dark.
|
|
|
|
|
programs.firefox = {
|
|
|
|
|
enable = true;
|
|
|
|
|
package = null;
|
2026-06-10 10:32:19 +01:00
|
|
|
# Keep the legacy profile location (~/.mozilla/firefox) -- that is where the
|
|
|
|
|
# system Firefox actually looks; pin it explicitly to silence the
|
|
|
|
|
# stateVersion<26.05 default-change warning (the new XDG path depends on
|
|
|
|
|
# Firefox's own profile support).
|
|
|
|
|
configPath = ".mozilla/firefox";
|
2026-06-29 13:06:23 +01:00
|
|
|
profiles.${identity.username} = {
|
2026-06-09 21:14:00 +01:00
|
|
|
id = 0;
|
|
|
|
|
isDefault = true;
|
|
|
|
|
extensions = {
|
|
|
|
|
force = true;
|
|
|
|
|
packages = [
|
2026-06-10 10:32:19 +01:00
|
|
|
inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}.catppuccin-mocha-mauve
|
2026-06-09 21:14:00 +01:00
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
settings = {
|
|
|
|
|
# Enable bundled add-ons automatically so the theme applies on first run.
|
|
|
|
|
"extensions.autoDisableScopes" = 0;
|
|
|
|
|
# Dark chrome + dark page content.
|
|
|
|
|
"ui.systemUsesDarkTheme" = 1;
|
|
|
|
|
"layout.css.prefers-color-scheme.content-override" = 0;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
2026-06-02 07:40:25 -07:00
|
|
|
}
|