feat: massive refactor
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
{ config, lib, ... }:
|
||||
lib.my.makeSwitch {
|
||||
inherit config;
|
||||
optionName = "all coding tools";
|
||||
optionPath = [
|
||||
"coding"
|
||||
"all"
|
||||
];
|
||||
config' = {
|
||||
let
|
||||
cfg = config.my.coding.all;
|
||||
in
|
||||
{
|
||||
options.my.coding.all = {
|
||||
enable = lib.mkEnableOption "all coding tools";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.coding = {
|
||||
editor.all.enable = true;
|
||||
langs.all.enable = true;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{ config, lib, ... }:
|
||||
lib.my.makeSwitch {
|
||||
inherit config;
|
||||
optionName = "all coding editors";
|
||||
optionPath = [
|
||||
"coding"
|
||||
"editor"
|
||||
"all"
|
||||
];
|
||||
config' = {
|
||||
let
|
||||
cfg = config.my.coding.editor.all;
|
||||
in
|
||||
{
|
||||
options.my.coding.editor.all = {
|
||||
enable = lib.mkEnableOption "all coding editors";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.coding.editor = {
|
||||
neovim.enable = true;
|
||||
vscode.enable = true;
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.my.makeHomeProgramConfig {
|
||||
inherit config;
|
||||
programName = "neovim";
|
||||
optionPath = [
|
||||
"coding"
|
||||
"editor"
|
||||
"neovim"
|
||||
];
|
||||
extraConfig = {
|
||||
let
|
||||
cfg = config.my.coding.editor.neovim;
|
||||
in
|
||||
{
|
||||
options.my.coding.editor.neovim = {
|
||||
enable = lib.mkEnableOption "neovim";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.hm = {
|
||||
xdg.configFile."nvim/init.lua".source = ./nvim/init.lua;
|
||||
xdg.configFile."nvim/lua" = {
|
||||
|
||||
@@ -4,15 +4,16 @@
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.my.makeHomeProgramConfig {
|
||||
inherit config;
|
||||
programName = "vscode";
|
||||
optionPath = [
|
||||
"coding"
|
||||
"editor"
|
||||
"vscode"
|
||||
];
|
||||
extraConfig = {
|
||||
let
|
||||
cfg = config.my.coding.editor.vscode;
|
||||
in
|
||||
{
|
||||
options.my.coding.editor.vscode = {
|
||||
enable = lib.mkEnableOption "vscode";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.hm.programs.vscode.enable = true;
|
||||
my.hm = {
|
||||
programs.vscode = {
|
||||
package = pkgs.vscodium;
|
||||
|
||||
@@ -3,15 +3,16 @@
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
lib.my.makeHomeProgramConfig {
|
||||
inherit config;
|
||||
programName = "zed-editor";
|
||||
optionPath = [
|
||||
"coding"
|
||||
"editor"
|
||||
"zed"
|
||||
];
|
||||
extraConfig = {
|
||||
let
|
||||
cfg = config.my.coding.editor.zed;
|
||||
in
|
||||
{
|
||||
options.my.coding.editor.zed = {
|
||||
enable = lib.mkEnableOption "zed-editor";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.hm.programs.zed-editor.enable = true;
|
||||
my.persist.homeDirs = [
|
||||
".config/zed"
|
||||
".local/share/zed"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -4,14 +4,15 @@
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.my.makeSwitch {
|
||||
inherit config;
|
||||
optionName = "misc";
|
||||
optionPath = [
|
||||
"coding"
|
||||
"misc"
|
||||
];
|
||||
config' = {
|
||||
let
|
||||
cfg = config.my.coding.misc;
|
||||
in
|
||||
{
|
||||
options.my.coding.misc = {
|
||||
enable = lib.mkEnableOption "misc";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.hm = {
|
||||
home.packages = with pkgs; [
|
||||
gnumake
|
||||
|
||||
Reference in New Issue
Block a user