26 lines
484 B
Nix
26 lines
484 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
with lib; let
|
|
cfg = config.features.desktop.obsidian;
|
|
in {
|
|
options.features.desktop.obsidian.enable =
|
|
mkEnableOption "enable Obsidian knowledge base";
|
|
|
|
config = mkIf cfg.enable {
|
|
programs.obsidian.enable = true;
|
|
|
|
xdg.mimeApps = {
|
|
enable = true;
|
|
associations.added = {
|
|
"text/markdown" = ["obsidian.desktop"];
|
|
};
|
|
defaultApplications = {
|
|
"text/markdown" = ["obsidian.desktop"];
|
|
};
|
|
};
|
|
};
|
|
}
|