From 662abbedb5bd47b6aba45680e6df63e95a2aac64 Mon Sep 17 00:00:00 2001 From: TheWanderingCrow Date: Wed, 28 Jan 2026 10:31:11 -0500 Subject: [PATCH] make slimmed down handler user for HandlerOne migration --- home/handler/HandlerOne.nix | 6 +++ home/handler/common/core/default.nix | 47 +++++++++++++++++++ home/handler/common/core/direnv.nix | 17 +++++++ home/handler/common/core/git.nix | 32 +++++++++++++ home/handler/common/core/starship.nix | 65 +++++++++++++++++++++++++++ home/handler/common/core/tmux.nix | 17 +++++++ 6 files changed, 184 insertions(+) create mode 100644 home/handler/HandlerOne.nix create mode 100644 home/handler/common/core/default.nix create mode 100644 home/handler/common/core/direnv.nix create mode 100644 home/handler/common/core/git.nix create mode 100644 home/handler/common/core/starship.nix create mode 100644 home/handler/common/core/tmux.nix diff --git a/home/handler/HandlerOne.nix b/home/handler/HandlerOne.nix new file mode 100644 index 0000000..e7263e3 --- /dev/null +++ b/home/handler/HandlerOne.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + imports = [ + common/core + ]; +} diff --git a/home/handler/common/core/default.nix b/home/handler/common/core/default.nix new file mode 100644 index 0000000..a19c9b1 --- /dev/null +++ b/home/handler/common/core/default.nix @@ -0,0 +1,47 @@ +{ + inputs, + config, + lib, + pkgs, + hostSpec, + ... +}: +let + platform = if hostSpec.isDarwin then "darwin" else "nixos"; +in +{ + imports = lib.flatten [ + (map lib.custom.relativeToRoot [ + "modules/common/host-spec.nix" + "modules/home" + ]) + #./${platform.nix} + ./direnv.nix + ./git.nix + ./tmux.nix + ./starship.nix + ]; + + home.packages = builtins.attrValues { + inherit (pkgs) + screen + ouch + ; + }; + + inherit hostSpec; + + home = { + username = lib.mkDefault config.hostSpec.username; + homeDirectory = lib.mkDefault config.hostSpec.home; + stateVersion = lib.mkDefault "24.05"; + + sessionVariables = { + SHELL = "zsh"; + TERM = "foot"; + TERMINAL = "foot"; + VISUAL = "nvim"; + EDITOR = "nvim"; + }; + }; +} diff --git a/home/handler/common/core/direnv.nix b/home/handler/common/core/direnv.nix new file mode 100644 index 0000000..bd6efe5 --- /dev/null +++ b/home/handler/common/core/direnv.nix @@ -0,0 +1,17 @@ +{ pkgs, ... }: +{ + home.packages = builtins.attrValues { + inherit (pkgs.unstable) + devenv + ; + }; + programs = { + zsh.enable = true; + direnv = { + enable = true; + nix-direnv.enable = true; + enableZshIntegration = true; + enableNushellIntegration = true; + }; + }; +} diff --git a/home/handler/common/core/git.nix b/home/handler/common/core/git.nix new file mode 100644 index 0000000..dfe2bab --- /dev/null +++ b/home/handler/common/core/git.nix @@ -0,0 +1,32 @@ +{ pkgs, ... }: +{ + # 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; + package = pkgs.unstable.jujutsu; + settings = { + user = { + email = "contact@wanderingcrow.net"; + name = "TheWanderingCrow"; + }; + ui.paginate = "never"; + }; + }; +} diff --git a/home/handler/common/core/starship.nix b/home/handler/common/core/starship.nix new file mode 100644 index 0000000..2959f8b --- /dev/null +++ b/home/handler/common/core/starship.nix @@ -0,0 +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})[ ](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_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/home/handler/common/core/tmux.nix b/home/handler/common/core/tmux.nix new file mode 100644 index 0000000..101e0ff --- /dev/null +++ b/home/handler/common/core/tmux.nix @@ -0,0 +1,17 @@ +{ + programs.tmux = { + enable = true; + keyMode = "vi"; + extraConfig = '' + bind | split-window -h + bind - split-window -v + unbind '"' + unbind % + + bind -n M-Left select-pane -L + bind -n M-Right select-pane -R + bind -n M-Up select-pane -U + bind -n M-Down select-pane -D + ''; + }; +}