Skip to content

Desktop

A host chooses its desktop by importing one desktop concept beside its role. The concept pairs the system and user modules of that desktop, with the terminal it opens; the roles carry no desktop of their own, so the same role serves GNOME (concepts/gnome.nix), KDE Plasma (concepts/kde.nix) and an Omarchy-style Hyprland (concepts/hyprland.nix) alike. The office concept, which every role but the minimum one carries, brings the applications of whichever desktop the host chose. A workstation role without a desktop concept refuses to evaluate, and its message names the three. The modules under system/desktop hold only what makes a desktop operational and well configured; the applications that come with it live under system/software, in a folder per desktop:

hosts/example/default.nix
imports = [
../../concepts/kde.nix
../../roles/workstation/developer.nix
];

GNOME is tuned to feel familiar to someone arriving from another system. A machine chooses the overall style and the terminal; a user tunes the extensions, the apps pinned to the dash, and the keyboard layouts the tray offers.

Extensions are named by their Nixpkgs package rather than the opaque UUID GNOME identifies them by; the option derives the UUID, so enabling or disabling one needs no lookup.

A machine chooses the style and the terminal:

hosts/example/default.nix
desktop.style = "GNOME";
gnome.terminal = "ghostty";

A user tunes the extensions and the apps pinned to the dash:

home/example/default.nix
user.gnome = {
extensions = {
tophat = "enabled";
dash-to-dock = "disabled";
};
favoriteApps = [
"org.gnome.Console.desktop"
"firefox.desktop"
];
};

The tray’s input sources default to the user’s keyboard layouts, so they usually need no mention.

Plasma comes as KDE ships it, with SDDM as the login screen. The dark Breeze global theme, night light, and the host’s keyboard layouts are preset as defaults a user is free to change in System Settings, and a user’s own keyboard layouts are applied to their Plasma session as well. Discover offers Flatpak applications, and KDE Connect pairs phones.

The office concept brings KDE’s own applications along, by the same categories as GNOME’s; see system/software/kde.

SSH keys are served by an agent and their passphrases remembered in KWallet: the keys in ~/.ssh are loaded at login, which asks for each passphrase in a dialog with a “Remember password” box the first time and takes it from the wallet at every later login; a key used from elsewhere is asked for the same way. A user who logs in automatically, with services.displayManager.autoLogin.enable in their own configuration as under GNOME, has the wallet unlocked at login with the disk passphrase, as GNOME unlocks its keyring, provided the wallet’s password is the disk passphrase; otherwise KWallet asks for its password on first use.

Hyprland is a tiling Wayland compositor, set up in the spirit of Omarchy: Omarchy’s keybindings, window rules, look and colour themes, with the pieces of the Hyprland ecosystem that nixpkgs carries around it. SDDM is the login screen, Waybar the top bar, Wofi the launcher, Mako shows notifications, Hyprlock and Hypridle lock the screen, Hyprpaper draws the wallpaper, Thunar manages files, and Alacritty is the terminal. Super+K lists every keybinding, Super+Space opens the launcher, Super+Escape the system menu, and Super+Return a terminal. The session runs under UWSM, so the bar, notifications and helpers start as systemd user services.

The office concept brings Omarchy’s application choices along, where nixpkgs has them; see system/software/hyprland. GNOME Keyring comes along, as it does in Omarchy: it is the secret service for browsers, it remembers SSH passphrases, and its SSH agent unlocks a key silently once the passphrase is stored, exactly as under GNOME. Nothing else of GNOME does, although Omarchy leans on a few more of its pieces; a host that wants them opts in explicitly, e.g. GVfs for trash and network shares in Thunar (services.gvfs.enable).

A user who logs in automatically, with services.displayManager.autoLogin.enable in their own configuration as under GNOME, has the keyring unlocked at login with the disk passphrase, as under GNOME, provided the keyring’s password is the disk passphrase; otherwise the keyring asks for its password on first use.

A user picks one of Omarchy’s colour themes, which the bar, launcher, notifications, lock screen, window borders and terminal follow, and a wallpaper of their own:

home/example/default.nix
user.hyprland = {
theme = "nord";
wallpaper = ./wallpaper.png;
};

The user’s keyboard layouts become the compositor’s, switched with both Alt keys when there are several. Anything else is Hyprland’s own configuration, which a user extends through Home Manager — the settings render as Hyprland’s Lua configuration, so a bind or a window rule of your own merges with the shared ones:

home/example/default.nix
wayland.windowManager.hyprland.settings.bind = [
{
_args = [
"SUPER + SHIFT + R"
(lib.generators.mkLuaInline ''hl.dsp.exec_cmd("uwsm-app -- ssh your-server")'')
{ description = "SSH"; }
];
}
];