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:
James Patrick 2022-03-04 22:24:38 -05:00
parent abaac8e512
commit da10937ed1
5 changed files with 92 additions and 0 deletions

View File

@ -8,6 +8,7 @@
imports = [ imports = [
./system ./system
./applications ./applications
./lang
# TODO Refactor everything after this. # TODO Refactor everything after this.
./cli.nix ./cli.nix
]; ];

23
modules/lang/bash.nix Normal file
View 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
View File

@ -0,0 +1,3 @@
{ config, pkgs, ... }: {
imports = [ ./golang.nix ./javascript.nix ./bash.nix ];
}

40
modules/lang/golang.nix Normal file
View 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
];
};
};
}

View 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
];
};
};
}