Added lang. This is for development targets.
This is kind of bad place for this. But I'm keeping it here until I can reorganize it.
This commit is contained in:
parent
abaac8e512
commit
da10937ed1
|
@ -8,6 +8,7 @@
|
|||
imports = [
|
||||
./system
|
||||
./applications
|
||||
./lang
|
||||
# TODO Refactor everything after this.
|
||||
./cli.nix
|
||||
];
|
||||
|
|
23
modules/lang/bash.nix
Normal file
23
modules/lang/bash.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.this.lang.bash;
|
||||
graphical = config.this.graphical;
|
||||
in with lib; {
|
||||
options = {
|
||||
this.lang.bash = {
|
||||
enable = mkOption {
|
||||
default = graphical.enable;
|
||||
type = with types; bool;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.james = {
|
||||
home.packages = with pkgs; [
|
||||
nodePackages.bash-language-server
|
||||
shellcheck
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
3
modules/lang/default.nix
Normal file
3
modules/lang/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{ config, pkgs, ... }: {
|
||||
imports = [ ./golang.nix ./javascript.nix ./bash.nix ];
|
||||
}
|
40
modules/lang/golang.nix
Normal file
40
modules/lang/golang.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.this.lang.golang;
|
||||
graphical = config.this.graphical;
|
||||
in with lib; {
|
||||
options = {
|
||||
this.lang.golang = {
|
||||
enable = mkOption {
|
||||
default = graphical.enable;
|
||||
type = with types; bool;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.james = {
|
||||
programs.go = {
|
||||
enable = true;
|
||||
goPath = ".local/go";
|
||||
goBin = ".local/bin.go";
|
||||
# packages = {
|
||||
# "golang.org/x/tools/cmd/godoc";
|
||||
# "golang.org/x/tools/cmd/goimports";
|
||||
# "golang.org/x/tools/cmd/gorename";
|
||||
# "golang.org/x/tools/cmd/guru";
|
||||
# };
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
air
|
||||
gocode
|
||||
golangci-lint
|
||||
gomodifytags
|
||||
gomodifytags
|
||||
gore
|
||||
gotests
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
25
modules/lang/javascript.nix
Normal file
25
modules/lang/javascript.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.this.lang.bash;
|
||||
graphical = config.this.graphical;
|
||||
in with lib; {
|
||||
options = {
|
||||
this.lang.javascript = {
|
||||
enable = mkOption {
|
||||
default = graphical.enable;
|
||||
type = with types; bool;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.james = {
|
||||
home.packages = with pkgs; [
|
||||
nodePackages.npm
|
||||
nodePackages.vue-cli
|
||||
nodejs
|
||||
yarn
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user