fix(desktop): refactor and fix packages of GUI apps
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
1ad2610b01
commit
1cbded50f0
3 changed files with 53 additions and 111 deletions
BIN
flake.lock
BIN
flake.lock
Binary file not shown.
|
@ -106,7 +106,6 @@ in {
|
||||||
]
|
]
|
||||||
++ (optionals config.nvidia.enable [
|
++ (optionals config.nvidia.enable [
|
||||||
"LIBVA_DRIVER_NAME, nvidia"
|
"LIBVA_DRIVER_NAME, nvidia"
|
||||||
"NVD_BACKEND, direct"
|
|
||||||
"XDG_SESSION_TYPE, wayland"
|
"XDG_SESSION_TYPE, wayland"
|
||||||
"GBM_BACKEND, nvidia-drm"
|
"GBM_BACKEND, nvidia-drm"
|
||||||
"__GLX_VENDOR_LIBRARY_NAME, nvidia"
|
"__GLX_VENDOR_LIBRARY_NAME, nvidia"
|
||||||
|
|
|
@ -9,12 +9,12 @@ in {
|
||||||
imports = [./dolphin.nix];
|
imports = [./dolphin.nix];
|
||||||
|
|
||||||
config = let
|
config = let
|
||||||
inherit (lib) getExe makeLibraryPath mkIf optionals optionalString;
|
inherit (lib) getExe optionals;
|
||||||
inherit (pkgs.writers) writeTOML;
|
inherit (pkgs.writers) writeTOML;
|
||||||
|
|
||||||
flakeDir = config.environment.variables.FLAKE;
|
flakeDir = config.environment.variables.FLAKE;
|
||||||
cfg = config.roles.desktop;
|
cfg = config.roles.desktop;
|
||||||
nvidiaEnable = config.nvidia.enable;
|
isNvidia = config.nvidia.enable;
|
||||||
|
|
||||||
restartTailscale = pkgs.writeShellScriptBin "restartTailscale" ''
|
restartTailscale = pkgs.writeShellScriptBin "restartTailscale" ''
|
||||||
sudo ${pkgs.systemd}/bin/systemctl restart tailscaled.service
|
sudo ${pkgs.systemd}/bin/systemctl restart tailscaled.service
|
||||||
|
@ -42,81 +42,24 @@ in {
|
||||||
(import ../home/obs.nix self)
|
(import ../home/obs.nix self)
|
||||||
|
|
||||||
({config, ...}: let
|
({config, ...}: let
|
||||||
symlink = config.lib.file.mkOutOfStoreSymlink;
|
inherit (config.lib.file) mkOutOfStoreSymlink;
|
||||||
configDir = "${flakeDir}/nixosModules/desktop/environment/config";
|
configDir = "${flakeDir}/nixosModules/desktop/environment/config";
|
||||||
in {
|
in {
|
||||||
xdg = {
|
xdg.configFile = {
|
||||||
configFile = {
|
"dolphinrc".source = mkOutOfStoreSymlink "${configDir}/dolphinrc";
|
||||||
"dolphinrc".source = symlink "${configDir}/dolphinrc";
|
"kdeglobals".source = mkOutOfStoreSymlink "${configDir}/kdeglobals";
|
||||||
"kdeglobals".source = symlink "${configDir}/kdeglobals";
|
"kiorc".source = mkOutOfStoreSymlink "${configDir}/kiorc";
|
||||||
"kiorc".source = symlink "${configDir}/kiorc";
|
"mimeapps.list".source = mkOutOfStoreSymlink "${configDir}/mimeapps.list";
|
||||||
"mimeapps.list".source = symlink "${configDir}/mimeapps.list";
|
|
||||||
|
|
||||||
"satty/config.toml".source = writeTOML "satty.toml" {
|
"satty/config.toml".source = writeTOML "satty.toml" {
|
||||||
general = {
|
general = {
|
||||||
early-exit = true;
|
early-exit = true;
|
||||||
copy-command = "wl-copy";
|
copy-command = "wl-copy";
|
||||||
initial-tool = "crop";
|
initial-tool = "crop";
|
||||||
output-filename = "${config.home.homeDirectory}/Pictures/Screenshots/screen-%d-%m-%Y_%H:%M:%S.png";
|
output-filename = "${config.home.homeDirectory}/Pictures/Screenshots/screen-%d-%m-%Y_%H:%M:%S.png";
|
||||||
};
|
|
||||||
|
|
||||||
font = {
|
|
||||||
family = "Ubuntu Mono";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
font.family = "Ubuntu Mono";
|
||||||
};
|
};
|
||||||
|
|
||||||
desktopEntries =
|
|
||||||
(mkIf nvidiaEnable {
|
|
||||||
"com.github.iwalton3.jellyfin-media-player" = {
|
|
||||||
name = "Jellyfin Media Player";
|
|
||||||
comment = "Desktop client for Jellyfin";
|
|
||||||
exec = "jellyfinmediaplayer --platform xcb";
|
|
||||||
icon = "com.github.iwalton3.jellyfin-media-player";
|
|
||||||
terminal = false;
|
|
||||||
type = "Application";
|
|
||||||
categories = ["AudioVideo" "Video" "Player" "TV"];
|
|
||||||
settings = {
|
|
||||||
Version = "1.0";
|
|
||||||
StartupWMClass = "jellyfin-media-player";
|
|
||||||
};
|
|
||||||
actions = {
|
|
||||||
"DesktopF" = {
|
|
||||||
name = "Desktop [Fullscreen]";
|
|
||||||
exec = "jellyfinmediaplayer --fullscreen --desktop --platform xcb";
|
|
||||||
};
|
|
||||||
"DesktopW" = {
|
|
||||||
name = "Desktop [Windowed]";
|
|
||||||
exec = "jellyfinmediaplayer --windowed --desktop --platform xcb";
|
|
||||||
};
|
|
||||||
"TVF" = {
|
|
||||||
name = "TV [Fullscreen]";
|
|
||||||
exec = "jellyfinmediaplayer --fullscreen --tv --platform xcb";
|
|
||||||
};
|
|
||||||
"TVW" = {
|
|
||||||
name = "TV [Windowed]";
|
|
||||||
exec = "jellyfinmediaplayer --windowed --tv --platform xcb";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
})
|
|
||||||
// {
|
|
||||||
gparted = {
|
|
||||||
name = "GParted";
|
|
||||||
genericName = "Partition Editor";
|
|
||||||
comment = "Create, reorganize, and delete partitions";
|
|
||||||
exec = "Gparted";
|
|
||||||
icon = "gparted";
|
|
||||||
terminal = false;
|
|
||||||
type = "Application";
|
|
||||||
categories = ["GNOME" "System" "Filesystem"];
|
|
||||||
startupNotify = true;
|
|
||||||
settings = {
|
|
||||||
Keywords = "Partition";
|
|
||||||
X-GNOME-FullName = "GParted Partition Editor";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
@ -149,19 +92,39 @@ in {
|
||||||
nextcloud-client
|
nextcloud-client
|
||||||
prismlauncher
|
prismlauncher
|
||||||
|
|
||||||
(writeShellScriptBin "Gparted" ''
|
/*
|
||||||
(
|
Discord themes for Vencord
|
||||||
sleep 1.5
|
https://markchan0225.github.io/RoundedDiscord/RoundedDiscord.theme.css
|
||||||
while killall -r -0 ksshaskpass > /dev/null 2>&1
|
https://raw.githubusercontent.com/dracula/BetterDiscord/master/Dracula_Official.theme.css
|
||||||
do
|
*/
|
||||||
sleep 0.1
|
(discord.override {withVencord = true;})
|
||||||
if [[ $(hyprctl activewindow | grep Ksshaskpass) == "" ]]; then
|
|
||||||
killall -r ksshaskpass
|
(symlinkJoin {
|
||||||
fi
|
name = "gparted";
|
||||||
done
|
paths = [gparted];
|
||||||
) &
|
buildInputs = [makeWrapper];
|
||||||
exec env SUDO_ASKPASS=${plasma5Packages.ksshaskpass}/bin/${plasma5Packages.ksshaskpass.pname} sudo -k -EA "${gparted}/bin/${gparted.pname}" "$@"
|
postBuild = let
|
||||||
'')
|
newWrapper = writeShellScriptBin "Gparted" ''
|
||||||
|
(
|
||||||
|
sleep 1.5
|
||||||
|
while killall -r -0 ksshaskpass > /dev/null 2>&1
|
||||||
|
do
|
||||||
|
sleep 0.1
|
||||||
|
if [[ $(hyprctl activewindow | grep Ksshaskpass) == "" ]]; then
|
||||||
|
killall -r ksshaskpass
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
) &
|
||||||
|
exec env SUDO_ASKPASS="${libsForQt5.ksshaskpass}/bin/ksshaskpass" sudo -k -EA "${getExe gparted}" "$@"
|
||||||
|
'';
|
||||||
|
in ''
|
||||||
|
mkdir $out/.wrapped
|
||||||
|
mv $out/bin/gparted $out/.wrapped
|
||||||
|
cp ${getExe newWrapper} $out/bin/gparted
|
||||||
|
|
||||||
|
sed -i "s#Exec.*#Exec=$out/bin/gparted %f#" $out/share/applications/gparted.desktop
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
|
||||||
# tools
|
# tools
|
||||||
wl-color-picker
|
wl-color-picker
|
||||||
|
@ -172,31 +135,11 @@ in {
|
||||||
satty
|
satty
|
||||||
])
|
])
|
||||||
++ [
|
++ [
|
||||||
jellyfin-flake.packages.${pkgs.system}.jellyfin-media-player
|
(jellyfin-flake
|
||||||
|
.packages
|
||||||
/*
|
.${pkgs.system}
|
||||||
Discord themes for Vencord
|
.jellyfin-media-player
|
||||||
https://markchan0225.github.io/RoundedDiscord/RoundedDiscord.theme.css
|
.override {isNvidiaWayland = isNvidia;})
|
||||||
https://raw.githubusercontent.com/dracula/BetterDiscord/master/Dracula_Official.theme.css
|
|
||||||
*/
|
|
||||||
(pkgs.symlinkJoin {
|
|
||||||
name = "discord";
|
|
||||||
paths = [
|
|
||||||
(pkgs.discord.override {
|
|
||||||
withOpenASAR = true;
|
|
||||||
withVencord = true;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
buildInputs = [pkgs.makeWrapper];
|
|
||||||
postBuild = ''
|
|
||||||
wrapProgram $out/bin/Discord ${optionalString config.nvidia.enable
|
|
||||||
''--prefix LD_LIBRARY_PATH : "${makeLibraryPath [
|
|
||||||
pkgs.addOpenGLRunpath.driverLink
|
|
||||||
pkgs.libglvnd
|
|
||||||
]}"''} \
|
|
||||||
--add-flags "--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer --ozone-platform=wayland"
|
|
||||||
'';
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
|
|
Loading…
Reference in a new issue