feat: massive refactor
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user