From dab1895180c9554abc2ca60d00e106bee393f640 Mon Sep 17 00:00:00 2001 From: Leonardo Santiago Date: Thu, 8 May 2025 00:48:42 -0300 Subject: chore(gnome): rewrite extension logic to be able to more easily enable them separately --- modules/gnome/default.nix | 84 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 68 insertions(+), 16 deletions(-) (limited to 'modules/gnome/default.nix') diff --git a/modules/gnome/default.nix b/modules/gnome/default.nix index 8cf11c5..4422eef 100644 --- a/modules/gnome/default.nix +++ b/modules/gnome/default.nix @@ -1,27 +1,44 @@ { config, lib, pkgs, ...}: with lib; { imports = [ - ./gnome-config.nix + ./extensions.nix ]; - options.santi-modules.gnome.enable = mkEnableOption "Enable gnome"; + options.santi-modules.gnome = { + enable = mkEnableOption "Enable gnome"; + extensions = mkOption { + description = "Extensions to gnome"; + type = with types; attrsOf (submodule { + options = { + package = mkOption { + type = package; + description = "Extension package"; + }; + email = mkOption { + type = str; + description = "Extensions' maintainer email"; + }; + dconf-settings = mkOption { + type = attrs; + default = {}; + description = "Extra configuration to be passed to dconf"; + }; + enabled = mkEnableOption { + description = "Enable extension"; + }; + }; + }); + }; + }; config = mkIf config.santi-modules.gnome.enable { programs.dconf.enable = true; - environment.systemPackages = with pkgs; [ - gnome-tweaks - tela-icon-theme - hackneyed - ] ++ (with gnomeExtensions; [ - appindicator - vitals - user-themes - graphite-gtk-theme - x11-gestures - gsconnect - openweather-refined - ]); - environment.gnome.excludePackages = with pkgs; [ + gnome-font-viewer + gnome-connections + simple-scan + gnome-contacts gnome-photos gnome-tour + gnome-notes + gnome-text-editor gedit cheese gnome-terminal @@ -42,11 +59,46 @@ wayland = true; }; desktopManager.gnome.enable = true; + excludePackages = [ pkgs.xterm ]; }; services.udev.packages = [ pkgs.gnome-settings-daemon ]; services.gnome = { gnome-browser-connector.enable = true; gnome-keyring.enable = true; }; + home-manager.users.leonardo.dconf.settings = { + "org/gnome/desktop/background" = { + picture-uri = "${../../wallpaper.png}"; + picture-uri-dark = "${../../wallpaper.png}"; + picture-options = "zoom"; + }; + "org/gnome/desktop/interface" = { + color-scheme="prefer-dark"; + enable-hot-corners=false; + font-antialiasing="grayscale"; + font-hinting="slight"; + gtk-theme="Adwaita"; + cursor-theme="Hackneyed"; + icon-theme="Tela-brown-light"; + show-battery-percentage=true; + }; + "org/gnome/settings-daemon/plugins/power" = { + power-button-action="hibernate"; + sleep-inactive-ac-type="nothing"; + }; + "org/gnome/mutter" = { + dynamic-workspaces= true; + edge-tiling= true; + workspaces-only-on-primary= true; + experimental-features = [ "scale-monitor-framebuffer" "variable-refresh-rate"]; + }; + "org/gnome/shell" = { + disabled-extensions= [ + "windowsNavigator@gnome-shell-extensions.gcampax.github.com" + "apps-menu@gnome-shell-extensions.gcampax.github.com" + ]; + }; + "org/gnome/shell/app-switcher".current-workspace-only = true; + }; }; } -- cgit v1.2.3