feat(emacs): Mark for application/pdf
This commit is contained in:
20
modules/home/users/crumb/default-applications.nix
Normal file
20
modules/home/users/crumb/default-applications.nix
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let cfg = config.sydnix.users.crumb.default-applications;
|
||||||
|
in {
|
||||||
|
options.sydnix.users.crumb.default-applications = {
|
||||||
|
enable = lib.mkEnableOption "Default mime-type applications";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
xdg.mimeApps = {
|
||||||
|
enable = true;
|
||||||
|
defaultApplications = {
|
||||||
|
"application/pdf" = [
|
||||||
|
"emacsclient.desktop"
|
||||||
|
"emacs.desktop"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -152,5 +152,13 @@ in {
|
|||||||
ec = "emacsclient";
|
ec = "emacsclient";
|
||||||
em = "emacs";
|
em = "emacs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Mark Emacs as a valid PDF reader.
|
||||||
|
xdg.mimeApps.associations.added = {
|
||||||
|
"application/pdf" = [
|
||||||
|
"emacsclient.desktop"
|
||||||
|
"emacs.desktop"
|
||||||
|
];
|
||||||
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
# Personal configurations.
|
# Personal configurations.
|
||||||
users.crumb = {
|
users.crumb = {
|
||||||
age.enable = true;
|
age.enable = true;
|
||||||
|
default-applications.enable = true;
|
||||||
fcitx5.enable = true;
|
fcitx5.enable = true;
|
||||||
bash.enable = true;
|
bash.enable = true;
|
||||||
direnv.enable = true;
|
direnv.enable = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user