This commit is contained in:
commit
95a533c876
451 changed files with 18255 additions and 0 deletions
34
modules/home/hyprland/applications/qbittorrent/default.nix
Normal file
34
modules/home/hyprland/applications/qbittorrent/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.wayland.windowManager.hyprland;
|
||||
app = cfg.applications.torrent-client.default;
|
||||
desktop = "org.qbittorrent.qBittorrent.desktop";
|
||||
mimeTypes = [
|
||||
"application/x-bittorrent"
|
||||
"x-scheme-handler/magnet"
|
||||
];
|
||||
associations =
|
||||
let
|
||||
genMimeAssociations = import ../genMimeAssociations.nix;
|
||||
in
|
||||
genMimeAssociations desktop mimeTypes;
|
||||
|
||||
inherit (lib) mkIf;
|
||||
in
|
||||
{
|
||||
config = mkIf (cfg.enable && app == "qbittorrent") {
|
||||
home.packages = [ pkgs.qbittorrent ];
|
||||
# TODO: automatically apply dark theme
|
||||
|
||||
xdg.mimeApps = {
|
||||
defaultApplications = associations;
|
||||
associations.added = associations;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue