feat: refactored home manager

This commit is contained in:
Nick 2025-01-19 23:40:54 -06:00
parent 65417d1809
commit 376c1d7b18
511 changed files with 1777 additions and 772 deletions

View file

@ -0,0 +1,10 @@
let
content = builtins.readDir ./.;
dirContent = builtins.filter (n: content.${n} == "directory") (builtins.attrNames content);
importList = map (name: ./. + "/${name}") dirContent;
in
{
imports = importList;
}

View file

@ -0,0 +1,15 @@
{
programs.nushell = {
enable = true;
configFile.text = ''
sleep 7ms
$env.config = {show_banner: false}
'';
shellAliases = {
y = "yy";
lg = "lazygit";
yt = "yt-dlp --embed-chapters";
ze = "zellij";
};
};
}

View file

@ -0,0 +1,86 @@
{
flake,
lib,
...
}:
let
inherit (flake.config.aesthetics.themes)
currentTheme
palettes
;
el = palettes.${currentTheme}.colours;
makeColor = c: "#" + c;
makeStyle = bg: fg: "bg:" + bg + " fg:" + fg + " bold";
surround =
fg: text:
"[](fg:"
+ makeColor el.base00
+ " bg:"
+ fg
+ ")"
+ "[](fg:"
+ fg
+ ")"
+ text
+ "[](fg:"
+ fg
+ ")";
in
{
add_newline = false;
character =
let
makeChar =
bg: c:
surround (makeColor bg) ("[" + c + "](" + makeStyle (makeColor bg) (makeColor el.base11) + ")");
in
{
error_symbol = makeChar el.base12 "";
format = "$symbol";
success_symbol = makeChar el.base0C "λ";
};
cmd_duration = {
format = surround (makeColor el.base0E) "[ $duration]($style)";
min_time = 0;
show_milliseconds = true;
style = makeStyle (makeColor el.base0E) (makeColor el.base11);
};
directory = {
format = surround (makeColor el.base0D) "[󰉋 $path]($style)[$read_only]($read_only_style)";
read_only = " ";
read_only_style = makeStyle (makeColor el.base0D) (makeColor el.base11);
style = makeStyle (makeColor el.base0D) (makeColor el.base11);
truncation_length = 1;
truncate_to_repo = false;
};
git_branch = {
format = surround (makeColor el.base09) "[$symbol $branch]($style)";
style = makeStyle (makeColor el.base09) (makeColor el.base11);
symbol = "";
};
git_status = {
format = "[ \\[$all_status$ahead_behind\\]]($style)";
style = makeStyle (makeColor el.base0A) (makeColor el.base11);
};
hostname = {
format = surround (makeColor el.base16) "[$ssh_symbol$hostname]($style)";
ssh_symbol = "󰖟 ";
style = makeStyle (makeColor el.base16) (makeColor el.base11);
};
pijul_channel = {
disabled = false;
format = surround (makeColor el.base09) "[$symbol $channel]($style)";
style = makeStyle (makeColor el.base09) (makeColor el.base11);
symbol = "";
};
format = lib.concatStrings [
"$hostname"
"$directory"
"$pijul_channel"
"$git_branch"
"$cmd_duration"
"$character "
];
}

View file

@ -0,0 +1,20 @@
{
flake,
lib,
...
}:
let
configPath = ./config;
settingsPath = import (configPath + /settings.nix) {
inherit
flake
lib
;
};
in
{
programs.starship = {
enable = true;
settings = settingsPath;
};
}

View file

@ -0,0 +1,6 @@
{
programs.zellij = {
enable = true;
settings.theme = "catppuccin-macchiato";
};
}

View file

@ -0,0 +1,10 @@
{ pkgs, ... }:
{
programs.zoxide = {
enable = true;
enableNushellIntegration = true;
package = pkgs.zoxide;
options = [
];
};
}