Remove git in favor of jj

This commit is contained in:
TheWanderingCrow 2025-10-26 09:56:28 -04:00
parent 1792a4f149
commit 2a1f90615b
5 changed files with 122 additions and 125 deletions

View file

@ -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;

View file

@ -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;

View file

@ -1,5 +1,7 @@
{config, ...}: {
programs.starship = let
{ config, ... }:
{
programs.starship =
let
raisin_black = "#262932";
blood_red = "#710000";
rich_lemon = "#FDF500";
@ -9,12 +11,13 @@
frostbite = "#E455AE";
steel_pink = "#CB1DCD";
pale_silver = "#D1C5C0";
in {
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})";
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
@ -38,17 +41,12 @@
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}";
};
git_commit.disabled = true;
git_metrics.disabled = true;
git_branch.disabled = true;
git_status.disabled = true;
nix_shell = {
disabled = false;
format = "[$symbol $name]($style)";

View file

@ -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";
};
};
}

View file

@ -4,11 +4,12 @@
config,
lib,
...
}: let
}:
let
hostSpec = config.hostSpec;
pubKeys = lib.filesystem.listFilesRecursive ./keys;
in
{
{
users.users.${hostSpec.username} = {
name = hostSpec.username;
shell = pkgs.zsh;
@ -16,23 +17,24 @@ in
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
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") {
}
// lib.optionalAttrs (inputs ? "home-manager") {
home-manager = {
extraSpecialArgs = {
inherit pkgs inputs;
@ -40,7 +42,7 @@ in
};
users.${hostSpec.username}.imports = lib.flatten [
(
{config, ...}:
{ config, ... }:
import (lib.custom.relativeToRoot "home/${hostSpec.username}/${hostSpec.hostName}.nix") {
inherit
pkgs
@ -53,4 +55,4 @@ in
)
];
};
}
}