30 lines
704 B
Nix
30 lines
704 B
Nix
{
|
|
lib,
|
|
config,
|
|
osConfig,
|
|
pkgs,
|
|
...
|
|
}: let
|
|
inherit (lib) mkIf elem hm;
|
|
inherit (osConfig.ooknet.workstation) profiles;
|
|
# admin = osConfig.ooknet.host.admin;
|
|
# TODO: use admin.githubUsername
|
|
notesRepo = "git@github.com:ooks-io/notes.git";
|
|
notesPath = "${config.xdg.userDirs.extraConfig.XDG_NOTES_DIR}";
|
|
in {
|
|
config = mkIf (elem "productivity" profiles) {
|
|
home.packages = [pkgs.obsidian];
|
|
home.activation.cloneObsidianVault =
|
|
hm.dag.entryAfter ["installPackages"]
|
|
/*
|
|
shell
|
|
*/
|
|
''
|
|
if ! [ -d "${notesPath}" ]; then
|
|
$DRY_RUN_CMD git clone ${notesRepo} ${notesPath}
|
|
fi
|
|
'';
|
|
|
|
ooknet.binds.notes = "obsidian";
|
|
};
|
|
}
|