feat: massive refactor
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
{ config, lib, ... }:
|
||||
lib.my.makeSwitch {
|
||||
inherit config;
|
||||
optionName = "all coding langs";
|
||||
optionPath = [
|
||||
"coding"
|
||||
"langs"
|
||||
"all"
|
||||
];
|
||||
config' = {
|
||||
let
|
||||
cfg = config.my.coding.langs.all;
|
||||
in
|
||||
{
|
||||
options.my.coding.langs.all = {
|
||||
enable = lib.mkEnableOption "all coding langs";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.coding.langs = {
|
||||
c.enable = true;
|
||||
go.enable = true;
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.my.makeSwitch {
|
||||
inherit config;
|
||||
optionName = "c";
|
||||
optionPath = [
|
||||
"coding"
|
||||
"langs"
|
||||
"c"
|
||||
];
|
||||
config' = {
|
||||
let
|
||||
cfg = config.my.coding.langs.c;
|
||||
in
|
||||
{
|
||||
options.my.coding.langs.c = {
|
||||
enable = lib.mkEnableOption "c";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.hm.home.packages = with pkgs; [
|
||||
gcc
|
||||
(lib.hiPrio clang)
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.my.makeHomePackageConfig {
|
||||
inherit config pkgs;
|
||||
packageName = "go";
|
||||
packagePath = [ "go" ];
|
||||
optionPath = [
|
||||
"coding"
|
||||
"langs"
|
||||
"go"
|
||||
];
|
||||
extraConfig = {
|
||||
let
|
||||
cfg = config.my.coding.langs.go;
|
||||
in
|
||||
{
|
||||
options.my.coding.langs.go = {
|
||||
enable = lib.mkEnableOption "go";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.hm.home.packages = with pkgs; [
|
||||
go
|
||||
gotools
|
||||
gopls
|
||||
];
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.my.makeSwitch {
|
||||
inherit config;
|
||||
optionName = "java";
|
||||
optionPath = [
|
||||
"coding"
|
||||
"langs"
|
||||
"java"
|
||||
];
|
||||
config' = {
|
||||
let
|
||||
cfg = config.my.coding.langs.java;
|
||||
in
|
||||
{
|
||||
options.my.coding.langs.java = {
|
||||
enable = lib.mkEnableOption "java";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.hm.home.packages = with pkgs; [
|
||||
openjdk25
|
||||
java-language-server
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.my.makeSwitch {
|
||||
inherit config;
|
||||
optionName = "js";
|
||||
optionPath = [
|
||||
"coding"
|
||||
"langs"
|
||||
"js"
|
||||
];
|
||||
config' = {
|
||||
let
|
||||
cfg = config.my.coding.langs.js;
|
||||
in
|
||||
{
|
||||
options.my.coding.langs.js = {
|
||||
enable = lib.mkEnableOption "js";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.hm = {
|
||||
home.packages = with pkgs; [
|
||||
nodejs
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.my.makeSwitch {
|
||||
inherit config;
|
||||
optionName = "lua";
|
||||
optionPath = [
|
||||
"coding"
|
||||
"langs"
|
||||
"lua"
|
||||
];
|
||||
config' = {
|
||||
let
|
||||
cfg = config.my.coding.langs.lua;
|
||||
in
|
||||
{
|
||||
options.my.coding.langs.lua = {
|
||||
enable = lib.mkEnableOption "lua";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.hm.home.packages = with pkgs; [
|
||||
luajit
|
||||
stylua
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.my.makeHomePackageConfig {
|
||||
inherit config pkgs;
|
||||
packageName = "python3";
|
||||
packagePath = [ "python3" ];
|
||||
optionPath = [
|
||||
"coding"
|
||||
"langs"
|
||||
"python"
|
||||
];
|
||||
extraConfig = {
|
||||
let
|
||||
cfg = config.my.coding.langs.python;
|
||||
in
|
||||
{
|
||||
options.my.coding.langs.python = {
|
||||
enable = lib.mkEnableOption "python3";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.hm.home.packages = with pkgs; [
|
||||
python3
|
||||
uv
|
||||
pyright
|
||||
];
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.my.makeSwitch {
|
||||
inherit config;
|
||||
optionName = "QML";
|
||||
optionPath = [
|
||||
"coding"
|
||||
"langs"
|
||||
"qml"
|
||||
];
|
||||
config' = {
|
||||
let
|
||||
cfg = config.my.coding.langs.qml;
|
||||
in
|
||||
{
|
||||
options.my.coding.langs.qml = {
|
||||
enable = lib.mkEnableOption "QML";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.hm.home.packages = with pkgs; [
|
||||
kdePackages.qtdeclarative
|
||||
];
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.my.makeSwitch {
|
||||
inherit config;
|
||||
optionName = "rust";
|
||||
optionPath = [
|
||||
"coding"
|
||||
"langs"
|
||||
"rust"
|
||||
];
|
||||
config' = {
|
||||
let
|
||||
cfg = config.my.coding.langs.rust;
|
||||
in
|
||||
{
|
||||
options.my.coding.langs.rust = {
|
||||
enable = lib.mkEnableOption "rust";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.hm = {
|
||||
home.packages = with pkgs; [
|
||||
(fenix.stable.withComponents [
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.my.makeSwitch {
|
||||
inherit config;
|
||||
optionName = "Typst";
|
||||
optionPath = [
|
||||
"coding"
|
||||
"langs"
|
||||
"typst"
|
||||
];
|
||||
config' = {
|
||||
let
|
||||
cfg = config.my.coding.langs.typst;
|
||||
in
|
||||
{
|
||||
options.my.coding.langs.typst = {
|
||||
enable = lib.mkEnableOption "Typst";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.hm.home.packages = with pkgs; [
|
||||
typst
|
||||
tinymist
|
||||
|
||||
Reference in New Issue
Block a user