fix mime
This commit is contained in:
parent
9656e48df5
commit
070df903b5
@ -19,6 +19,7 @@ in
|
|||||||
xcb-util-cursor
|
xcb-util-cursor
|
||||||
qt6ct
|
qt6ct
|
||||||
kdePackages.dolphin
|
kdePackages.dolphin
|
||||||
|
qtwayland
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.pathsToLink = [
|
environment.pathsToLink = [
|
||||||
|
@ -52,6 +52,11 @@ in
|
|||||||
nomacs
|
nomacs
|
||||||
gparted
|
gparted
|
||||||
zathura
|
zathura
|
||||||
|
imhex
|
||||||
|
libreoffice-qt
|
||||||
|
filezilla
|
||||||
|
obsidian
|
||||||
|
thunderbird
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
@ -118,6 +123,7 @@ in
|
|||||||
matplotlib
|
matplotlib
|
||||||
numpy
|
numpy
|
||||||
scipy
|
scipy
|
||||||
|
pygobject3
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -18,6 +18,10 @@ in
|
|||||||
nix-search-cli
|
nix-search-cli
|
||||||
];
|
];
|
||||||
|
|
||||||
|
environment.sessionVariables = {
|
||||||
|
NIXPKGS_ALLOW_UNFREE = "1";
|
||||||
|
};
|
||||||
|
|
||||||
grimmShared.tooling.nvim.plugins = with pkgs.vimPlugins; [
|
grimmShared.tooling.nvim.plugins = with pkgs.vimPlugins; [
|
||||||
vim-nix
|
vim-nix
|
||||||
];
|
];
|
||||||
|
6
common/xdg/default.nix
Normal file
6
common/xdg/default.nix
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./portals.nix
|
||||||
|
./mime.nix
|
||||||
|
];
|
||||||
|
}
|
76
common/xdg/mime.nix
Normal file
76
common/xdg/mime.nix
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
{ pkgs, config, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.grimmShared;
|
||||||
|
browsers = [
|
||||||
|
"firefox-beta.desktop"
|
||||||
|
"firefox.desktop"
|
||||||
|
];
|
||||||
|
text_editors = [
|
||||||
|
"nvim.desktop"
|
||||||
|
"geany.desktop"
|
||||||
|
"imhex.desktop"
|
||||||
|
];
|
||||||
|
image_viewers = [
|
||||||
|
"org.nomacs.ImageLounge.desktop"
|
||||||
|
"org.kde.krita.desktop"
|
||||||
|
"draw.desktop"
|
||||||
|
];
|
||||||
|
audio_players = [
|
||||||
|
"vlc.desktop"
|
||||||
|
];
|
||||||
|
video_viewers = [
|
||||||
|
"vlc.desktop"
|
||||||
|
];
|
||||||
|
document_viewers = [
|
||||||
|
"org.pwmt.zathura-pdf-mupdf.desktop"
|
||||||
|
"com.github.jeromerobert.pdfarranger.desktop"
|
||||||
|
] ++ browsers;
|
||||||
|
cad = [
|
||||||
|
"org.freecadweb.FreeCAD.desktop"
|
||||||
|
"PrusaSlicer.desktop"
|
||||||
|
"openscad.desktop"
|
||||||
|
];
|
||||||
|
tex_editors = [ ] ++ text_editors;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = with cfg; lib.mkIf (enable && portals && graphical) {
|
||||||
|
xdg.mime.enable = true;
|
||||||
|
xdg.mime.addedAssociations = {
|
||||||
|
"application/java-vm" = [
|
||||||
|
"idea-community.desktop"
|
||||||
|
"imhex.desktop"
|
||||||
|
];
|
||||||
|
"application/json" = text_editors ++ [
|
||||||
|
"firefox-beta.desktop"
|
||||||
|
];
|
||||||
|
"application/mp4" = video_viewers;
|
||||||
|
"application/ogg" = audio_players;
|
||||||
|
"application/octet-stream" = "imhex.desktop";
|
||||||
|
"application/pdf" = document_viewers;
|
||||||
|
"application/rss+xml" = text_editors;
|
||||||
|
"application/x-chess-pgn" = [ ] ++ text_editors; # fixme
|
||||||
|
"application/x-krita" = "org.kde.krita.desktop";
|
||||||
|
"application/x-latex" = tex_editors;
|
||||||
|
"application/x-tex" = tex_editors;
|
||||||
|
"application/x-texinfo" = tex_editors;
|
||||||
|
"application/xml" = text_editors;
|
||||||
|
"image/svg+xml" = image_viewers ++ browsers ++ text_editors;
|
||||||
|
"image/*" = image_viewers;
|
||||||
|
"image/vnd.dwg" = cad;
|
||||||
|
"model/*" = cad;
|
||||||
|
"gcode" = [
|
||||||
|
"PrusaSlicer.desktop"
|
||||||
|
];
|
||||||
|
"audio/*" = audio_players;
|
||||||
|
"text/*" = text_editors;
|
||||||
|
"text/plain" = text_editors;
|
||||||
|
"text/markdown" = [ "obsidian.desktop" ] ++ text_editors;
|
||||||
|
"text/csv" = [ "calc.desktop" ] ++ text_editors;
|
||||||
|
"text/html" = browsers ++ text_editors;
|
||||||
|
"text/x-python" = [ "pycharm-community.desktop" ] ++ text_editors;
|
||||||
|
"text/x-c" = [ "clion.desktop" ] ++ text_editors;
|
||||||
|
"text/x-java-source" = [ "idea-community.desktop" ] ++ text_editors;
|
||||||
|
"video/*" = video_viewers;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -5,9 +5,11 @@ in
|
|||||||
{
|
{
|
||||||
config = with cfg; lib.mkIf (enable && portals) {
|
config = with cfg; lib.mkIf (enable && portals) {
|
||||||
xdg.icons.enable = true;
|
xdg.icons.enable = true;
|
||||||
|
xdg.sounds.enable = lib.mkIf sound.enable true;
|
||||||
|
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
xdgOpenUsePortal = true;
|
||||||
extraPortals = with pkgs; [
|
extraPortals = with pkgs; [
|
||||||
xdg-desktop-portal-wlr
|
xdg-desktop-portal-wlr
|
||||||
xdg-desktop-portal-kde
|
xdg-desktop-portal-kde
|
@ -15,7 +15,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Enable flatpaks
|
# Enable flatpaks
|
||||||
services.flatpak.enable = true;
|
# services.flatpak.enable = true;
|
||||||
|
|
||||||
grimmShared = {
|
grimmShared = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -25,6 +25,7 @@
|
|||||||
network = true;
|
network = true;
|
||||||
tooling = {
|
tooling = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
pass = true;
|
||||||
lilypond = true;
|
lilypond = true;
|
||||||
};
|
};
|
||||||
sound = {
|
sound = {
|
||||||
@ -60,14 +61,6 @@
|
|||||||
mode = "777";
|
mode = "777";
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.sessionVariables = {
|
|
||||||
NIXPKGS_ALLOW_UNFREE = "1";
|
|
||||||
MOZ_ENABLE_WAYLAND = "1";
|
|
||||||
# QT_QPA_PLATFORM="wayland-egl";
|
|
||||||
OCI_CLI_RC_FILE = "/home/grimmauld/.oci/config";
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.tmp.cleanOnBoot = true;
|
boot.tmp.cleanOnBoot = true;
|
||||||
|
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ with lib;
|
|||||||
imports = [
|
imports = [
|
||||||
./common/localisation.nix
|
./common/localisation.nix
|
||||||
./common/printing.nix
|
./common/printing.nix
|
||||||
./common/portals.nix
|
./common/xdg
|
||||||
./common/network
|
./common/network
|
||||||
./common/tooling
|
./common/tooling
|
||||||
./common/sound
|
./common/sound
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
freecad
|
freecad
|
||||||
openscad
|
openscad
|
||||||
vlc
|
vlc
|
||||||
|
arena
|
||||||
stable.jetbrains.clion
|
stable.jetbrains.clion
|
||||||
jetbrains.idea-community
|
jetbrains.idea-community
|
||||||
jetbrains.pycharm-community
|
jetbrains.pycharm-community
|
||||||
|
Loading…
Reference in New Issue
Block a user