nixos/settings/gnome.nix

139 lines
4.1 KiB
Nix
Raw Normal View History

{ 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
# Enable Gnome
services.xserver.enable = true;
services.displayManager.gdm.enable = true;
services.desktopManager.gnome.enable = true;
2026-01-11 22:31:38 +00:00
services.displayManager.gdm.wayland = true;
2026-01-11 22:29:04 +00:00
boot.plymouth.enable = false;
# Flatpak for ad-hoc app installs via Bazaar
services.flatpak.enable = true;
# Add extensions, packages, and terminal
2026-01-05 09:25:10 +00:00
environment.systemPackages = with pkgs; [
ghostty
2026-01-05 09:25:10 +00:00
gnomeExtensions.blur-my-shell
gnomeExtensions.just-perfection
gnomeExtensions.appindicator
gnomeExtensions.hot-edge
adwaita-icon-theme
2026-01-20 08:35:23 +00:00
gnome-themes-extra
adwaita-icon-theme-legacy
papirus-icon-theme
2026-01-05 09:25:10 +00:00
];
2026-01-11 22:29:04 +00:00
2026-01-05 09:25:10 +00:00
# Set cursor theme
environment.sessionVariables = {
XCURSOR_THEME = "Adwaita";
XCURSOR_SIZE = "24";
XCURSOR_PATH = lib.mkForce [
"${pkgs.adwaita-icon-theme}/share/icons"
"$HOME/.icons"
"$HOME/.local/share/icons"
];
};
# mutter VRR — stylix handles theme/icon dconf entries
2026-01-05 09:25:10 +00:00
programs.dconf.profiles.user.databases = [{
settings = {
"org/gnome/desktop/interface" = {
icon-theme = "WallpaperAdwaita";
2026-01-05 09:25:10 +00:00
};
2026-03-25 10:09:45 +00:00
"org/gnome/mutter" = {
experimental-features = [ "variable-refresh-rate" ];
};
2026-01-05 09:25:10 +00:00
};
}];
qt = {
enable = true;
platformTheme = "adwaita";
style = "adwaita-dark";
};
2026-01-05 09:25:10 +00:00
programs.xwayland.enable = true;
programs.dconf.enable = true;
# Home Manager GNOME settings
home-manager.users.fred = { config, lib, pkgs, ... }: {
# Minimal titlebars — stylix manages the GTK theme; we layer our
# headerbar shrink on top via programs.gtk.*.extraCss.
gtk.enable = true;
# gtk.gtk3.extraCss / gtk4.extraCss are no-ops once stylix owns the
# theme — extra CSS has to go through stylix.targets.gtk.extraCss.
stylix.targets.gtk.extraCss = ''
headerbar { min-height: 0; padding: 0; margin: 0; }
headerbar .title { font-size: 0; }
window:backdrop {
background-color: @window_bg_color;
color: @window_fg_color;
}
window:backdrop headerbar {
background-color: @headerbar_bg_color;
color: @headerbar_fg_color;
}
'';
# GNOME dconf settings — stylix owns colour-scheme, gtk-theme,
# cursor-theme and accent-color now.
dconf.settings = {
"org/gnome/desktop/interface" = {
enable-hot-corners = false;
};
# Wallpaper now set by stylix's gnome target.
# Keyboard input sources
"org/gnome/desktop/input-sources" = {
sources = [
(lib.hm.gvariant.mkTuple [ "xkb" "gb" ])
(lib.hm.gvariant.mkTuple [ "xkb" "no" ])
];
};
# Window manager keybindings
"org/gnome/desktop/wm/keybindings" = {
close = ["<Super>q"];
toggle-fullscreen = ["<Super>f"];
};
"org/gnome/desktop/wm/preferences" = {
resize-with-right-button = lib.hm.gvariant.mkBoolean true;
button-layout = "";
};
# Shell keybindings
"org/gnome/shell/keybindings" = {
show-screenshot-ui = ["<Shift><Super>s"];
};
# Custom keybindings
"org/gnome/settings-daemon/plugins/media-keys" = {
home = ["<Super>e"];
control-center = ["<Super>i"];
custom-keybindings = [
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
];
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
name = "Terminal";
command = "ghostty";
binding = "<Super>t";
};
# Mouse acceleration
"org/gnome/desktop/peripherals/mouse" = {
accel-profile = "flat";
};
# Just Perfection extension
"org/gnome/shell/extensions/just-perfection" = {
window-demands-attention-focus = true;
};
};
};
2026-01-05 09:25:10 +00:00
};
2025-12-03 15:46:37 +00:00
}