From 2a1f90615b2e5cf541977dfee82ae176227eb5bf Mon Sep 17 00:00:00 2001 From: TheWanderingCrow Date: Sun, 26 Oct 2025 09:56:28 -0400 Subject: [PATCH] Remove git in favor of jj --- home/crow/common/core/git.nix | 34 +++---- home/crow/common/core/nushell.nix | 7 +- home/crow/common/core/starship.nix | 122 ++++++++++++------------- hosts/common/core/shell.nix | 4 +- hosts/common/users/primary/default.nix | 80 ++++++++-------- 5 files changed, 122 insertions(+), 125 deletions(-) diff --git a/home/crow/common/core/git.nix b/home/crow/common/core/git.nix index 49ae95a..06c8fbb 100644 --- a/home/crow/common/core/git.nix +++ b/home/crow/common/core/git.nix @@ -1,21 +1,21 @@ { - programs.git = { - enable = true; - userName = "TheWanderingCrow"; - userEmail = "contact@wanderingcrow.net"; - extraConfig = { - init = { - defaultBranch = "main"; - }; - push = { - autoSetupRemote = true; - }; - }; - lfs = { - enable = true; - skipSmudge = true; - }; - }; + # programs.git = { + # enable = true; + # userName = "TheWanderingCrow"; + # userEmail = "contact@wanderingcrow.net"; + # extraConfig = { + # init = { + # defaultBranch = "main"; + # }; + # push = { + # autoSetupRemote = true; + # }; + # }; + # lfs = { + # enable = true; + # skipSmudge = true; + # }; + # }; programs.jujutsu = { enable = true; diff --git a/home/crow/common/core/nushell.nix b/home/crow/common/core/nushell.nix index 6518a55..b3093a2 100644 --- a/home/crow/common/core/nushell.nix +++ b/home/crow/common/core/nushell.nix @@ -2,14 +2,11 @@ config, lib, ... -}: { +}: +{ programs = { nushell = { enable = true; - shellAliases = { - set-nixpkgs-upstream = "git remote add upstream https://github.com/NixOS/nixpkgs.git"; - nup = "sudo nixos-rebuild switch --flake ."; - }; }; carapace = { enable = true; diff --git a/home/crow/common/core/starship.nix b/home/crow/common/core/starship.nix index 1ac420d..2959f8b 100644 --- a/home/crow/common/core/starship.nix +++ b/home/crow/common/core/starship.nix @@ -1,67 +1,65 @@ -{config, ...}: { - programs.starship = let - raisin_black = "#262932"; - blood_red = "#710000"; - rich_lemon = "#FDF500"; - keppel = "#1AC5B0"; - electric_blue = "#36EBF3"; - blushing_purple = "#9370DB"; - frostbite = "#E455AE"; - steel_pink = "#CB1DCD"; - pale_silver = "#D1C5C0"; - in { - enable = true; - enableZshIntegration = true; - enableNushellIntegration = true; - settings = { - format = "[ ](${rich_lemon})[ CrOS](bg:${rich_lemon} fg:${raisin_black})$username$hostname[ ](fg:${rich_lemon} bg:${blushing_purple})$directory[ ](fg:${blushing_purple} bg:${frostbite})$git_branch$git_status[ ](fg:${frostbite} bg:${steel_pink})$nix_shell[ ](${steel_pink})"; - right_format = "[ ](${rich_lemon})$time[ ](${rich_lemon})"; +{ config, ... }: +{ + programs.starship = + let + raisin_black = "#262932"; + blood_red = "#710000"; + rich_lemon = "#FDF500"; + keppel = "#1AC5B0"; + electric_blue = "#36EBF3"; + blushing_purple = "#9370DB"; + frostbite = "#E455AE"; + steel_pink = "#CB1DCD"; + pale_silver = "#D1C5C0"; + in + { + enable = true; + enableZshIntegration = true; + enableNushellIntegration = true; + settings = { + format = "[ ](${rich_lemon})[ CrOS](bg:${rich_lemon} fg:${raisin_black})$username$hostname[ ](fg:${rich_lemon} bg:${blushing_purple})$directory[ ](fg:${blushing_purple} bg:${frostbite})[ ](fg:${frostbite} bg:${steel_pink})$nix_shell[ ](${steel_pink})"; + right_format = "[ ](${rich_lemon})$time[ ](${rich_lemon})"; - # Left Modules - username = { - disabled = false; - format = "[ $user]($style)"; - style_user = "fg:${keppel} bg:${rich_lemon}"; - style_root = "fg:${blood_red} bg:${rich_lemon}"; - }; - hostname = { - disabled = false; - format = "[@$hostname ]($style)"; - style = "fg:${keppel} bg:${rich_lemon}"; - ssh_only = false; - ssh_symbol = ""; - }; - directory = { - disabled = false; - format = "[ $path ]($style)"; - style = "bg:${blushing_purple} fg:${raisin_black}"; - truncation_length = 3; - truncation_symbol = "…/"; - }; - git_branch = { - disabled = false; - format = "[ $symbol $branch ]($style)"; - symbol = ""; - style = "fg:${raisin_black} bg:${frostbite}"; - }; - git_status = { - disabled = false; - format = "[$all_status$ahead_behind]($style)"; - style = "fg:${raisin_black} bg:${frostbite}"; - }; - nix_shell = { - disabled = false; - format = "[$symbol $name]($style)"; - style = "bg:${steel_pink} fg:${electric_blue}"; - symbol = ""; - }; + # Left Modules + username = { + disabled = false; + format = "[ $user]($style)"; + style_user = "fg:${keppel} bg:${rich_lemon}"; + style_root = "fg:${blood_red} bg:${rich_lemon}"; + }; + hostname = { + disabled = false; + format = "[@$hostname ]($style)"; + style = "fg:${keppel} bg:${rich_lemon}"; + ssh_only = false; + ssh_symbol = ""; + }; + directory = { + disabled = false; + format = "[ $path ]($style)"; + style = "bg:${blushing_purple} fg:${raisin_black}"; + truncation_length = 3; + truncation_symbol = "…/"; + }; - # Right Modules - time = { - disabled = false; - format = "[$time]($style)"; - style = "fg:${raisin_black} bg:${rich_lemon}"; + git_commit.disabled = true; + git_metrics.disabled = true; + git_branch.disabled = true; + git_status.disabled = true; + + nix_shell = { + disabled = false; + format = "[$symbol $name]($style)"; + style = "bg:${steel_pink} fg:${electric_blue}"; + symbol = ""; + }; + + # Right Modules + time = { + disabled = false; + format = "[$time]($style)"; + style = "fg:${raisin_black} bg:${rich_lemon}"; + }; }; }; - }; } diff --git a/hosts/common/core/shell.nix b/hosts/common/core/shell.nix index de32460..02b181e 100644 --- a/hosts/common/core/shell.nix +++ b/hosts/common/core/shell.nix @@ -3,7 +3,8 @@ lib, pkgs, ... -}: { +}: +{ programs.zsh = { enable = true; enableCompletion = true; @@ -17,7 +18,6 @@ }; shellAliases = { lah = "ls -lah"; - set-nixpkgs-upstream = "git remote add upstream https://github.com/NixOS/nixpkgs.git"; }; }; } diff --git a/hosts/common/users/primary/default.nix b/hosts/common/users/primary/default.nix index e01c903..a8d7462 100644 --- a/hosts/common/users/primary/default.nix +++ b/hosts/common/users/primary/default.nix @@ -4,53 +4,55 @@ config, lib, ... -}: let +}: +let hostSpec = config.hostSpec; pubKeys = lib.filesystem.listFilesRecursive ./keys; in - { - users.users.${hostSpec.username} = { - name = hostSpec.username; - shell = pkgs.zsh; +{ + users.users.${hostSpec.username} = { + name = hostSpec.username; + shell = pkgs.zsh; - openssh.authorizedKeys.keys = lib.lists.forEach pubKeys (key: builtins.readFile key); - }; - # Create ssh sockets directory for controlpaths when homemanager not loaded (i.e. isMinimal) - systemd.tmpfiles.rules = let + openssh.authorizedKeys.keys = lib.lists.forEach pubKeys (key: builtins.readFile key); + }; + # Create ssh sockets directory for controlpaths when homemanager not loaded (i.e. isMinimal) + systemd.tmpfiles.rules = + let user = config.users.users.${hostSpec.username}.name; group = config.users.users.${hostSpec.username}.group; - in [ + in + [ "d /home/${hostSpec.username}/.ssh 0750 ${user} ${group} -" "d /home/${hostSpec.username}/.ssh/sockets 0750 ${user} ${group} -" ]; - programs.zsh.enable = true; - environment.systemPackages = [ - pkgs.git - pkgs.jujutsu - pkgs.vim - pkgs.just - ]; - } - // lib.optionalAttrs (inputs ? "home-manager") { - home-manager = { - extraSpecialArgs = { - inherit pkgs inputs; - hostSpec = config.hostSpec; - }; - users.${hostSpec.username}.imports = lib.flatten [ - ( - {config, ...}: - import (lib.custom.relativeToRoot "home/${hostSpec.username}/${hostSpec.hostName}.nix") { - inherit - pkgs - inputs - config - lib - hostSpec - ; - } - ) - ]; + programs.zsh.enable = true; + environment.systemPackages = [ + pkgs.jujutsu + pkgs.vim + pkgs.just + ]; +} +// lib.optionalAttrs (inputs ? "home-manager") { + home-manager = { + extraSpecialArgs = { + inherit pkgs inputs; + hostSpec = config.hostSpec; }; - } + users.${hostSpec.username}.imports = lib.flatten [ + ( + { config, ... }: + import (lib.custom.relativeToRoot "home/${hostSpec.username}/${hostSpec.hostName}.nix") { + inherit + pkgs + inputs + config + lib + hostSpec + ; + } + ) + ]; + }; +}