diff --git a/modules/cli/all.nix b/modules/cli/all.nix index ce07201..063fb37 100644 --- a/modules/cli/all.nix +++ b/modules/cli/all.nix @@ -12,6 +12,7 @@ lib.my.makeSwitch { misc.enable = true; monitor.all.enable = true; shell.all.enable = true; + vcs.all.enable = true; }; }; } diff --git a/modules/cli/misc/default.nix b/modules/cli/misc/default.nix index 9c00481..063c9ea 100644 --- a/modules/cli/misc/default.nix +++ b/modules/cli/misc/default.nix @@ -47,29 +47,6 @@ lib.my.makeSwitch { programs.dconf.enable = true; my.home = { - programs.home-manager.enable = true; - programs.git = { - enable = true; - userName = "${userfullname}"; - userEmail = "${useremail}"; - signing = { - format = "ssh"; - signByDefault = true; - key = "/home/${username}/.ssh/id_ed25519"; - }; - extraConfig = { - push.autoSetupRemote = true; - gpg.ssh.allowedSignersFile = - (pkgs.writeText "allowed_signers" '' - imxyy1soope1@gmail.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOEFLUkyeaK8ZPPZdVNEmtx8zvoxi7xqS2Z6oxRBuUPO imxyy@imxyy-nix - imxyy@imxyy.top ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOEFLUkyeaK8ZPPZdVNEmtx8zvoxi7xqS2Z6oxRBuUPO imxyy@imxyy-nix - '').outPath; - }; - }; - programs.lazygit = { - enable = true; - }; - home.packages = with pkgs; [ lsd fd @@ -81,8 +58,6 @@ lib.my.makeSwitch { aria2 socat - nix-output-monitor - tmux trash-cli @@ -90,8 +65,6 @@ lib.my.makeSwitch { cht-sh dooit - - # translate-shell ]; xdg.configFile."tmux/tmux.conf".source = ./tmux.conf; }; diff --git a/modules/cli/vcs/all.nix b/modules/cli/vcs/all.nix new file mode 100644 index 0000000..b84261e --- /dev/null +++ b/modules/cli/vcs/all.nix @@ -0,0 +1,16 @@ +{ config, lib, ... }: +lib.my.makeSwitch { + inherit config; + optionName = "all command line tools"; + optionPath = [ + "cli" + "vcs" + "all" + ]; + config' = { + my.cli.vcs = { + git.enable = true; + jj.enable = true; + }; + }; +} diff --git a/modules/cli/vcs/git.nix b/modules/cli/vcs/git.nix new file mode 100644 index 0000000..bfbd928 --- /dev/null +++ b/modules/cli/vcs/git.nix @@ -0,0 +1,42 @@ +{ + config, + lib, + pkgs, + username, + userfullname, + useremail, + ... +}: +lib.my.makeHomeProgramConfig { + inherit config; + programName = "git"; + optionPath = [ + "cli" + "vcs" + "git" + ]; + extraConfig = { + my.home = { + programs.git = { + userName = "${userfullname}"; + userEmail = "${useremail}"; + signing = { + format = "ssh"; + signByDefault = true; + key = "/home/${username}/.ssh/id_ed25519"; + }; + extraConfig = { + push.autoSetupRemote = true; + gpg.ssh.allowedSignersFile = + (pkgs.writeText "allowed_signers" '' + imxyy1soope1@gmail.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOEFLUkyeaK8ZPPZdVNEmtx8zvoxi7xqS2Z6oxRBuUPO imxyy@imxyy-nix + imxyy@imxyy.top ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOEFLUkyeaK8ZPPZdVNEmtx8zvoxi7xqS2Z6oxRBuUPO imxyy@imxyy-nix + '').outPath; + }; + }; + programs.lazygit = { + enable = true; + }; + }; + }; +} diff --git a/modules/cli/vcs/jj.nix b/modules/cli/vcs/jj.nix new file mode 100644 index 0000000..1101143 --- /dev/null +++ b/modules/cli/vcs/jj.nix @@ -0,0 +1,45 @@ +{ + config, + lib, + pkgs, + userfullname, + useremail, + ... +}: +lib.my.makeHomeProgramConfig { + inherit config; + programName = "jujutsu"; + optionPath = [ + "cli" + "vcs" + "jj" + ]; + extraConfig = { + my.home = { + programs.jujutsu = { + settings = { + user = { + name = "${userfullname}"; + email = "${useremail}"; + }; + ui = { + graph.style = "square"; + default-command = "status"; + }; + }; + }; + /* programs.zsh.initContent = lib.mkAfter '' + fpath+=${ + pkgs.fetchFromGitHub { + owner = "rkh"; + repo = "zsh-jj"; + rev = "b6453d6ff5d233d472e5088d066c6469eb05c71b"; + hash = "sha256-GDHTp53uHAcyVG+YI3Q7PI8K8M3d3i2+C52zxnKbSmw="; + } + }/functions + zstyle ':vcs_info:*' enable jj + ''; */ + home.packages = [ pkgs.lazyjj ]; + }; + }; +}