feat: massive refactor
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
{ config, lib, ... }:
|
||||
lib.my.makeSwitch {
|
||||
inherit config;
|
||||
optionName = "all command line tools";
|
||||
optionPath = [
|
||||
"cli"
|
||||
"vcs"
|
||||
"all"
|
||||
];
|
||||
config' = {
|
||||
let
|
||||
cfg = config.my.cli.vcs.all;
|
||||
in
|
||||
{
|
||||
options.my.cli.vcs.all = {
|
||||
enable = lib.mkEnableOption "all command line tools";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.cli.vcs = {
|
||||
git.enable = true;
|
||||
jj.enable = true;
|
||||
|
||||
@@ -7,15 +7,16 @@
|
||||
useremail,
|
||||
...
|
||||
}:
|
||||
lib.my.makeHomeProgramConfig {
|
||||
inherit config;
|
||||
programName = "git";
|
||||
optionPath = [
|
||||
"cli"
|
||||
"vcs"
|
||||
"git"
|
||||
];
|
||||
extraConfig = {
|
||||
let
|
||||
cfg = config.my.cli.vcs.git;
|
||||
in
|
||||
{
|
||||
options.my.cli.vcs.git = {
|
||||
enable = lib.mkEnableOption "git";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.hm.programs.git.enable = true;
|
||||
my.hm = {
|
||||
programs.git = {
|
||||
settings = {
|
||||
|
||||
@@ -7,15 +7,16 @@
|
||||
useremail,
|
||||
...
|
||||
}:
|
||||
lib.my.makeHomeProgramConfig {
|
||||
inherit config;
|
||||
programName = "jujutsu";
|
||||
optionPath = [
|
||||
"cli"
|
||||
"vcs"
|
||||
"jj"
|
||||
];
|
||||
extraConfig = {
|
||||
let
|
||||
cfg = config.my.cli.vcs.jj;
|
||||
in
|
||||
{
|
||||
options.my.cli.vcs.jj = {
|
||||
enable = lib.mkEnableOption "jujutsu";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.hm.programs.jujutsu.enable = true;
|
||||
my.hm = {
|
||||
programs.jujutsu = {
|
||||
settings = {
|
||||
|
||||
Reference in New Issue
Block a user