diff --git a/modules/home/cli/editor/nvf/autocomplete.nix b/homes/x86_64-linux/rafiq/cli/editor/_nvf/autocomplete.nix similarity index 100% rename from modules/home/cli/editor/nvf/autocomplete.nix rename to homes/x86_64-linux/rafiq/cli/editor/_nvf/autocomplete.nix diff --git a/modules/home/cli/editor/nvf/binds.nix b/homes/x86_64-linux/rafiq/cli/editor/_nvf/binds.nix similarity index 100% rename from modules/home/cli/editor/nvf/binds.nix rename to homes/x86_64-linux/rafiq/cli/editor/_nvf/binds.nix diff --git a/modules/home/cli/editor/nvf/clipboard.nix b/homes/x86_64-linux/rafiq/cli/editor/_nvf/clipboard.nix similarity index 100% rename from modules/home/cli/editor/nvf/clipboard.nix rename to homes/x86_64-linux/rafiq/cli/editor/_nvf/clipboard.nix diff --git a/modules/home/cli/editor/nvf/diagnostics.nix b/homes/x86_64-linux/rafiq/cli/editor/_nvf/diagnostics.nix similarity index 100% rename from modules/home/cli/editor/nvf/diagnostics.nix rename to homes/x86_64-linux/rafiq/cli/editor/_nvf/diagnostics.nix diff --git a/modules/home/cli/editor/nvf/keymaps.nix b/homes/x86_64-linux/rafiq/cli/editor/_nvf/keymaps.nix similarity index 100% rename from modules/home/cli/editor/nvf/keymaps.nix rename to homes/x86_64-linux/rafiq/cli/editor/_nvf/keymaps.nix diff --git a/modules/home/cli/editor/nvf/languages.nix b/homes/x86_64-linux/rafiq/cli/editor/_nvf/languages.nix similarity index 100% rename from modules/home/cli/editor/nvf/languages.nix rename to homes/x86_64-linux/rafiq/cli/editor/_nvf/languages.nix diff --git a/modules/home/cli/editor/nvf/lsp.nix b/homes/x86_64-linux/rafiq/cli/editor/_nvf/lsp.nix similarity index 100% rename from modules/home/cli/editor/nvf/lsp.nix rename to homes/x86_64-linux/rafiq/cli/editor/_nvf/lsp.nix diff --git a/modules/home/cli/editor/nvf/navigation.nix b/homes/x86_64-linux/rafiq/cli/editor/_nvf/navigation.nix similarity index 100% rename from modules/home/cli/editor/nvf/navigation.nix rename to homes/x86_64-linux/rafiq/cli/editor/_nvf/navigation.nix diff --git a/modules/home/cli/editor/nvf/notes.nix b/homes/x86_64-linux/rafiq/cli/editor/_nvf/notes.nix similarity index 100% rename from modules/home/cli/editor/nvf/notes.nix rename to homes/x86_64-linux/rafiq/cli/editor/_nvf/notes.nix diff --git a/modules/home/cli/editor/nvf/notify.nix b/homes/x86_64-linux/rafiq/cli/editor/_nvf/notify.nix similarity index 100% rename from modules/home/cli/editor/nvf/notify.nix rename to homes/x86_64-linux/rafiq/cli/editor/_nvf/notify.nix diff --git a/modules/home/cli/editor/nvf/options.nix b/homes/x86_64-linux/rafiq/cli/editor/_nvf/options.nix similarity index 100% rename from modules/home/cli/editor/nvf/options.nix rename to homes/x86_64-linux/rafiq/cli/editor/_nvf/options.nix diff --git a/modules/home/cli/editor/nvf/snippets.nix b/homes/x86_64-linux/rafiq/cli/editor/_nvf/snippets.nix similarity index 100% rename from modules/home/cli/editor/nvf/snippets.nix rename to homes/x86_64-linux/rafiq/cli/editor/_nvf/snippets.nix diff --git a/modules/home/cli/editor/nvf/statusline.nix b/homes/x86_64-linux/rafiq/cli/editor/_nvf/statusline.nix similarity index 100% rename from modules/home/cli/editor/nvf/statusline.nix rename to homes/x86_64-linux/rafiq/cli/editor/_nvf/statusline.nix diff --git a/modules/home/cli/editor/nvf/treesitter.nix b/homes/x86_64-linux/rafiq/cli/editor/_nvf/treesitter.nix similarity index 100% rename from modules/home/cli/editor/nvf/treesitter.nix rename to homes/x86_64-linux/rafiq/cli/editor/_nvf/treesitter.nix diff --git a/modules/home/cli/editor/nvf/ui.nix b/homes/x86_64-linux/rafiq/cli/editor/_nvf/ui.nix similarity index 100% rename from modules/home/cli/editor/nvf/ui.nix rename to homes/x86_64-linux/rafiq/cli/editor/_nvf/ui.nix diff --git a/modules/home/cli/editor/nvf/utility.nix b/homes/x86_64-linux/rafiq/cli/editor/_nvf/utility.nix similarity index 100% rename from modules/home/cli/editor/nvf/utility.nix rename to homes/x86_64-linux/rafiq/cli/editor/_nvf/utility.nix diff --git a/modules/home/cli/editor/nvf/visuals.nix b/homes/x86_64-linux/rafiq/cli/editor/_nvf/visuals.nix similarity index 100% rename from modules/home/cli/editor/nvf/visuals.nix rename to homes/x86_64-linux/rafiq/cli/editor/_nvf/visuals.nix diff --git a/homes/x86_64-linux/rafiq/cli/editor/default.nix b/homes/x86_64-linux/rafiq/cli/editor/default.nix new file mode 100644 index 0000000..0bbd2a1 --- /dev/null +++ b/homes/x86_64-linux/rafiq/cli/editor/default.nix @@ -0,0 +1,38 @@ +{ lib, pkgs, ... }: +let + inherit (lib) singleton; +in +{ + home.sessionVariables.EDITOR = "nvim"; + persistDirs = singleton ".local/share/nvf"; + programs.nvf.enable = true; + programs.nvf.settings.vim = { + startPlugins = [ pkgs.pantheon.snippets ]; + hideSearchHighlight = true; + syntaxHighlighting = true; + telescope.enable = true; + searchCase = "ignore"; + undoFile.enable = true; + fzf-lua.enable = true; + git.enable = true; + git.gitsigns.enable = false; + autopairs.nvim-autopairs.enable = true; + autocomplete = import ./_nvf/autocomplete.nix { inherit lib; }; + binds = import ./_nvf/binds.nix; + clipboard = import ./_nvf/clipboard.nix; + diagnostics = import ./_nvf/diagnostics.nix; + keymaps = import ./_nvf/keymaps.nix; + languages = import ./_nvf/languages.nix; + lsp = import ./_nvf/lsp.nix; + navigation = import ./_nvf/navigation.nix; + notes = import ./_nvf/notes.nix; + options = import ./_nvf/options.nix; + notify = import ./_nvf/notify.nix; + snippets = import ./_nvf/snippets.nix; + statusline = import ./_nvf/statusline.nix; + treesitter = import ./_nvf/treesitter.nix; + ui = import ./_nvf/ui.nix; + utility = import ./_nvf/utility.nix; + visuals = import ./_nvf/visuals.nix; + }; +} diff --git a/homes/x86_64-linux/rafiq/default.nix b/homes/x86_64-linux/rafiq/default.nix index 8e19cdc..7975baf 100644 --- a/homes/x86_64-linux/rafiq/default.nix +++ b/homes/x86_64-linux/rafiq/default.nix @@ -6,7 +6,7 @@ ... }: let - inherit (lib) optional; + inherit (lib) singleton optional; inherit (inputs) import-tree; mkEmailAccount = address: { inherit address; @@ -26,7 +26,7 @@ let }; in { - imports = optional osConfig.desktop.enable (import-tree ./desktop); + imports = (optional osConfig.desktop.enable (import-tree ./desktop)) ++ singleton (import-tree ./cli); config = { accounts = { @@ -46,7 +46,6 @@ in screensaver.enable = true; screensaver.timeout = "100"; screensaver.command = "cbonsai -S -w 0.1 -L 40 -M 2 -b 2"; - editor = "nvf"; file-browser = "yazi"; multiplexer = "zellij"; fetch = "hyfetch"; diff --git a/modules/home/cli/default.nix b/modules/home/cli/default.nix index afd16d2..5d663c2 100644 --- a/modules/home/cli/default.nix +++ b/modules/home/cli/default.nix @@ -11,7 +11,6 @@ screensaver.enable = lib.mkEnableOption ""; screensaver.timeout = lib.pantheon.mkStrOption; screensaver.command = lib.pantheon.mkStrOption; - editor = lib.pantheon.mkStrOption; file-browser = lib.pantheon.mkStrOption; multiplexer = lib.pantheon.mkStrOption; fetch = lib.pantheon.mkStrOption; diff --git a/modules/home/cli/editor/nvf/default.nix b/modules/home/cli/editor/nvf/default.nix deleted file mode 100644 index abb741c..0000000 --- a/modules/home/cli/editor/nvf/default.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -{ - config = lib.mkIf (config.cli.editor == "nvf") { - home.sessionVariables.EDITOR = "nvim"; - home.persistence."/persist/home/${config.snowfallorg.user.name}".directories = [ - ".local/share/nvf" - ]; - programs.nvf = { - enable = true; - settings.vim = { - startPlugins = [ pkgs.pantheon.snippets ]; - hideSearchHighlight = true; - syntaxHighlighting = true; - telescope.enable = true; - searchCase = "ignore"; - undoFile.enable = true; - fzf-lua.enable = true; - git.enable = true; - git.gitsigns.enable = false; - autocomplete = import ./autocomplete.nix { inherit lib; }; - autopairs.nvim-autopairs.enable = true; - binds = import ./binds.nix; - clipboard = import ./clipboard.nix; - diagnostics = import ./diagnostics.nix; - keymaps = import ./keymaps.nix; - languages = import ./languages.nix; - lsp = import ./lsp.nix; - navigation = import ./navigation.nix; - notes = import ./notes.nix; - options = import ./options.nix; - notify = import ./notify.nix; - snippets = import ./snippets.nix; - statusline = import ./statusline.nix; - treesitter = import ./treesitter.nix; - ui = import ./ui.nix; - utility = import ./utility.nix; - visuals = import ./visuals.nix; - }; - }; - }; -}