Make NOTES_DIRECTORY
configurable per host
This commit is contained in:
parent
4f91d5ce7d
commit
02890fc725
5 changed files with 41 additions and 10 deletions
|
@ -1,12 +1,31 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home = {
|
||||
packages = with pkgs; [ notes ];
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
sessionVariables = {
|
||||
NOTES_DIRECTORY = "$DOCUMENTS/wiki/notes";
|
||||
WIKI_DIRECTORY = "$DOCUMENTS/wiki";
|
||||
with lib;
|
||||
|
||||
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}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue