Make NOTES_DIRECTORY configurable per host

This commit is contained in:
Oliver Davies 2025-01-29 01:49:03 +00:00
parent 4f91d5ce7d
commit 02890fc725
5 changed files with 41 additions and 10 deletions

View file

@ -2,6 +2,13 @@
features = { features = {
cli = { cli = {
direnv.enable = true; direnv.enable = true;
notes = {
enable = true;
directory = "$HOME/Documents/wiki/tfw-notes";
};
syncthing.enable = true; syncthing.enable = true;
tmux-sessionizer.enable = true; tmux-sessionizer.enable = true;
}; };

View file

@ -4,6 +4,13 @@
features = { features = {
cli = { cli = {
direnv.enable = true; direnv.enable = true;
notes = {
enable = true;
directory = "$HOME/Documents/wiki/notes";
};
syncthing.enable = true; syncthing.enable = true;
tmux-sessionizer.enable = true; tmux-sessionizer.enable = true;
}; };

View file

@ -19,8 +19,6 @@
; ;
}) })
(import ./notes.nix { inherit pkgs; })
(import ./tmux-sessionizer.nix { (import ./tmux-sessionizer.nix {
inherit inherit
config config
@ -34,6 +32,7 @@
./direnv.nix ./direnv.nix
./fzf.nix ./fzf.nix
./git.nix ./git.nix
./notes.nix
./phpactor.nix ./phpactor.nix
./ripgrep.nix ./ripgrep.nix
./starship.nix ./starship.nix

View file

@ -1,12 +1,31 @@
{ pkgs, ... }:
{ {
home = { config,
packages = with pkgs; [ notes ]; lib,
pkgs,
...
}:
sessionVariables = { with lib;
NOTES_DIRECTORY = "$DOCUMENTS/wiki/notes";
WIKI_DIRECTORY = "$DOCUMENTS/wiki"; let
cfg = config.features.cli.notes;
in
{
options.features.cli.notes = {
enable = mkEnableOption "Enable notes";
directory = mkOption {
type = types.str;
};
};
config = mkIf cfg.enable {
home = {
packages = with pkgs; [ notes ];
sessionVariables = {
NOTES_DIRECTORY = "${cfg.directory}";
};
}; };
}; };

View file

@ -3,5 +3,4 @@ Add create-podcast-tasks script
Replace doppler with agenix Replace doppler with agenix
Evaluate services.languagetool as a replacement for Grammarly Evaluate services.languagetool as a replacement for Grammarly
Make git email address configurable Make git email address configurable
Make NOTES_DIRECTORY configurable
Finish configuring syncthing with nix - https://github.com/neeasade/dotfiles/blob/694c2a11107c10947af956befe16cbe5cee0abda/os/nixos/config/shared.nix#L62 Finish configuring syncthing with nix - https://github.com/neeasade/dotfiles/blob/694c2a11107c10947af956befe16cbe5cee0abda/os/nixos/config/shared.nix#L62