feat(hypr): unify home/packages to desktop module
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-06-28 13:37:10 -04:00
parent 261f1f0f34
commit e11914aa08
7 changed files with 88 additions and 97 deletions

View file

@ -52,8 +52,6 @@ in {
home-manager.users.${mainUser} = { home-manager.users.${mainUser} = {
imports = [ imports = [
../../home/firefox ../../home/firefox
./home/packages.nix
]; ];
# No touchy # No touchy

View file

@ -1,33 +0,0 @@
{...}: {
xdg.desktopEntries."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";
};
};
};
}

View file

@ -51,8 +51,6 @@ in {
home-manager.users.${mainUser} = { home-manager.users.${mainUser} = {
imports = [ imports = [
../../home/firefox ../../home/firefox
./home/packages.nix
]; ];
# No touchy # No touchy

View file

@ -1,41 +0,0 @@
{pkgs, ...}: {
home.packages =
(with pkgs.python311Packages; [
python
pyclip # For Waydroid?
])
++ (with pkgs; [
# Misc CLI
acpi
(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}" "$@"
'')
]);
xdg.desktopEntries.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";
};
};
}

View file

@ -119,9 +119,10 @@
packages = with pkgs; [ packages = with pkgs; [
alejandra alejandra
git git
nix-output-monitor
(writeShellScriptBin "mkIso" (lib.concatStrings [ (writeShellScriptBin "mkIso" (lib.concatStrings [
"nix build $(realpath /etc/nixos)#nixosConfigurations." "nom build $(realpath /etc/nixos)#nixosConfigurations."
"live-image.config.system.build.isoImage" "live-image.config.system.build.isoImage"
])) ]))
]; ];

View file

@ -4,7 +4,7 @@ TerminalApplication=foot
[KFileDialog Settings] [KFileDialog Settings]
Allow Expansion=false Allow Expansion=false
Automatically select filename extension=true Automatically select filename extension=true
Breadcrumb Navigation=true Breadcrumb Navigation=false
Decoration position=2 Decoration position=2
LocationCombo Completionmode=5 LocationCombo Completionmode=5
PathCombo Completionmode=5 PathCombo Completionmode=5

View file

@ -4,14 +4,14 @@
lib, lib,
pkgs, pkgs,
self, self,
Vencord-src,
... ...
}: let }: let
inherit (lib) makeLibraryPath optionalString; inherit (lib) makeLibraryPath mkIf optionalString;
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;
in { in {
imports = [./dolphin.nix]; imports = [./dolphin.nix];
@ -27,7 +27,8 @@ in {
symlink = config.lib.file.mkOutOfStoreSymlink; symlink = config.lib.file.mkOutOfStoreSymlink;
configDir = "${flakeDir}/modules/desktop/desktop-environment/config"; configDir = "${flakeDir}/modules/desktop/desktop-environment/config";
in { in {
xdg.configFile = { xdg = {
configFile = {
"dolphinrc".source = symlink "${configDir}/dolphinrc"; "dolphinrc".source = symlink "${configDir}/dolphinrc";
"kdeglobals".source = symlink "${configDir}/kdeglobals"; "kdeglobals".source = symlink "${configDir}/kdeglobals";
"kiorc".source = symlink "${configDir}/kiorc"; "kiorc".source = symlink "${configDir}/kiorc";
@ -47,6 +48,59 @@ in {
}; };
}; };
}; };
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";
};
};
};
};
}) })
]; ];
@ -77,6 +131,20 @@ in {
nextcloud-client nextcloud-client
prismlauncher 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}" "$@"
'')
# tools # tools
wl-color-picker wl-color-picker
wl-clipboard wl-clipboard