nixos/settings/desktop.nix

87 lines
3.7 KiB
Nix
Raw Normal View History

# settings/desktop.nix — display manager, lightweight fallback session, GTK/Qt theming
{ config, pkgs, lib, inputs, ... }:
2025-12-03 15:46:37 +00:00
{
2026-01-09 13:09:34 +00:00
config = lib.mkIf (lib.elem config.networking.hostName [ "FredOS-Gaming" "FredOS-Macbook" ]) {
2026-01-05 09:25:10 +00:00
services.xserver.enable = true;
# GDM-style splash→session handoff: nothing else quits plymouth at boot;
# greetd freezes the last splash frame (--retain-splash) right before it
# spawns the isolated greeter compositor.
systemd.services.plymouth-quit.wantedBy = lib.mkForce [ ];
# ...and plymouth-quit-wait must go too: greetd is Type=idle, so it defers
# its ExecStart while any job is pending — and the only pending job is
# plymouth-quit-wait, which waits for the splash that greetd itself quits.
# That circle only broke on systemd's 5s idle timeout, costing 6s of boot.
systemd.services.plymouth-quit-wait.wantedBy = lib.mkForce [ ];
systemd.services.greetd = {
after = [ "plymouth-start.service" ];
serviceConfig.ExecStartPre = "-${pkgs.plymouth}/bin/plymouth quit --retain-splash";
};
boot.plymouth.enable = true;
boot.initrd.verbose = false;
boot.consoleLogLevel = 3;
boot.kernelParams = [ "quiet" "udev.log_level=3" ];
# Flatpak for ad-hoc app installs via Bazaar
services.flatpak.enable = true;
# USB drives: no automount; udiskie posts "Device added" with a Mount
# button (its default device_added action), then "Open" once mounted.
services.udisks2.enable = true;
# Secret Service for Chromium/Electron credential encryption.
# greetd passes the login password to PAM before starting the session.
services.gnome.gnome-keyring.enable = true;
security.pam.services.greetd.enableGnomeKeyring = true;
security.pam.services.login.enableGnomeKeyring = true;
2026-01-05 09:25:10 +00:00
environment.systemPackages = with pkgs; [
nemo # file manager
2026-08-23 20:27:41 +01:00
cliamp # terminal winamp
2026-01-20 08:35:23 +00:00
gnome-themes-extra
papirus-icon-theme
2026-01-05 09:25:10 +00:00
];
2026-01-11 22:29:04 +00:00
# Cursor theme — stylix.cursor in settings/stylix.nix owns the choice.
2026-01-05 09:25:10 +00:00
environment.sessionVariables = {
XCURSOR_THEME = "Bibata-Modern-Ice";
2026-01-05 09:25:10 +00:00
XCURSOR_SIZE = "24";
XCURSOR_PATH = lib.mkForce [
"${pkgs.bibata-cursors}/share/icons"
2026-01-05 09:25:10 +00:00
"$HOME/.icons"
"$HOME/.local/share/icons"
];
};
2026-01-05 09:25:10 +00:00
programs.xwayland.enable = true;
programs.dconf.enable = true;
home-manager.users.fred = {
2026-05-14 14:58:13 +01:00
# Stylix's qt target only supports qtct; disable it to silence the warning.
stylix.targets.qt.enable = false;
# Minimal titlebars. The GTK stylesheet itself — stylix's colours plus
# our headerbar shrink and surface-tint overrides — is rendered per
# wallpaper and swapped at runtime in settings/theming.nix.
gtk.enable = true;
services.udiskie = {
enable = true;
automount = false;
tray = "never";
# "Open" button → yazi (Super+E's spelling; udiskie appends the path).
settings.program_options.file_manager =
"${pkgs.ghostty}/bin/ghostty +new-window --working-directory=/home/fred -e yazi";
};
dconf.settings."org/nemo/window-state".start-with-menu-bar = false;
# GTK3 ignores dconf's color-scheme=prefer-dark — it only picks
# adw-gtk3's gtk-dark.css when this setting is on. Without it GTK3 apps
# (nemo) load the *light* sheet; the @define-color overrides repaint
# most of it, but colours sass baked in as literals survive — e.g.
# `messagedialog.csd.background button { color: rgba(0,0,6,0.8); }`, which
# is why nemo's delete confirmation had near-black buttons on dark bg.
gtk.gtk3.extraConfig.gtk-application-prefer-dark-theme = true;
};
2026-01-05 09:25:10 +00:00
};
2025-12-03 15:46:37 +00:00
}