refactor: Split plugin configurations from other.nix into separate files
This commit is contained in:
parent
8cde6f4ea7
commit
d3ce1b22c4
23 changed files with 264 additions and 99 deletions
|
|
@ -0,0 +1,29 @@
|
|||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf readFile;
|
||||
in
|
||||
{
|
||||
home-manager.users.moritz.programs.nixvim = {
|
||||
plugins.obsidian = {
|
||||
enable = true;
|
||||
settings = {
|
||||
ui.enable = false;
|
||||
dir = "~/Documents/Nextcloud/Notes/zettelkasten/";
|
||||
note_id_func.__raw = ''
|
||||
function(title)
|
||||
if title ~= nil then
|
||||
return title
|
||||
else
|
||||
suffix = ""
|
||||
for _ = 1, 4 do
|
||||
suffix = suffix .. string.char(math.random(65, 90))
|
||||
end
|
||||
return tostring(os.date("%Y-%m-%d")) .. "-" .. suffix
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue