feat: massive refactor

This commit is contained in:
2025-12-20 12:57:47 +08:00
parent f4c1b313ce
commit 454ad5885d
97 changed files with 1023 additions and 960 deletions

View File

@@ -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;

View File

@@ -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" = {

View File

@@ -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;

View File

@@ -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"