feat: add config option for learning jujutsu
Some checks failed
/ check (push) Has been cancelled

This commit is contained in:
Daniel Flanagan 2025-03-18 10:34:16 -05:00
parent 886ee38989
commit 3f1708bcde
3 changed files with 36 additions and 13 deletions

View file

@ -54,6 +54,9 @@ in
lyte = { lyte = {
shell = { shell = {
enable = lib.mkEnableOption "Enable home-manager shell configuration for the user"; enable = lib.mkEnableOption "Enable home-manager shell configuration for the user";
learn-jujutsu-not-git = {
enable = lib.mkEnableOption "Soft-disable the 'git' command in an effort to force me to learn jujutsu (jj)";
};
}; };
}; };
}; };
@ -308,7 +311,7 @@ in
in in
{ {
programs.git = { programs.git = {
enable = true; enable = !config.lyte.shell.learn-jujutsu-not-git.enable;
userName = lib.mkDefault fullName; userName = lib.mkDefault fullName;
userEmail = email; userEmail = email;
@ -404,16 +407,30 @@ in
}; };
programs.fish.functions = { programs.fish.functions = {
g = { g =
wraps = "git"; if config.lyte.shell.learn-jujutsu-not-git.enable then
body = '' {
if test (count $argv) -gt 0 wraps = "jj";
git $argv body = ''
else if test (count $argv) -gt 0
git status jj $argv
end else
''; jj status
}; end
'';
}
else
{
wraps = "git";
body = ''
if test (count $argv) -gt 0
git $argv
else
git status
end
'';
};
lag = { lag = {
wraps = "g"; wraps = "g";
body = '' body = ''

View file

@ -51,7 +51,10 @@
lyte.desktop.enable = true; lyte.desktop.enable = true;
home-manager.users.daniel = { home-manager.users.daniel = {
lyte.shell.enable = true; lyte.shell = {
enable = true;
learn-jujutsu-not-git.enable = true;
};
lyte.desktop.enable = true; lyte.desktop.enable = true;
slippi-launcher = { slippi-launcher = {
enable = true; enable = true;

View file

@ -75,7 +75,10 @@
family-account.enable = true; family-account.enable = true;
home-manager.users.daniel = { home-manager.users.daniel = {
lyte.shell.enable = true; lyte.shell = {
enable = true;
learn-jujutsu-not-git.enable = true;
};
lyte.desktop.enable = true; lyte.desktop.enable = true;
home = { home = {
file.".config/easyeffects/output" = { file.".config/easyeffects/output" = {