diff --git a/homes/x86_64-linux/jo@puzzlevision/apps/gnome.nix b/homes/x86_64-linux/jo@puzzlevision/apps/gnome.nix deleted file mode 100644 index a7e3078..0000000 --- a/homes/x86_64-linux/jo@puzzlevision/apps/gnome.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - pkgs, - ... -}: { - # Use `dconf watch /` to track stateful changes you are doing, then set them here. - dconf.settings = { - "org/gnome/desktop/wm/preferences" = { - workspace-names = [ "Main" ]; - }; - - "org/gnome/shell/extensions/unite" = { - use-activities-text = false; - extend-left-box = false; - reduce-panel-spacing = false; - window-buttons-placement = "first"; - show-legacy-tray = false; - show-appmenu-button = false; - show-desktop-name = false; - enable-titlebar-actions = false; - restrict-to-primary-screen = true; - hide-activities-button = "never"; - hide-window-titlebars = "maximized"; - show-window-title = false; - autofocus-windows = true; - show-window-buttons = "maximized"; - notifications-position = "right"; - window-buttons-theme = "catppuccin"; - }; - }; -} diff --git a/homes/x86_64-linux/jo@puzzlevision/default.nix b/homes/x86_64-linux/jo@puzzlevision/default.nix index 89d6597..7848c5f 100644 --- a/homes/x86_64-linux/jo@puzzlevision/default.nix +++ b/homes/x86_64-linux/jo@puzzlevision/default.nix @@ -6,7 +6,6 @@ }: with lib; with lib.${namespace}; { imports = [ - ./apps/gnome.nix ./apps/vscodium.nix ]; diff --git a/modules/home/desktop/gnome/default.nix b/modules/home/desktop/gnome/default.nix index 0a965be..3c96963 100644 --- a/modules/home/desktop/gnome/default.nix +++ b/modules/home/desktop/gnome/default.nix @@ -12,29 +12,61 @@ let in { options.${host}.desktop.gnome = with types; { - extensions = mkOption { + enabled-extensions = mkOption { type = listOf package; default = with pkgs.gnomeExtensions; [ dash-to-dock user-themes blur-my-shell appindicator unite color-picker clipboard-history ]; example = [ dash-to-dock blur-my-shell ]; description = "Specify gnome extensions to install."; }; favorite-apps = mkOption { - type = listOf string; + type = listOf str; default = ["org.gnome.Nautilus.desktop" "obsidian.desktop" "zen.desktop" "dev.zed.Zed.desktop"]; example = ["org.gnome.Nautilus.desktop" "obsidian.desktop"]; - description = "Specify your favorite apps (sorted left to right)"; + description = "Specify your favorite apps (sorted left to right)."; + }; + extensions = { + unite = { + show-window-buttons = mkOption { + type = str; + default = "never"; + example = "never | maximized | tiled | both | always"; + description = "Specify when Unite should display window buttons within the top panel."; + }; + hide-window-titlebars = mkOption { + type = str; + default = "maximized"; + example = "never | maximized | tiled | both | always"; + description = "Specify when Unite should hide window titlebars."; + }; + }; }; }; config = mkIf osConfig.${namespace}.desktop.gnome.enable { - home.packages = cfg.extensions; + home.packages = cfg.enabled-extensions; dconf.settings = { "org/gnome/shell" = { favorite-apps = cfg.favorite-apps; - enabled-extensions = forEach cfg.extensions (x: x.extensionUuid); + enabled-extensions = forEach cfg.enabled-extensions (x: x.extensionUuid); disabled-extensions = []; # Make sure none of our extensions are disabled on system rebuild }; + "org/gnome/shell/extensions/unite" = mkIf (builtins.elem pkgs.gnomeExtensions.unite cfg.enabled-extensions) { + show-window-buttons = cfg.extensions.unite.show-window-buttons; + hide-window-titlebars = cfg.extensions.unite.hide-window-titlebars; + + use-activities-text = false; + extend-left-box = false; + reduce-panel-spacing = false; + show-legacy-tray = false; + show-appmenu-button = false; + show-desktop-name = false; + enable-titlebar-actions = false; + restrict-to-primary-screen = false; + hide-activities-button = "never"; + autofocus-windows = true; + notifications-position = "right"; + }; }; }; }