gnome: custom logo menu + dconf defaults
- Patch Logo Menu v38 to custom entries incl. Containers (DistroShelf)\n- Switch GNOME defaults to programs.dconf profile\n- Add desktop overrides for Thunar->Files and Ghostty->Terminal\n- Enable Thunar integration (gvfs/tumbler/xfconf) and add virt-manager tooling
This commit is contained in:
parent
c930b2a6bb
commit
c299acb87d
5 changed files with 134 additions and 49 deletions
|
|
@ -16,32 +16,51 @@ let
|
|||
in {
|
||||
services.displayManager.gdm.enable = true;
|
||||
services.desktopManager.gnome.enable = true;
|
||||
services.desktopManager.gnome.extraGSettingsOverridePackages = [
|
||||
pkgs.gnome-shell
|
||||
logoMenuSchemas
|
||||
];
|
||||
|
||||
# Ensure GNOME sees the compiled overrides.
|
||||
environment.profileRelativeEnvVars.XDG_DATA_DIRS = lib.mkAfter [
|
||||
"/share/gsettings-schemas/nixos-gsettings-overrides"
|
||||
];
|
||||
|
||||
services.gnome.core-developer-tools.enable = false;
|
||||
services.gnome.games.enable = false;
|
||||
|
||||
# System default GNOME Shell extensions (user can still toggle/override).
|
||||
services.desktopManager.gnome.extraGSettingsOverrides = ''
|
||||
[org/gnome/shell]
|
||||
disable-user-extensions=false
|
||||
enabled-extensions=['all-in-one-clipboard@NiffirgkcaJ.github.com','AlphabeticalAppGrid@stuarthayhurst','app-hider@lynith.dev','blur-my-shell@aunetx','caffeine@patapon.info','logomenu@aryan_k','restartto@tiagoporsch.github.io']
|
||||
programs.dconf = {
|
||||
enable = true;
|
||||
profiles.user.databases = [
|
||||
{
|
||||
settings = {
|
||||
"org/gnome/shell" = {
|
||||
disable-user-extensions = false;
|
||||
favorite-apps = [
|
||||
"thunar.desktop"
|
||||
"com.mitchellh.ghostty.desktop"
|
||||
"com.ranfdev.DistroShelf.desktop"
|
||||
"io.github.kolunmi.Bazaar.desktop"
|
||||
];
|
||||
enabled-extensions = [
|
||||
"all-in-one-clipboard@NiffirgkcaJ.github.com"
|
||||
"AlphabeticalAppGrid@stuarthayhurst"
|
||||
"app-hider@lynith.dev"
|
||||
"blur-my-shell@aunetx"
|
||||
"caffeine@patapon.info"
|
||||
"logomenu@aryan_k"
|
||||
"restartto@tiagoporsch.github.io"
|
||||
];
|
||||
};
|
||||
|
||||
[org/gnome/shell/extensions/logo-menu]
|
||||
menu-button-icon-image=51
|
||||
menu-button-terminal='ghostty'
|
||||
menu-button-system-monitor='flatpak run io.missioncenter.MissionCenter'
|
||||
menu-button-extensions-app='com.mattjakeman.ExtensionManager.desktop'
|
||||
hide-softwarecentre=true
|
||||
'';
|
||||
"org/gnome/desktop/interface" = {
|
||||
icon-theme = "Papirus-Dark";
|
||||
gtk-theme = "Adwaita-dark";
|
||||
color-scheme = "prefer-dark";
|
||||
};
|
||||
|
||||
"org/gnome/shell/extensions/logo-menu" = {
|
||||
menu-button-icon-image = lib.gvariant.mkInt32 51;
|
||||
menu-button-terminal = "ghostty";
|
||||
menu-button-system-monitor = "missioncenter";
|
||||
menu-button-extensions-app = "com.mattjakeman.ExtensionManager.desktop";
|
||||
hide-softwarecentre = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
environment.gnome.excludePackages = with pkgs; [
|
||||
# comment out to include
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
diff -ru orig/extension.js mod/extension.js
|
||||
--- orig/extension.js 2026-02-03 17:53:49.513281802 +0200
|
||||
+++ mod/extension.js 2026-02-03 17:53:49.528021029 +0200
|
||||
diff -ru logo-menu-patch-orig/extension.js logo-menu-patch-mod/extension.js
|
||||
--- logo-menu-patch-orig/extension.js 2026-02-03 21:59:13.353339473 +0200
|
||||
+++ logo-menu-patch-mod/extension.js 2026-02-03 21:59:13.362477131 +0200
|
||||
@@ -47,13 +47,8 @@
|
||||
this.setIconSize();
|
||||
this.add_child(this.icon);
|
||||
|
|
@ -17,7 +17,7 @@ diff -ru orig/extension.js mod/extension.js
|
|||
|
||||
// bind middle click option to toggle overview
|
||||
this.connect('button-press-event', this._buttonPressEvent.bind(this));
|
||||
@@ -64,51 +59,19 @@
|
||||
@@ -64,51 +59,40 @@
|
||||
}
|
||||
|
||||
_displayMenuItems() {
|
||||
|
|
@ -50,7 +50,17 @@ diff -ru orig/extension.js mod/extension.js
|
|||
- this._addItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||
- this._addItem(new MenuItem(_('Force Quit App'), () => this._forceQuit()));
|
||||
- }
|
||||
-
|
||||
+ this.menu.removeAll();
|
||||
+
|
||||
+ // Custom menu layout
|
||||
+ this._addItem(new MenuItem(_('About My System'), () => this._aboutThisDistro()));
|
||||
+ this._addItem(new MenuItem(_('System Settings'), () => this._systemPreferences()));
|
||||
+
|
||||
+ this._addItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||
+ this._addItem(new MenuItem(_('Extensions'), () => this._openExtensionsApp()));
|
||||
+ this._addItem(new MenuItem(_('System Monitor'), () => this._openSystemMonitor()));
|
||||
+ this._addItem(new MenuItem(_('Terminal'), () => this._openTerminal()));
|
||||
|
||||
- if (showPowerOptions) {
|
||||
- this._addItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||
- this._addItem(new MenuItem(_('Sleep'), () => this._sleep()));
|
||||
|
|
@ -65,26 +75,35 @@ diff -ru orig/extension.js mod/extension.js
|
|||
- } else if (!showPowerOptions && showLockScreen) {
|
||||
- this._addItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||
- this._addItem(new MenuItem(_('Lock Screen'), () => this._lockScreen()));
|
||||
- }
|
||||
+ this.menu.removeAll();
|
||||
+
|
||||
+ // Custom menu layout
|
||||
+ this._addItem(new MenuItem(_('About My System'), () => this._aboutThisDistro()));
|
||||
+ this._addItem(new MenuItem(_('System Settings'), () => this._systemPreferences()));
|
||||
+
|
||||
+ this._addItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||
+ this._addItem(new MenuItem(_('Extensions'), () => this._openExtensionsApp()));
|
||||
+ this._addItem(new MenuItem(_('System Monitor'), () => this._openSystemMonitor()));
|
||||
+ this._addItem(new MenuItem(_('Terminal'), () => this._openTerminal()));
|
||||
+
|
||||
+ this._addItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||
+ this._addItem(new MenuItem(_('Containers'), () => this._openContainers()));
|
||||
+ }
|
||||
+
|
||||
+ _openContainers() {
|
||||
+ // Prefer launching via desktop ID so we don't depend on PATH in the GNOME Shell env.
|
||||
+ const appSys = Shell.AppSystem.get_default();
|
||||
+ const app = appSys.lookup_app('com.ranfdev.DistroShelf.desktop');
|
||||
+ if (app) {
|
||||
+ try {
|
||||
+ app.launch(
|
||||
+ 0,
|
||||
+ -1,
|
||||
+ Shell.AppLaunchGpu.APP_PREF
|
||||
+ );
|
||||
+ return;
|
||||
+ } catch (e) {
|
||||
+ log(e);
|
||||
+ }
|
||||
}
|
||||
+
|
||||
+ // Fallback: direct command.
|
||||
+ Util.trySpawnCommandLine('distroshelf');
|
||||
}
|
||||
|
||||
_buttonPressEvent(actor, event) {
|
||||
diff -ru orig/schemas/org.gnome.shell.extensions.logo-menu.gschema.xml mod/schemas/org.gnome.shell.extensions.logo-menu.gschema.xml
|
||||
--- orig/schemas/org.gnome.shell.extensions.logo-menu.gschema.xml 2026-02-03 17:53:49.513219947 +0200
|
||||
+++ mod/schemas/org.gnome.shell.extensions.logo-menu.gschema.xml 2026-02-03 17:53:49.531021112 +0200
|
||||
diff -ru logo-menu-patch-orig/schemas/org.gnome.shell.extensions.logo-menu.gschema.xml logo-menu-patch-mod/schemas/org.gnome.shell.extensions.logo-menu.gschema.xml
|
||||
--- logo-menu-patch-orig/schemas/org.gnome.shell.extensions.logo-menu.gschema.xml 2026-02-03 21:59:13.353462172 +0200
|
||||
+++ logo-menu-patch-mod/schemas/org.gnome.shell.extensions.logo-menu.gschema.xml 2026-02-03 21:59:13.362611548 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
<schema path="/org/gnome/shell/extensions/Logo-menu/" id="org.gnome.shell.extensions.logo-menu">
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,11 @@
|
|||
];
|
||||
};
|
||||
|
||||
services.openssh.enable = true;
|
||||
services = {
|
||||
openssh.enable = true;
|
||||
gvfs.enable = true;
|
||||
tumbler.enable = true;
|
||||
};
|
||||
|
||||
networking = {
|
||||
useDHCP = lib.mkDefault true;
|
||||
|
|
@ -62,7 +66,17 @@
|
|||
enableBashIntegration = lib.mkDefault true;
|
||||
};
|
||||
nix-index-database.comma.enable = lib.mkDefault true;
|
||||
thunar = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
pkgs.xfce.thunar-archive-plugin
|
||||
pkgs.xfce.thunar-media-tags-plugin
|
||||
pkgs.xfce.thunar-vcs-plugin
|
||||
pkgs.xfce.thunar-volman
|
||||
];
|
||||
};
|
||||
virt-manager.enable = true;
|
||||
xfconf.enable = true;
|
||||
};
|
||||
|
||||
# Optimise the Nix store once a day
|
||||
|
|
|
|||
|
|
@ -1,8 +1,39 @@
|
|||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
let
|
||||
# Override Thunar desktop entry to show as "Files".
|
||||
thunarDesktopOverride = pkgs.makeDesktopItem {
|
||||
name = "thunar"; # same filename to shadow upstream entry
|
||||
desktopName = "Files";
|
||||
genericName = "File Manager";
|
||||
tryExec = "thunar";
|
||||
exec = "thunar %U";
|
||||
icon = "org.xfce.thunar";
|
||||
categories = [ "Utility" "FileManager" ];
|
||||
mimeTypes = [ "inode/directory" ];
|
||||
keywords = [ "folder" "manager" "explorer" "files" ];
|
||||
startupNotify = true;
|
||||
startupWMClass = "Thunar";
|
||||
terminal = false;
|
||||
comment = "Browse files";
|
||||
};
|
||||
|
||||
# Override Ghostty desktop entry to show as "Terminal".
|
||||
ghosttyDesktopOverride = pkgs.makeDesktopItem {
|
||||
name = "com.mitchellh.ghostty";
|
||||
desktopName = "Terminal";
|
||||
genericName = "Terminal Emulator";
|
||||
exec = "ghostty";
|
||||
icon = "com.mitchellh.ghostty";
|
||||
categories = [ "System" "TerminalEmulator" "Utility" ];
|
||||
terminal = false;
|
||||
comment = "Fast GPU-accelerated terminal";
|
||||
};
|
||||
in {
|
||||
# Baseline system tools available everywhere; users run Home Manager standalone.
|
||||
config.environment.systemPackages = lib.mkAfter [
|
||||
(lib.hiPrio thunarDesktopOverride)
|
||||
(lib.hiPrio ghosttyDesktopOverride)
|
||||
pkgs.distrobox
|
||||
pkgs.distroshelf
|
||||
pkgs.dnsmasq
|
||||
|
|
@ -35,6 +66,9 @@
|
|||
pkgs.libnotify
|
||||
pkgs.micro
|
||||
pkgs.mission-center
|
||||
pkgs.p7zip
|
||||
pkgs.podman-compose
|
||||
pkgs.papirus-icon-theme
|
||||
pkgs.xdg-utils
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@
|
|||
thunderbird # full-featured Mozilla e-mail client
|
||||
# geary # default GNOME email client
|
||||
|
||||
ptyxis # container aware GNOME terminal
|
||||
# ptyxis # container aware GNOME terminal
|
||||
# alacritty # GPU accelerated terminal emulator
|
||||
# kitty # GPU accelerated terminal emulator
|
||||
|
||||
|
|
@ -113,9 +113,8 @@
|
|||
# you can change the default terminal and editor here
|
||||
TERMINAL = "${pkgs.ghostty}/bin/ghostty";
|
||||
DEFAULT_TERMINAL = "${pkgs.ghostty}/bin/ghostty";
|
||||
EDITOR = "${pkgs.micro}/bin/micro";
|
||||
EDITOR = "micro";
|
||||
DBX_CONTAINER_HOME_PREFIX = "$HOME/distrobox";
|
||||
GDK_BACKEND = "x11 virt-manager"
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue