nixos-configuration/nix-os/desktopManagers/gnome.nix
2024-06-09 12:42:42 +02:00

87 lines
2.6 KiB
Nix

{config, lib, pkgs, ... }:
let
maxThumbnails = config.programs.gnome.extensions.workspaceIndicator.maxThumbnails;
workspaceIndicator = pkgs.gnomeExtensions.workspace-indicator.overrideAttrs {
postPatch = ''
sed -i 's/const MAX_THUMBNAILS = 6;/const MAX_THUMBNAILS = '${builtins.toString maxThumbnails}'/' extension.js
'';
};
in
{
options = {
programs.gnome.extensions.workspaceIndicator.maxThumbnails = lib.mkOption {
type = lib.types.int;
default = 11;
description = "The maximum number of thumbnails to show in the workspace indicator";
};
};
imports = [
../unstable-packages.nix
../dconf-common.nix
];
config = {
services.xserver.enable = true;
services.xserver.desktopManager.gnome.enable = true;
# environment.sessionVariables.NIXOS_OZONE_WL = "1";
proot.dconf.profiles.user.rulesToApply = [
"org/gnome/desktop/background"
"org/gnome/desktop/interface"
"org/gnome/desktop/media-handling"
"org/gnome/desktop/peripherals/mouse"
"org/gnome/desktop/sound"
"org/gnome/desktop/wm/preferences"
"org/gnome/mutter"
"org/gnome/SessionManager"
"org/gnome/settings-daemon/plugins/power"
"org/gnome/shell"
"org/gnome/shell/app-switcher"
"org/gnome/shell/extensions/color-picker"
"org/gnome/shell/extensions/pop-shell"
"org/gnome/shell/extensions/top-bar-organizer"
"org/gnome/shell/extensions/trayIconsReloaded"
"org/gnome/shell/extensions/vitals"
"org/gnome/shell/keybindings"
"org/gnome/desktop/default-applications/terminal"
"org/gnome/settings-daemon/plugins/media-keys"
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0"
];
environment.gnome.excludePackages = with pkgs; [
gnome.baobab
gnome.cheese
gnome.epiphany
gnome.evince
gnome.geary
gedit
gnome.gnome-characters
gnome-connections
gnome-console
gnome.gnome-disk-utility
gnome.gnome-font-viewer
gnome.gnome-logs
gnome.gnome-maps
gnome-text-editor
gnome-tour
gnome.seahorse
gnome.totem
gnome.yelp
];
environment.systemPackages = with pkgs; [
workspaceIndicator
gnomeExtensions.pop-shell
gnomeExtensions.vitals
gnomeExtensions.tray-icons-reloaded
gnomeExtensions.color-picker
gnomeExtensions.top-bar-organizer
# unstablePkgs.gnomeExtensions.translate-indicator
# translate-shell
pavucontrol
#FIXME: Apply the cursor theme also in GTK3 config
google-cursor
];
};
}