Migrate config from dotfiles

This commit is contained in:
2023-06-26 14:40:59 +01:00
parent e45609ea4b
commit a7e1525e34
69 changed files with 2236 additions and 161 deletions

20
modules/dev/cc.nix Normal file
View File

@ -0,0 +1,20 @@
{ config, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.dev.cc;
in {
options.modules.dev.cc = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
user.packages = with pkgs; [
clang
gcc
gdb
cmake
llvmPackages.libcxx
];
};
}

16
modules/dev/java.nix Normal file
View File

@ -0,0 +1,16 @@
{ config, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.dev.java;
in {
options.modules.dev.java = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
user.packages = with pkgs; [
jdk
];
};
}

16
modules/dev/lua.nix Normal file
View File

@ -0,0 +1,16 @@
{ config, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.dev.lua;
in {
options.modules.dev.lua = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
user.packages = with pkgs; [
lua
];
};
}

16
modules/dev/node.nix Normal file
View File

@ -0,0 +1,16 @@
{ config, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.dev.node;
in {
options.modules.dev.node = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
user.packages = with pkgs; [
nodejs_latest
];
};
}

16
modules/dev/python.nix Normal file
View File

@ -0,0 +1,16 @@
{ config, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.dev.python;
in {
options.modules.dev.python = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
user.packages = with pkgs; [
python310
];
};
}

19
modules/dev/rust.nix Normal file
View File

@ -0,0 +1,19 @@
{ config, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.dev.rust;
in {
options.modules.dev.rust = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
user.packages = with pkgs; [
rustc
rustup
rustfmt
rust-bindgen
];
};
}

18
modules/dev/scala.nix Normal file
View File

@ -0,0 +1,18 @@
{ config, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.dev.scala;
in {
options.modules.dev.scala = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
user.packages = with pkgs; [
jdk
sbt
scala
];
};
}

16
modules/dev/shell.nix Normal file
View File

@ -0,0 +1,16 @@
{ config, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.dev.shell;
in {
options.modules.dev.shell = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
user.packages = with pkgs; [
shellcheck
];
};
}

16
modules/dev/zig.nix Normal file
View File

@ -0,0 +1,16 @@
{ config, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.dev.zig;
in {
options.modules.dev.zig = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
user.packages = with pkgs; [
zig
];
};
}