Modularize dev/node.nix
This commit is contained in:
parent
b7b7821ce8
commit
d9a56ceb87
|
@ -10,7 +10,7 @@
|
||||||
# ./haskell.nix
|
# ./haskell.nix
|
||||||
# ./latex.nix
|
# ./latex.nix
|
||||||
./lua.nix
|
./lua.nix
|
||||||
# ./node.nix
|
./node.nix
|
||||||
./python.nix
|
./python.nix
|
||||||
./rust.nix
|
./rust.nix
|
||||||
./scala.nix
|
./scala.nix
|
||||||
|
|
|
@ -3,10 +3,17 @@
|
||||||
# JS is one of those "when it's good, it's alright, when it's bad, it's a
|
# JS is one of those "when it's good, it's alright, when it's bad, it's a
|
||||||
# disaster" languages.
|
# disaster" languages.
|
||||||
|
|
||||||
{ pkgs, ... }:
|
{ config, options, lib, pkgs, ... }:
|
||||||
|
with lib;
|
||||||
{
|
{
|
||||||
imports = [ ./. ];
|
options.modules.dev.node = {
|
||||||
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf config.modules.dev.node.enable {
|
||||||
my = {
|
my = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
nodejs
|
nodejs
|
||||||
|
@ -28,4 +35,5 @@
|
||||||
prefix=$XDG_DATA_HOME/npm
|
prefix=$XDG_DATA_HOME/npm
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue