Desktop¶
Source directory: modules/desktop/
default.nix¶
modules/desktop/cloud-sync/default.nix
No option declarations; see source for implementation.
cosmic-remote-desktop.nix¶
modules/desktop/cosmic-remote-desktop.nix
- Enable option: Remote Desktop support for COSMIC Desktop Environment
Options: enable, protocol, rdpPort, vncPort, allowedNetworks, disableScreenLock, disablePowerManagement, vncPassword
Options declaration (Nix)
options.features.desktop.cosmic-remote-desktop = {
enable = mkEnableOption "Remote Desktop support for COSMIC Desktop Environment";
protocol = mkOption {
type = types.enum [ "rdp" "vnc" "both" ];
default = "both";
description = "Remote desktop protocol to enable (RDP, VNC, or both)";
};
rdpPort = mkOption {
type = types.port;
default = 3389;
description = "RDP server port";
};
vncPort = mkOption {
type = types.port;
default = 5900;
description = "VNC server port";
};
allowedNetworks = mkOption {
type = types.listOf types.str;
default = [ "192.168.1.0/24" "10.0.0.0/8" ];
description = "Networks allowed to connect to remote desktop";
};
disableScreenLock = mkOption {
type = types.bool;
default = false;
description = "Disable automatic screen locking for remote sessions";
};
disablePowerManagement = mkOption {
type = types.bool;
default = true;
description = "Disable sleep/suspend for remote desktop availability";
};
vncPassword = mkOption {
type = types.str;
default = "nixos";
description = "VNC password for authentication (change this for security!)";
};
}
cosmic.nix¶
- Enable option: COSMIC Desktop Environment
Options: enable, useCosmicGreeter, defaultSession, installAllApps, enableTailscaleApplet, enableNextMeetingApplet, enableSpotifyApplet, enableForecastApp
Options declaration (Nix)
options.features.desktop.cosmic = {
enable = mkEnableOption "COSMIC Desktop Environment";
useCosmicGreeter = mkOption {
type = types.bool;
default = true;
description = "Use COSMIC Greeter as the display manager";
};
defaultSession = mkOption {
type = types.bool;
default = false;
description = "Set COSMIC as the default desktop session";
};
installAllApps = mkOption {
type = types.bool;
default = true;
description = "Install all COSMIC applications and extensions";
};
enableTailscaleApplet = mkOption {
type = types.bool;
default = true;
description = "Enable Tailscale management applet for COSMIC panel. Requires Tailscale to be installed and users to have operator privileges.";
};
enableNextMeetingApplet = mkOption {
type = types.bool;
default = true;
description = "Enable next meeting calendar applet for COSMIC panel. Shows upcoming meetings with one-click join for video calls. Requires Evolution Data Server.";
};
enableSpotifyApplet = mkOption {
type = types.bool;
default = true;
description = ''
Enable Spotify applet for COSMIC panel.
Displays currently playing Spotify track information (artist and title) in the system panel.
Shows playback status indicators (playing, paused, stopped) with 500ms refresh intervals.
Requires Spotify with MPRIS support on Wayland.
'';
};
enableForecastApp = mkOption {
type = types.bool;
default = true;
description = ''
Enable Forecast weather application for COSMIC desktop.
Weather app written in Rust and libcosmic providing weather information display.
Integrates with COSMIC desktop environment for native experience.
'';
};
}
ddcutil.nix¶
- Enable option: ddcutil DDC/CI control of external monitors (brightness/contrast/input over I2C)
Options declaration (Nix)
options.modules.hardware.ddcutil.enable =
mkEnableOption "ddcutil DDC/CI control of external monitors (brightness/contrast/input over I2C)";
config = mkIf cfg.enable {
# Loads the i2c-dev kernel module and installs udev rules giving the `i2c`
# group read/write on /dev/i2c-*.
hardware.i2c.enable = true;
environment.systemPackages = [ pkgs.ddcutil ];
# Put every normal user in the i2c group so `ddcutil` works without sudo.
users.groups.i2c.members =
builtins.attrNames (filterAttrs (_: u: u.isNormalUser) config.users.users);
}
default.nix¶
No option declarations; see source for implementation.
display-manager.nix¶
modules/desktop/display-manager.nix
- Enable option: auto-login at boot (recommended only for headless RDP hosts)
Options: enable, backend, user
Options declaration (Nix)
options.desktop.displayManager = {
backend = mkOption {
type = types.enum [ "gdm" "cosmic-greeter" "none" ];
default = "none";
description = ''
Which display manager runs at boot.
- gdm: GDM (used by the headless RDP host for auto-login GNOME)
- cosmic-greeter: COSMIC's own greeter (used by hosts with COSMIC)
- none: no DM enabled (e.g. host uses start* command directly)
This option exists to keep the wiring in one place and prevent
lightdm from sneaking back in (nixpkgs enables it by default
when xserver is enabled).
'';
};
autoLogin = {
enable = mkEnableOption "auto-login at boot (recommended only for headless RDP hosts)";
user = mkOption {
type = types.str;
default = "";
description = "User to auto-login as. Required when autoLogin.enable = true.";
};
};
}
electron-config.nix¶
modules/desktop/electron-config.nix
No option declarations; see source for implementation.
gnome-remote-desktop.nix¶
modules/desktop/gnome-remote-desktop.nix
- Enable option: GNOME Remote Desktop (system-mode RDP)
Options: enable, credentialsFile, credentialsUser
Options declaration (Nix)
options.features.gnome-remote-desktop = {
enable = mkEnableOption "GNOME Remote Desktop (system-mode RDP)";
credentialsFile = mkOption {
type = types.nullOr types.path;
default =
if rdpSecretExists
then config.age.secrets.grd-rdp-password.path
else null;
defaultText = lib.literalExpression ''
config.age.secrets.grd-rdp-password.path # when secrets/grd-rdp-password.age exists
'';
example = "/run/agenix/grd-rdp-password";
description = ''
Path to a file containing the RDP password (plaintext, no trailing
newline). When set, the grd-bootstrap oneshot writes the password
into the system gnome-remote-desktop daemon's credential store on
every boot.
Auto-defaults to the agenix-decrypted path
`config.age.secrets.grd-rdp-password.path` when
`secrets/grd-rdp-password.age` is present in the repo. The file is
read at runtime — its contents never enter the Nix store.
'';
};
credentialsUser = mkOption {
type = types.str;
default = "olafkfreund";
description = ''
Username RDP clients authenticate as. Written into the system
gnome-remote-desktop credentials store alongside the password.
'';
};
}
default.nix¶
modules/desktop/gtk/default.nix
No option declarations; see source for implementation.
labwc.nix¶
- Enable option: labwc stacking Wayland compositor (selectable login session)
Options declaration (Nix)
mangowm.nix¶
- Enable option: mango dwl-based Wayland compositor (selectable login session)
Options declaration (Nix)
niri.nix¶
- Enable option: niri scrollable-tiling Wayland compositor (selectable login session)
Options declaration (Nix)
options.desktop.niri.enable =
mkEnableOption "niri scrollable-tiling Wayland compositor (selectable login session)";
config = mkIf cfg.enable {
# Use the nixpkgs niri package and skip niri-flake's binary cache, so we
# don't add an extra trusted substituter or need the cache-then-enable
# rebuild dance documented upstream.
niri-flake.cache.enable = false;
programs.niri = {
enable = true;
package = pkgs.niri;
};
# programs.niri installs share/wayland-sessions/niri.desktop automatically,
# so greetd/GDM list "niri" at login. Minimal runtime deps for a usable
# bare session before the Noctalia shell phase.
environment.systemPackages = with pkgs; [
xwayland-satellite # rootless Xwayland for niri
];
}
plasma.nix¶
modules/desktop/plasma/plasma.nix
No option declarations; see source for implementation.
default.nix¶
modules/desktop/remote/default.nix
No option declarations; see source for implementation.
stylix-theme.nix¶
modules/desktop/stylix-theme.nix
No option declarations; see source for implementation.
default.nix¶
modules/desktop/wlr/default.nix
No option declarations; see source for implementation.