fix: resolve eval warnings and npm prefix

This commit is contained in:
m3tam3re
2026-07-07 19:39:43 +02:00
parent 93cecb1a53
commit 10876be5e6
4 changed files with 38 additions and 31 deletions
+10 -3
View File
@@ -2,16 +2,19 @@
{ {
config, config,
lib, lib,
options,
... ...
}: }:
with lib; let with lib; let
cfg = config.base.cliTools.fzf; cfg = config.base.cliTools.fzf;
changeDirWidgetCommand = "fd --type d --exclude .git --follow --hidden";
in { in {
# Enabled by default — base modules are always-on. # Enabled by default — base modules are always-on.
options.base.cliTools.fzf.enable = (mkEnableOption "enable fuzzy finder") // {default = true;}; options.base.cliTools.fzf.enable = (mkEnableOption "enable fuzzy finder") // {default = true;};
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.fzf = { programs.fzf =
{
enable = true; enable = true;
enableFishIntegration = true; enableFishIntegration = true;
colors = { colors = {
@@ -35,7 +38,11 @@ in {
"--bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort'" "--bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort'"
]; ];
defaultCommand = "fd --type f --exclude .git --follow --hidden"; defaultCommand = "fd --type f --exclude .git --follow --hidden";
changeDirWidgetCommand = "fd --type d --exclude .git --follow --hidden"; }
}; // (
if options.programs.fzf ? changeDirWidget
then {changeDirWidget.command = changeDirWidgetCommand;}
else {inherit changeDirWidgetCommand;}
);
}; };
} }
+1 -1
View File
@@ -6,7 +6,7 @@
}: { }: {
qt = { qt = {
enable = true; enable = true;
platformTheme.name = "gtk"; platformTheme.name = "gtk3";
}; };
gtk = { gtk = {
@@ -17,9 +17,6 @@ in {
bun bun
]; ];
home.file.".npmrc".text = ''
prefix=${npmGlobalPrefix}
'';
home.sessionVariables.NPM_CONFIG_PREFIX = npmGlobalPrefix; home.sessionVariables.NPM_CONFIG_PREFIX = npmGlobalPrefix;
}; };
} }
+4 -1
View File
@@ -11,7 +11,9 @@
pkgs, pkgs,
lib, lib,
... ...
}: { }: let
npmGlobalPrefix = "${config.home.homeDirectory}/.npm-global";
in {
# ── Clipboard ── # ── Clipboard ──
services.cliphist = { services.cliphist = {
enable = true; enable = true;
@@ -27,6 +29,7 @@
home.homeDirectory = lib.mkDefault "/home/${config.home.username}"; home.homeDirectory = lib.mkDefault "/home/${config.home.username}";
home.file.".npmrc".text = '' home.file.".npmrc".text = ''
prefix=${npmGlobalPrefix}
@m3ta:registry=https://code.m3ta.dev/api/packages/m3tam3re/npm/ @m3ta:registry=https://code.m3ta.dev/api/packages/m3tam3re/npm/
//code.m3ta.dev/api/packages/m3tam3re/npm/:_authToken=''${GITEA_TOKEN} //code.m3ta.dev/api/packages/m3tam3re/npm/:_authToken=''${GITEA_TOKEN}
''; '';