feat(home:obsidian): add activation script for obsidian vault repo
This commit is contained in:
parent
f0bd3f97af
commit
a049492c98
1 changed files with 10 additions and 1 deletions
|
|
@ -1,15 +1,24 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf mkMerge;
|
||||
inherit (lib) mkIf mkMerge hm;
|
||||
cfg = config.ooknet.productivity.notes.obsidian;
|
||||
notes = config.ooknet.desktop.notes;
|
||||
# admin = osConfig.ooknet.host.admin;
|
||||
# TODO: use admin.githubUsername
|
||||
notesRepo = "git@github.com:ooks-io/notes.git";
|
||||
notesPath = "${config.xdg.userDirs.documents}/notes";
|
||||
in
|
||||
|
||||
{
|
||||
config = mkMerge [
|
||||
(mkIf (cfg.enable || notes == "obsidian") {
|
||||
home.packages = [ pkgs.obsidian ];
|
||||
home.activation.cloneObsidianVault = hm.dag.entryAfter ["installPackages"] /* shell */ ''
|
||||
if ! [ -d "${notesPath}" ]; then
|
||||
$DRY_RUN_CMD git clone ${notesRepo} ${notesPath}
|
||||
fi
|
||||
'';
|
||||
})
|
||||
|
||||
(mkIf (notes == "obsidian") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue