This commit is contained in:
parent
3a6a2f0bcc
commit
5b00484567
5 changed files with 19 additions and 28 deletions
|
@ -6,7 +6,6 @@
|
|||
features = {
|
||||
cli = {
|
||||
bookmarkthis.enable = true;
|
||||
node.enable = true;
|
||||
starship.enable = true;
|
||||
zsh.enable = true;
|
||||
};
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
features = {
|
||||
cli = {
|
||||
bookmarkthis.enable = true;
|
||||
node.enable = true;
|
||||
starship.enable = true;
|
||||
zsh.enable = true;
|
||||
};
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
imports = [
|
||||
./bookmarkthis.nix
|
||||
./dev-commit.nix
|
||||
./node.nix
|
||||
./starship.nix
|
||||
./zsh
|
||||
];
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.features.cli.node;
|
||||
|
||||
inherit (config.xdg) configHome dataHome stateHome;
|
||||
in
|
||||
{
|
||||
options.features.cli.node.enable = mkEnableOption "Enable node";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
xdg.configFile."${config.home.sessionVariables.NPM_CONFIG_USERCONFIG}".text = ''
|
||||
cache=${configHome}/npm
|
||||
init-module=${configHome}/npm/config/npm-init.js
|
||||
logs-dir=${stateHome}/npm/logs
|
||||
prefix=${dataHome}/npm
|
||||
'';
|
||||
|
||||
home.sessionVariables = {
|
||||
NPM_CONFIG_USERCONFIG = "${configHome}/npm/npmrc";
|
||||
};
|
||||
};
|
||||
}
|
19
modules2/node.nix
Normal file
19
modules2/node.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
flake.modules.homeManager.base =
|
||||
{ config, ... }:
|
||||
let
|
||||
inherit (config.xdg) configHome dataHome stateHome;
|
||||
in
|
||||
{
|
||||
xdg.configFile."${config.home.sessionVariables.NPM_CONFIG_USERCONFIG}".text = ''
|
||||
cache=${configHome}/npm
|
||||
init-module=${configHome}/npm/config/npm-init.js
|
||||
logs-dir=${stateHome}/npm/logs
|
||||
prefix=${dataHome}/npm
|
||||
'';
|
||||
|
||||
home.sessionVariables = {
|
||||
NPM_CONFIG_USERCONFIG = "${configHome}/npm/npmrc";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue