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,
lib,
options,
...
}:
with lib; let
cfg = config.base.cliTools.fzf;
changeDirWidgetCommand = "fd --type d --exclude .git --follow --hidden";
in {
# Enabled by default — base modules are always-on.
options.base.cliTools.fzf.enable = (mkEnableOption "enable fuzzy finder") // {default = true;};
config = mkIf cfg.enable {
programs.fzf = {
programs.fzf =
{
enable = true;
enableFishIntegration = true;
colors = {
@@ -35,7 +38,11 @@ in {
"--bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort'"
];
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 = {
enable = true;
platformTheme.name = "gtk";
platformTheme.name = "gtk3";
};
gtk = {
@@ -17,9 +17,6 @@ in {
bun
];
home.file.".npmrc".text = ''
prefix=${npmGlobalPrefix}
'';
home.sessionVariables.NPM_CONFIG_PREFIX = npmGlobalPrefix;
};
}
+4 -1
View File
@@ -11,7 +11,9 @@
pkgs,
lib,
...
}: {
}: let
npmGlobalPrefix = "${config.home.homeDirectory}/.npm-global";
in {
# ── Clipboard ──
services.cliphist = {
enable = true;
@@ -27,6 +29,7 @@
home.homeDirectory = lib.mkDefault "/home/${config.home.username}";
home.file.".npmrc".text = ''
prefix=${npmGlobalPrefix}
@m3ta:registry=https://code.m3ta.dev/api/packages/m3tam3re/npm/
//code.m3ta.dev/api/packages/m3tam3re/npm/:_authToken=''${GITEA_TOKEN}
'';