refactor: complete rewrite

This commit is contained in:
ooks-io 2024-10-23 23:46:25 +13:00
parent 19a4bbda3c
commit 8e81943cf9
399 changed files with 3396 additions and 8042 deletions

View file

@ -0,0 +1,6 @@
{
imports = [
./zathura.nix
./obsidian.nix
];
}

View file

@ -0,0 +1,30 @@
{
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.documents}/notes";
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";
};
}

View file

@ -0,0 +1,47 @@
{
lib,
osConfig,
...
}: let
inherit (lib) mkIf elem;
inherit (osConfig.ooknet.appearance.colorscheme) palette;
inherit (osConfig.ooknet.appearance) fonts;
inherit (osConfig.ooknet.workstation) profiles;
zathuraMime = {"application/pdf" = ["org.pwmt.zathura.desktop"];};
in {
config = mkIf (elem "productivity" profiles) {
programs.zathura = {
enable = true;
options = {
font = "${fonts.regular.family} 14";
recolor = true;
selection-clipboard = "clipboard";
default-bg = "#${palette.base00}";
default-fg = "#${palette.base01}";
statusbar-bg = "#${palette.base02}";
statusbar-fg = "#${palette.base04}";
inputbar-bg = "#${palette.base00}";
inputbar-fg = "#${palette.base07}";
notification-bg = "#${palette.base00}";
notification-fg = "#${palette.base07}";
notification-error-bg = "#${palette.base00}";
notification-error-fg = "#${palette.base08}";
notification-warning-bg = "#${palette.base00}";
notification-warning-fg = "#${palette.base08}";
highlight-color = "#${palette.base0A}";
highlight-active-color = "#${palette.base0D}";
completion-bg = "#${palette.base01}";
completion-fg = "#${palette.base05}";
completions-highlight-bg = "#${palette.base0D}";
completions-highlight-fg = "#${palette.base07}";
recolor-lightcolor = "#${palette.base00}";
recolor-darkcolor = "#${palette.base06}";
};
};
xdg.mimeApps = {
associations.added = zathuraMime;
defaultApplications = zathuraMime;
};
};
}