From 798a21690e9895a747bb1d09445f148318303ac8 Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Mon, 19 May 2025 16:56:46 +0800 Subject: [PATCH] fix(modules/home/cli): make stuff work with env vars --- homes/x86_64-linux/rafiq/cli.nix | 18 ------------------ homes/x86_64-linux/rafiq/default.nix | 17 ++++++++++++++++- modules/home/cli/editor/nvf.nix | 1 + modules/home/cli/file-browser/yazi.nix | 2 +- 4 files changed, 18 insertions(+), 20 deletions(-) diff --git a/homes/x86_64-linux/rafiq/cli.nix b/homes/x86_64-linux/rafiq/cli.nix index 9b89514..9e28696 100644 --- a/homes/x86_64-linux/rafiq/cli.nix +++ b/homes/x86_64-linux/rafiq/cli.nix @@ -5,22 +5,4 @@ ./cli/zsh.nix ]; - home.sessionVariables = { - EDITOR = "nvim"; - }; - - home.shellAliases = { - edit = "nvim $(fzf)"; - }; - - programs.zoxide.enable = true; - home.persistence."/persist/home/rafiq".directories = [ ".local/share/zoxide" ]; - programs.nix-index.enable = true; - programs.nix-index-database.comma.enable = true; - - home.packages = with pkgs; [ - ripgrep - fzf - pantheon.rebuild - ]; } diff --git a/homes/x86_64-linux/rafiq/default.nix b/homes/x86_64-linux/rafiq/default.nix index e529ac1..91d1a06 100644 --- a/homes/x86_64-linux/rafiq/default.nix +++ b/homes/x86_64-linux/rafiq/default.nix @@ -9,11 +9,26 @@ cli.editor = "nvf"; cli.file-browser = "yazi"; + home.shellAliases.v = "nvim"; + home.shellAliases = { + edit = "nvim $(fzf)"; + }; + + programs.zoxide.enable = true; + programs.nix-index.enable = true; + programs.nix-index-database.comma.enable = true; + + home.packages = with pkgs; [ + ripgrep + fzf + pantheon.rebuild + ]; home.persistence."/persist/home/rafiq" = { directories = [ ".ssh" ".config/sops/age" - "repos" + "repos" + ".local/share/zoxide" ]; allowOther = true; }; diff --git a/modules/home/cli/editor/nvf.nix b/modules/home/cli/editor/nvf.nix index 3790b8f..94ab4ae 100644 --- a/modules/home/cli/editor/nvf.nix +++ b/modules/home/cli/editor/nvf.nix @@ -1,6 +1,7 @@ { config, lib, ... }: { config = lib.mkIf (config.cli.editor == "nvf") { + home.sessionVariables.EDITOR = "nvim"; programs.nvf = { enable = true; settings.vim = { diff --git a/modules/home/cli/file-browser/yazi.nix b/modules/home/cli/file-browser/yazi.nix index fa6ac20..f620f98 100644 --- a/modules/home/cli/file-browser/yazi.nix +++ b/modules/home/cli/file-browser/yazi.nix @@ -3,7 +3,7 @@ config = lib.mkIf (config.cli.file-browser == "yazi") { - home.shellAliases.FILE-BROWSER = "yazi"; + home.sessionVariables.FILE_BROWSER = "yazi"; programs.yazi = { enable = true; shellWrapperName = "t";