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 56 additions and 114 deletions
|
@ -752,11 +752,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1724602892,
|
||||
"narHash": "sha256-wUtxQ8h0HE0MDJ85XjoIACJ9l+KPRH/IOfPWbvpJi5Q=",
|
||||
"lastModified": 1725044152,
|
||||
"narHash": "sha256-x2e8Zva0vUIb43dqGSjkft1TkvMpJzxoIbDOjwX5YSU=",
|
||||
"owner": "matt1432",
|
||||
"repo": "nixos-jellyfin",
|
||||
"rev": "f0ab63b59da2b58ccfedd5471f7aef5f64749485",
|
||||
"rev": "949818a68286668c7e0f8b3cbc82f6daa26c1c7b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -106,7 +106,6 @@ in {
|
|||
]
|
||||
++ (optionals config.nvidia.enable [
|
||||
"LIBVA_DRIVER_NAME, nvidia"
|
||||
"NVD_BACKEND, direct"
|
||||
"XDG_SESSION_TYPE, wayland"
|
||||
"GBM_BACKEND, nvidia-drm"
|
||||
"__GLX_VENDOR_LIBRARY_NAME, nvidia"
|
||||
|
|
|
@ -9,12 +9,12 @@ in {
|
|||
imports = [./dolphin.nix];
|
||||
|
||||
config = let
|
||||
inherit (lib) getExe makeLibraryPath mkIf optionals optionalString;
|
||||
inherit (lib) getExe optionals;
|
||||
inherit (pkgs.writers) writeTOML;
|
||||
|
||||
flakeDir = config.environment.variables.FLAKE;
|
||||
cfg = config.roles.desktop;
|
||||
nvidiaEnable = config.nvidia.enable;
|
||||
isNvidia = config.nvidia.enable;
|
||||
|
||||
restartTailscale = pkgs.writeShellScriptBin "restartTailscale" ''
|
||||
sudo ${pkgs.systemd}/bin/systemctl restart tailscaled.service
|
||||
|
@ -42,81 +42,24 @@ in {
|
|||
(import ../home/obs.nix self)
|
||||
|
||||
({config, ...}: let
|
||||
symlink = config.lib.file.mkOutOfStoreSymlink;
|
||||
inherit (config.lib.file) mkOutOfStoreSymlink;
|
||||
configDir = "${flakeDir}/nixosModules/desktop/environment/config";
|
||||
in {
|
||||
xdg = {
|
||||
configFile = {
|
||||
"dolphinrc".source = symlink "${configDir}/dolphinrc";
|
||||
"kdeglobals".source = symlink "${configDir}/kdeglobals";
|
||||
"kiorc".source = symlink "${configDir}/kiorc";
|
||||
"mimeapps.list".source = symlink "${configDir}/mimeapps.list";
|
||||
xdg.configFile = {
|
||||
"dolphinrc".source = mkOutOfStoreSymlink "${configDir}/dolphinrc";
|
||||
"kdeglobals".source = mkOutOfStoreSymlink "${configDir}/kdeglobals";
|
||||
"kiorc".source = mkOutOfStoreSymlink "${configDir}/kiorc";
|
||||
"mimeapps.list".source = mkOutOfStoreSymlink "${configDir}/mimeapps.list";
|
||||
|
||||
"satty/config.toml".source = writeTOML "satty.toml" {
|
||||
general = {
|
||||
early-exit = true;
|
||||
copy-command = "wl-copy";
|
||||
initial-tool = "crop";
|
||||
output-filename = "${config.home.homeDirectory}/Pictures/Screenshots/screen-%d-%m-%Y_%H:%M:%S.png";
|
||||
};
|
||||
|
||||
font = {
|
||||
family = "Ubuntu Mono";
|
||||
};
|
||||
"satty/config.toml".source = writeTOML "satty.toml" {
|
||||
general = {
|
||||
early-exit = true;
|
||||
copy-command = "wl-copy";
|
||||
initial-tool = "crop";
|
||||
output-filename = "${config.home.homeDirectory}/Pictures/Screenshots/screen-%d-%m-%Y_%H:%M:%S.png";
|
||||
};
|
||||
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
|
||||
prismlauncher
|
||||
|
||||
(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=${plasma5Packages.ksshaskpass}/bin/${plasma5Packages.ksshaskpass.pname} sudo -k -EA "${gparted}/bin/${gparted.pname}" "$@"
|
||||
'')
|
||||
/*
|
||||
Discord themes for Vencord
|
||||
https://markchan0225.github.io/RoundedDiscord/RoundedDiscord.theme.css
|
||||
https://raw.githubusercontent.com/dracula/BetterDiscord/master/Dracula_Official.theme.css
|
||||
*/
|
||||
(discord.override {withVencord = true;})
|
||||
|
||||
(symlinkJoin {
|
||||
name = "gparted";
|
||||
paths = [gparted];
|
||||
buildInputs = [makeWrapper];
|
||||
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
|
||||
wl-color-picker
|
||||
|
@ -172,31 +135,11 @@ in {
|
|||
satty
|
||||
])
|
||||
++ [
|
||||
jellyfin-flake.packages.${pkgs.system}.jellyfin-media-player
|
||||
|
||||
/*
|
||||
Discord themes for Vencord
|
||||
https://markchan0225.github.io/RoundedDiscord/RoundedDiscord.theme.css
|
||||
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"
|
||||
'';
|
||||
})
|
||||
(jellyfin-flake
|
||||
.packages
|
||||
.${pkgs.system}
|
||||
.jellyfin-media-player
|
||||
.override {isNvidiaWayland = isNvidia;})
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
|
|
Loading…
Reference in a new issue