adds pano alpha and fixes for gnome extensions

This commit is contained in:
Menno van Leeuwen 2024-11-05 19:16:37 +01:00
parent ac7376f606
commit c0626c9d27
Signed by: vleeuwenmenno
SSH Key Fingerprint: SHA256:OJFmjANpakwD3F2Rsws4GLtbdz1TJ5tkQF0RZmF0TRE
9 changed files with 131 additions and 59 deletions

View File

@ -1,7 +1,7 @@
{ pkgs-unstable, pkgs, ... }:
{
home.packages = with pkgs; [
# GUI Applications
# GUI Application
## Utilities
pkgs-unstable.mission-center
gnome.gnome-tweaks

View File

@ -1,10 +1,24 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs.gnomeExtensions; [
config,
pkgs-unstable,
pkgs,
...
}:
{
# We run most extensions from unstable because they are more up-to-date
home.packages =
with pkgs.gnomeExtensions;
[
user-themes
weather-oclock
native-window-placement
]
++ (with pkgs-unstable.gnomeExtensions; [
tiling-shell
lilypad
tailscale-qs
gsconnect
blur-my-shell
weather-oclock
space-bar
gtk4-desktop-icons-ng-ding
logo-menu
@ -13,12 +27,11 @@
coverflow-alt-tab
dash-to-dock
appindicator
user-themes
autohide-battery
battery-health-charging
just-perfection
pano
];
smile-complementary-extension
]);
# Copy burn-my-windows profile to user config
home.file.".config/burn-my-windows/profiles/default.conf".text = ''
@ -34,6 +47,7 @@
"org/gnome/shell" = {
disable-user-extensions = false;
enabled-extensions = [
"lilypad@shendrew.github.io"
"tilingshell@ferrarodomenico.com"
"gsconnect@andyholmes.github.io"
"blur-my-shell@aunetx"
@ -52,6 +66,7 @@
"user-theme@gnome-shell-extensions.gcampax.github.com"
"autohide-battery@sitnik.ru"
"just-perfection-desktop@just-perfection"
"native-window-placement@gnome-shell-extensions.gcampax.github.com"
];
};

View File

@ -33,7 +33,7 @@
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/emotes" = {
binding = "<Super>e";
command = "flatpak run com.tomjwatson.Emote";
command = "smile";
name = "emotes";
};
};

View File

@ -1,37 +1,4 @@
{ config, pkgs, ... }:
{
# Enable NetworkManager with Wireguard support
networking = {
networkmanager = {
enable = true;
plugins = with pkgs; [
networkmanager-vpnc
networkmanager-openvpn
];
};
};
# Add NetworkManager connection profiles
environment.etc."NetworkManager/system-connections/work-vpn.nmconnection".source = "${config.home.homeDirectory}/dotfiles/secrets/wireguard/work.wg0.conf";
# Ensure NetworkManager Wireguard support is installed
environment.systemPackages = with pkgs; [
networkmanager-wireguard
wireguard-tools
];
# Add a systemd service to set proper permissions and reload NetworkManager connections
systemd.services.reload-networkmanager-connections = {
description = "Set permissions and reload NetworkManager Connections";
wantedBy = [ "multi-user.target" ];
after = [ "NetworkManager.service" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = pkgs.writeShellScript "reload-nm-connections" ''
chmod 600 /etc/NetworkManager/system-connections/*
${pkgs.networkmanager}/bin/nmcli connection reload
'';
};
};
}

View File

@ -1,4 +1,12 @@
{ ... }:
{ config, pkgs, ... }:
let
files = builtins.removeAttrs (builtins.readDir ./.) [ "default.nix" ];
# Import all other .nix files as modules
moduleFiles = builtins.map (fname: ./. + "/${fname}") (builtins.attrNames files);
in
{
imports = [ ];
# Import all the package modules
imports = moduleFiles;
}

View File

@ -1,8 +1,10 @@
{ ... }:
{ config, pkgs, ... }:
{
# Import all the package modules
imports = [
./steam.nix
./1password.nix
./flatpak.nix
./steam.nix
./pano.nix
];
}

View File

@ -0,0 +1,10 @@
{
config,
lib,
pkgs,
...
}:
{
environment.systemPackages = [ (pkgs.callPackage ./pano { }) ];
}

View File

@ -0,0 +1,60 @@
{
stdenv,
fetchzip,
lib,
gnome,
glib,
libgda,
gsound,
substituteAll,
wrapGAppsHook,
}:
stdenv.mkDerivation rec {
pname = "gnome-shell-extension-pano";
version = "v23-alpha3";
src = fetchzip {
url = "https://github.com/oae/gnome-shell-pano/releases/download/${version}/pano@elhan.io.zip";
sha256 = "LYpxsl/PC8hwz0ZdH5cDdSZPRmkniBPUCqHQxB4KNhc=";
stripRoot = false;
};
patches = [
(substituteAll {
src = ./gnome-shell-extension-pano.patch;
gsound_path = "${gsound}/lib/girepository-1.0";
gda_path = "${libgda}/lib/girepository-1.0";
})
];
buildInputs = [
gnome.gnome-shell
libgda
gsound
];
nativeBuildInputs = [ wrapGAppsHook ];
installPhase = ''
runHook preInstall
local_ext_dir=$out/share/gnome-shell/extensions/pano@elhan.io
install -d $local_ext_dir
cp -r * $local_ext_dir
# Ensure typelibs are directly accessible
mkdir -p $out/lib/girepository-1.0
ln -s ${gsound}/lib/girepository-1.0/* $out/lib/girepository-1.0/
ln -s ${libgda}/lib/girepository-1.0/* $out/lib/girepository-1.0/
runHook postInstall
'';
meta = with lib; {
description = "Pano GNOME Shell Clipboard Management Extension (${version} pre-release)";
homepage = "https://github.com/oae/gnome-shell-pano";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = [ maintainers.zvictor ];
};
}

View File

@ -0,0 +1,10 @@
--- a/extension.js
+++ b/extension.js
@@ -1,3 +1,7 @@
+import GIRepository from 'gi://GIRepository';
+GIRepository.Repository.prepend_search_path('@gda_path@');
+GIRepository.Repository.prepend_search_path('@gsound_path@');
+
import Gio from 'gi://Gio';
import GLib from 'gi://GLib';
import * as extension_js from 'resource:///org/gnome/shell/extensions/extension.js';