starting with some scala

This commit is contained in:
Motiejus Jakštys 2023-10-08 23:00:39 +03:00
parent 531d8dde37
commit 4b9674d7c6
5 changed files with 30 additions and 11 deletions

View File

@ -256,6 +256,7 @@
extraSpecialArgs = { extraSpecialArgs = {
stateVersion = "23.05"; stateVersion = "23.05";
email = "motiejusja@wix.com"; email = "motiejusja@wix.com";
devEnvironment = true;
}; };
}; };

View File

@ -52,7 +52,6 @@ in {
base = { base = {
zfs.enable = true; zfs.enable = true;
users = { users = {
devEnvironment = true;
passwd = { passwd = {
root.passwordFile = config.age.secrets.root-passwd-hash.path; root.passwordFile = config.age.secrets.root-passwd-hash.path;
motiejus.passwordFile = config.age.secrets.motiejus-passwd-hash.path; motiejus.passwordFile = config.age.secrets.motiejus-passwd-hash.path;

View File

@ -41,7 +41,6 @@
base = { base = {
zfs.enable = true; zfs.enable = true;
users = { users = {
devEnvironment = true;
passwd = { passwd = {
root.passwordFile = config.age.secrets.root-passwd-hash.path; root.passwordFile = config.age.secrets.root-passwd-hash.path;
motiejus.passwordFile = config.age.secrets.motiejus-passwd-hash.path; motiejus.passwordFile = config.age.secrets.motiejus-passwd-hash.path;

View File

@ -7,11 +7,6 @@
cfg = config.mj.base.users; cfg = config.mj.base.users;
in { in {
options.mj.base.users = with lib.types; { options.mj.base.users = with lib.types; {
devEnvironment = lib.mkOption {
type = bool;
default = false;
};
passwd = lib.mkOption { passwd = lib.mkOption {
type = attrsOf (submodule { type = attrsOf (submodule {
options = { options = {
@ -63,9 +58,11 @@ in {
home-manager.users.motiejus = {pkgs, ...}: home-manager.users.motiejus = {pkgs, ...}:
lib.mkMerge [ lib.mkMerge [
(import ../../../shared/home/default.nix { (import ../../../shared/home/default.nix {
inherit lib;
inherit pkgs; inherit pkgs;
inherit (config.mj) stateVersion; inherit (config.mj) stateVersion;
email = "motiejus@jakstys.lt"; email = "motiejus@jakstys.lt";
devEnvironment = false;
}) })
{ {
programs.bash = { programs.bash = {

View File

@ -2,6 +2,7 @@
pkgs, pkgs,
stateVersion, stateVersion,
email, email,
devEnvironment,
... ...
}: { }: {
home = { home = {
@ -11,7 +12,16 @@
homeDirectory = "/home/motiejus"; homeDirectory = "/home/motiejus";
}; };
#home.packages = lib.mkIf cfg.devEnvironment [pkgs.go]; home.packages =
if devEnvironment
then
(with pkgs; [
go
scala_2_12
coursier
])
else [];
programs.direnv.enable = true; programs.direnv.enable = true;
@ -20,9 +30,22 @@
vimAlias = true; vimAlias = true;
vimdiffAlias = true; vimdiffAlias = true;
defaultEditor = true; defaultEditor = true;
plugins = with pkgs.vimPlugins; [ plugins = with pkgs.vimPlugins;
fugitive [
]; fugitive
]
++ (
if devEnvironment
then [
vim-go
zig-vim
nvim-metals
plenary-nvim
]
else []
);
extraConfig = builtins.readFile ./vimrc; extraConfig = builtins.readFile ./vimrc;
}; };