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 = [ imports = [
../hardware/uinput.nix ../hardware/uinput.nix
]; ];
@ -12,7 +32,7 @@
services.xremap = { services.xremap = {
enable = true; enable = true;
withHypr = true; withGnome = true;
# modmap: single key # modmap: single key
serviceMode = "user"; serviceMode = "user";
userName = "js0ny"; userName = "js0ny";
@ -21,13 +41,7 @@
{ {
name = "Global"; name = "Global";
device = { device = {
not = [ not = nuphyAir75V2Inputs;
### 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"
];
}; };
remap = { remap = {
"KEY_CAPSLOCK" = { "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 = [ keymap = [
# { {
# name = "IM Navigator - Alt-Up/Down"; name = "IM Navigator - Alt-Up/Down";
# application = { application = {
# only = [ only = [
# "org.telegram.desktop" "wechat"
# "telegram-desktop" ];
# "io.github.kukuruzka165.materialgram" };
# "materialgram" remap = {
# "com.ayugram.desktop" "M-j" = "M-down";
# "wechat" "M-k" = "M-up";
# ]; };
# }; }
# remap = {
# "M-j" = "M-down";
# "M-k" = "M-up";
# };
# }
{ {
name = "IM Navigator - Ctrl-Up/Down"; name = "IM Navigator - Ctrl-Up/Down";
application = { application = {
only = ["qq"]; only = ["QQ"];
}; };
remap = { remap = {
"M-j" = "C-down"; "M-j" = "C-down";
@ -69,7 +90,7 @@
{ {
name = "Zotero PDF Navigator"; name = "Zotero PDF Navigator";
application = { application = {
only = ["zotero"]; only = ["Zotero"];
}; };
remap = { remap = {
"M-j" = "KEY_PAGEDOWN"; "M-j" = "KEY_PAGEDOWN";

View file

@ -4,7 +4,6 @@
config, config,
... ...
}: let }: let
# FIXME: This will block the desktop files
mkFcitxIM = builtins.map ( mkFcitxIM = builtins.map (
p: p:
lib.hiPrio ( lib.hiPrio (
@ -138,12 +137,6 @@ in {
NIXOS_OZONE_WL = 1; 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 # TODO: This is a workaround since upstram did not implement p.name for ticktick
# xdg.desktopEntries."ticktick" = { # xdg.desktopEntries."ticktick" = {
# name = "TickTick"; # name = "TickTick";

View file

@ -14,6 +14,7 @@
"text/x-patch" # .patch .diff "text/x-patch" # .patch .diff
"text/x-devicetree-source" # .dts "text/x-devicetree-source" # .dts
"text/x-nix" # .nix (custom defined below) "text/x-nix" # .nix (custom defined below)
"text/x-pdx-descriptor" # .mod (custom defined below)
] ]
++ [ ++ [
"text/csv" "text/csv"
@ -114,5 +115,21 @@ in {
</mime-type> </mime-type>
</mime-info> </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}/Atelier Atelier"
"file:///home/${username}/Downloads Downloads" "file:///home/${username}/Downloads Downloads"
]; ];
xdg.configFile."gtk-3.0/bookmarks".force = true;
xdg.terminal-exec = { xdg.terminal-exec = {
enable = true; enable = true;