update mimedb

This commit is contained in:
js0ny 2025-12-24 06:16:26 +00:00
parent ec59899b2e
commit ae7c310c17
4 changed files with 67 additions and 35 deletions

View file

@ -1,4 +1,24 @@
{...}: {
{...}: let
_nuphyAir75V2Inputs = [
"usb-Nordic_Semiconductor_NuPhy_Air75_V2_Dongle-event-kbd"
"usb-Nordic_Semiconductor_NuPhy_Air75_V2_Dongle-hidraw"
"usb-Nordic_Semiconductor_NuPhy_Air75_V2_Dongle-if01-event-kbd"
"usb-Nordic_Semiconductor_NuPhy_Air75_V2_Dongle-if01-event-mouse"
"usb-Nordic_Semiconductor_NuPhy_Air75_V2_Dongle-if01-hidraw"
"usb-Nordic_Semiconductor_NuPhy_Air75_V2_Dongle-if01-mouse"
"usb-Nordic_Semiconductor_NuPhy_Air75_V2_Dongle-if02-hidraw"
"usb-NuPhy_NuPhy_Air75_V2-event-if01"
"usb-NuPhy_NuPhy_Air75_V2-event-kbd"
"usb-NuPhy_NuPhy_Air75_V2-hidraw"
"usb-NuPhy_NuPhy_Air75_V2-if01-event-joystick"
"usb-NuPhy_NuPhy_Air75_V2-if01-event-kbd"
"usb-NuPhy_NuPhy_Air75_V2-if01-event-mouse"
"usb-NuPhy_NuPhy_Air75_V2-if01-hidraw"
"usb-NuPhy_NuPhy_Air75_V2-if01-mouse"
"usb-NuPhy_NuPhy_Air75_V2-if02-hidraw"
];
nuphyAir75V2Inputs = map (name: "/dev/input/by-id/" + name) _nuphyAir75V2Inputs;
in {
imports = [
../hardware/uinput.nix
];
@ -12,7 +32,7 @@
services.xremap = {
enable = true;
withHypr = true;
withGnome = true;
# modmap: single key
serviceMode = "user";
userName = "js0ny";
@ -21,13 +41,7 @@
{
name = "Global";
device = {
not = [
### QMK Keyboards
# Nuphy Air 75 V2
"/dev/input/by-id/usb-Nordic_Semiconductor_NuPhy_Air75_V2_Dongle-if01-event-kbd"
"/dev/input/by-id/usb-Nordic_Semiconductor_NuPhy_Air75_V2_Dongle-event-kbd"
"/dev/input/by-id/usb-Nordic_Semiconductor_NuPhy_Air75_V2_Dongle-if01-event-mouse"
];
not = nuphyAir75V2Inputs;
};
remap = {
"KEY_CAPSLOCK" = {
@ -37,29 +51,36 @@
};
};
}
{
# Mouse Key code:
# * BTN_EXTRA -> Forward button
# * BTN_SIDE -> Back button
name = "Mouse";
device = {
not = nuphyAir75V2Inputs;
};
remap = {
"BTN_EXTRA" = "KEY_ENTER";
};
}
];
keymap = [
# {
# name = "IM Navigator - Alt-Up/Down";
# application = {
# only = [
# "org.telegram.desktop"
# "telegram-desktop"
# "io.github.kukuruzka165.materialgram"
# "materialgram"
# "com.ayugram.desktop"
# "wechat"
# ];
# };
# remap = {
# "M-j" = "M-down";
# "M-k" = "M-up";
# };
# }
{
name = "IM Navigator - Alt-Up/Down";
application = {
only = [
"wechat"
];
};
remap = {
"M-j" = "M-down";
"M-k" = "M-up";
};
}
{
name = "IM Navigator - Ctrl-Up/Down";
application = {
only = ["qq"];
only = ["QQ"];
};
remap = {
"M-j" = "C-down";
@ -69,7 +90,7 @@
{
name = "Zotero PDF Navigator";
application = {
only = ["zotero"];
only = ["Zotero"];
};
remap = {
"M-j" = "KEY_PAGEDOWN";

View file

@ -4,7 +4,6 @@
config,
...
}: let
# FIXME: This will block the desktop files
mkFcitxIM = builtins.map (
p:
lib.hiPrio (
@ -138,12 +137,6 @@ in {
NIXOS_OZONE_WL = 1;
};
# TODO: This is a dependency of `feishin` (EOL)
# Once the new version is published, delete this
nixpkgs.config.permittedInsecurePackages = [
"electron-36.9.5"
];
# TODO: This is a workaround since upstram did not implement p.name for ticktick
# xdg.desktopEntries."ticktick" = {
# name = "TickTick";

View file

@ -14,6 +14,7 @@
"text/x-patch" # .patch .diff
"text/x-devicetree-source" # .dts
"text/x-nix" # .nix (custom defined below)
"text/x-pdx-descriptor" # .mod (custom defined below)
]
++ [
"text/csv"
@ -114,5 +115,21 @@ in {
</mime-type>
</mime-info>
'';
# Mod descriptor file for Paradox games
"mime/packages/pdx-mod-descriptor.xml".text = ''
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="text/x-pdx-descriptor">
<comment>Paradox Mod Descriptor</comment>
<sub-class-of type="text/plain"/>
<glob pattern="*.mod" weight="80"/> <magic priority="80">
<match value="name=" type="string" offset="0:200"/>
<match value="tags=" type="string" offset="0:200"/>
<match value="version=" type="string" offset="0:200"/>
<match value="supported_version=" type="string" offset="0:200"/>
</magic>
</mime-type>
</mime-info>
'';
};
}

View file

@ -142,6 +142,7 @@ in {
"file:///home/${username}/Atelier Atelier"
"file:///home/${username}/Downloads Downloads"
];
xdg.configFile."gtk-3.0/bookmarks".force = true;
xdg.terminal-exec = {
enable = true;