nixos-configs/modules/hyprland/packages.nix

165 lines
4.6 KiB
Nix
Raw Normal View History

{
config,
2024-06-08 01:43:43 -04:00
jellyfin-flake,
lib,
pkgs,
self,
...
}: let
2024-03-03 17:34:21 -05:00
inherit (lib) makeLibraryPath optionalString;
2024-05-01 10:21:28 -04:00
inherit (pkgs.writers) writeTOML;
2024-05-05 22:43:03 -04:00
inherit (config.vars) mainUser;
flakeDir = config.environment.variables.FLAKE;
in {
imports = [../dolphin.nix];
programs.kdeconnect.enable = true;
home-manager.users.${mainUser} = {
imports = [
../../home/foot.nix
../../home/mpv
../../home/obs.nix
({config, ...}: let
symlink = config.lib.file.mkOutOfStoreSymlink;
configDir = "${flakeDir}/modules/hyprland/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";
"neofetch".source = symlink "${configDir}/neofetch";
2024-05-01 10:21:28 -04:00
"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";
};
};
};
})
];
programs.sioyek = {
enable = true;
config = {
startup_commands = "toggle_custom_color";
ui_font = "JetBrainsMono Nerd Font Mono Regular";
font_size = "24";
2024-06-10 22:57:20 -04:00
source = toString self.legacyPackages.${pkgs.system}.dracula.sioyek;
};
};
2024-05-05 22:43:03 -04:00
home.packages =
(with pkgs; [
# School
xournalpp
virt-manager
libreoffice-fresh # TODO: declarative conf?
hunspell
hunspellDicts.en_CA
# Apps
protonmail-desktop
2024-05-05 22:43:03 -04:00
spotifywm
photoqt
nextcloud-client
prismlauncher
# tools
wl-color-picker
wl-clipboard
cliphist
grim-hyprland
slurp
satty
])
++ [
2024-06-08 01:43:43 -04:00
jellyfin-flake.packages.${pkgs.system}.jellyfin-media-player
2024-05-05 22:43:03 -04:00
/*
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;
# FIXME: remove this when vencord is up to date
vencord = pkgs.vencord.overrideAttrs {
src = pkgs.fetchFromGitHub {
owner = "Vendicated";
repo = "Vencord";
rev = "e9e789be7093e8b025f606cde69b3d89760c9380";
hash = "sha256-kBMyxV9XlrKEZ5whV81vA4EAZiYRpgIgal7fY5KGoVs=";
};
};
2024-05-05 22:43:03 -04:00
})
];
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 = {
settings = {
exec-once = [
"${config.programs.kdeconnect.package}/libexec/kdeconnectd"
"kdeconnect-indicator"
"wl-paste --watch cliphist store"
"sleep 3; nextcloud --background"
"[workspace special:protonmail silent] proton-mail"
"[workspace special:spot silent] spotify"
];
windowrule = [
"tile,^(libreoffice)$"
"float,^(org.gnome.Calculator)$"
2024-05-01 10:21:28 -04:00
"float,^(com.gabm.satty)$"
"size 1000 700,^(com.gabm.satty)$"
"float,^(com.nextcloud.desktopclient.nextcloud)$"
"move cursor -15 -10,^(com.nextcloud.desktopclient.nextcloud)$"
"size 400 581,^(com.nextcloud.desktopclient.nextcloud)$"
"workspace special:protonmail silent,^(Proton Mail)$"
"workspace special:spot silent,^(Spotify)$"
];
bind = [
"$mainMod, Q, exec, foot"
"$mainMod SHIFT, C, exec, wl-color-picker"
"$mainMod, P, togglespecialworkspace, protonmail"
"$mainMod, S, togglespecialworkspace, spot"
];
};
};
};
}