Files
nix/hosts/common/user/configs/gui/obsidian/default.nix
2024-07-12 12:54:13 +03:00

77 lines
1.7 KiB
Nix

{
user ? throw "user argument is required",
}:
{
config,
lib,
pkgs,
...
}:
{
home-manager.users.${user.name} = {
imports = [ ./options.nix ];
programs.obsidian = {
enable = true;
sharedSettings = {
app = {
defaultViewMode = "preview";
livePreview = false;
readableLineLength = false;
showLineNumber = true;
tabSize = 2;
promptDelete = false;
trashOption = "local";
alwaysUpdateLinks = true;
newFileLocation = "folder";
newFileFolderPath = "inbox";
newLinkFormat = "absolute";
showUnsupportedFiles = true;
attachmentFolderPath = "./assets";
};
corePlugins = [
"bookmarks"
"canvas"
"command-palette"
"editor-status"
"file-explorer"
"global-search"
"graph"
"note-composer"
"outgoing-link"
"outline"
"page-preview"
"slash-command"
"switcher"
"tag-pane"
];
plugins = [
{
pkg = import ./plugins/minimal-settings.nix { inherit pkgs; };
extraFiles."data.json".source = (pkgs.formats.json { }).generate "data.json" {
labeledNav = true;
editorFont = "var(--font-monospace)";
};
}
];
cssSnippets = {
"file-explorer-separators".source = ./snippets/file-explorer-separators.css;
};
themes = [
{
enable = true;
pkg = import ./themes/minimal.nix { inherit pkgs; };
}
];
};
};
home.persistence."/cache${user.home}".directories = [ ".config/obsidian" ];
};
}