17 lines
415 B
Nix
17 lines
415 B
Nix
|
{ lib, config, ... }:
|
||
|
with lib; { # Thanks to azahi!
|
||
|
options.n.misc.defaults = mkOption {
|
||
|
description = "Default applications.";
|
||
|
type = with types; attrsOf (listOf str);
|
||
|
default = {};
|
||
|
};
|
||
|
|
||
|
config.hm.xdg = {
|
||
|
enable = true;
|
||
|
mimeApps = {
|
||
|
enable = true;
|
||
|
defaultApplications = mkMerge (mapAttrsToList (n: v: genAttrs v (_: [ "${n}.desktop" ])) config.n.misc.defaults);
|
||
|
};
|
||
|
};
|
||
|
}
|