From 111c336abcd4279f459068d03e440a01d3524403 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 5 Apr 2025 10:11:07 +0100 Subject: [PATCH] Move notes configuration --- home/opdavies/hosts/PW05CH3L.nix | 5 ----- home/opdavies/hosts/t480.nix | 5 ----- home/opdavies/hosts/t490.nix | 5 ----- hosts/PW05CH3L/modules/notes.nix | 18 ++++++++++++++++ hosts/t480/configuration.nix | 1 + hosts/t480/modules/notes.nix | 18 ++++++++++++++++ modules/home-manager/cli/default.nix | 1 - modules/home-manager/cli/notes.nix | 32 ---------------------------- 8 files changed, 37 insertions(+), 48 deletions(-) create mode 100644 hosts/PW05CH3L/modules/notes.nix create mode 100644 hosts/t480/modules/notes.nix delete mode 100644 modules/home-manager/cli/notes.nix diff --git a/home/opdavies/hosts/PW05CH3L.nix b/home/opdavies/hosts/PW05CH3L.nix index 40df8f9d..a7bb59da 100644 --- a/home/opdavies/hosts/PW05CH3L.nix +++ b/home/opdavies/hosts/PW05CH3L.nix @@ -7,11 +7,6 @@ { homeManagerModules = { - notes = { - enable = true; - directory = "$HOME/Documents/wiki/tfw-notes"; - }; - tmux.enable = true; tmux-sessionizer.enable = true; }; diff --git a/home/opdavies/hosts/t480.nix b/home/opdavies/hosts/t480.nix index c1faa65e..178aca38 100644 --- a/home/opdavies/hosts/t480.nix +++ b/home/opdavies/hosts/t480.nix @@ -2,11 +2,6 @@ { homeManagerModules = { - notes = { - enable = true; - directory = "$HOME/Documents/wiki/notes"; - }; - tmux.enable = true; tmux-sessionizer.enable = true; }; diff --git a/home/opdavies/hosts/t490.nix b/home/opdavies/hosts/t490.nix index 8a6097bf..1b8c01fd 100644 --- a/home/opdavies/hosts/t490.nix +++ b/home/opdavies/hosts/t490.nix @@ -2,11 +2,6 @@ { homeManagerModules = { - notes = { - enable = true; - directory = "$HOME/Documents/wiki/notes"; - }; - tmux.enable = true; tmux-sessionizer.enable = true; }; diff --git a/hosts/PW05CH3L/modules/notes.nix b/hosts/PW05CH3L/modules/notes.nix new file mode 100644 index 00000000..6d132a3e --- /dev/null +++ b/hosts/PW05CH3L/modules/notes.nix @@ -0,0 +1,18 @@ +{ + home-manager.users.opdavies = + { config, pkgs, ... }: + { + xdg = { + enable = true; + userDirs.enable = true; + }; + + home = { + packages = with pkgs; [ notes ]; + + sessionVariables = { + NOTES_DIRECTORY = "${config.xdg.userDirs.documents}/wiki/tfw-notes"; + }; + }; + }; +} diff --git a/hosts/t480/configuration.nix b/hosts/t480/configuration.nix index 33a90715..0aef3abf 100644 --- a/hosts/t480/configuration.nix +++ b/hosts/t480/configuration.nix @@ -27,6 +27,7 @@ ../../users/opdavies ./modules/newsboat + ./modules/notes.nix ]; nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; diff --git a/hosts/t480/modules/notes.nix b/hosts/t480/modules/notes.nix new file mode 100644 index 00000000..424712cc --- /dev/null +++ b/hosts/t480/modules/notes.nix @@ -0,0 +1,18 @@ +{ + home-manager.users.opdavies = + { config, pkgs, ... }: + { + xdg = { + enable = true; + userDirs.enable = true; + }; + + home = { + packages = with pkgs; [ notes ]; + + sessionVariables = { + NOTES_DIRECTORY = "${config.xdg.userDirs.documents}/wiki/notes"; + }; + }; + }; +} diff --git a/modules/home-manager/cli/default.nix b/modules/home-manager/cli/default.nix index b4ccb1f8..ef52aa76 100644 --- a/modules/home-manager/cli/default.nix +++ b/modules/home-manager/cli/default.nix @@ -4,7 +4,6 @@ imports = [ ./bin ./git.nix - ./notes.nix ./starship.nix ./tmux.nix ./tmux-sessionizer.nix diff --git a/modules/home-manager/cli/notes.nix b/modules/home-manager/cli/notes.nix deleted file mode 100644 index a8be8ce9..00000000 --- a/modules/home-manager/cli/notes.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: - -with lib; - -let - cfg = config.homeManagerModules.notes; -in -{ - options.homeManagerModules.notes = { - enable = mkEnableOption "Enable notes"; - - directory = mkOption { - type = types.str; - }; - }; - - config = mkIf cfg.enable { - home = { - packages = with pkgs; [ notes ]; - - sessionVariables = { - NOTES_DIRECTORY = "${cfg.directory}"; - }; - }; - }; - -}