mirror of
https://github.com/thegeneralist01/config.git
synced 2026-03-07 10:59:55 +01:00
new stuff
This commit is contained in:
parent
6014ad7d7a
commit
01c8bfce80
18 changed files with 721 additions and 285 deletions
|
|
@ -1,71 +1,106 @@
|
|||
{ config, pkgs, lib, ... }: let
|
||||
inherit (lib) readFile getExe mkIf optionalAttrs;
|
||||
in {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
readFile
|
||||
getExe
|
||||
mkAfter
|
||||
mkIf
|
||||
optionalAttrs
|
||||
;
|
||||
in
|
||||
{
|
||||
# TODO: starship + change the zoxide src
|
||||
# TODO: Rust tooling
|
||||
environment = optionalAttrs config.onLinux {
|
||||
sessionVariables.SHELLS = [ (getExe pkgs.nushell) (getExe pkgs.zsh) ];
|
||||
} // {
|
||||
shells = mkIf (!config.onLinux) [ pkgs.nushell pkgs.zsh ];
|
||||
environment =
|
||||
optionalAttrs config.onLinux {
|
||||
sessionVariables.SHELLS = [
|
||||
(getExe pkgs.nushell)
|
||||
(getExe pkgs.zsh)
|
||||
];
|
||||
}
|
||||
// {
|
||||
shells = mkIf (!config.onLinux) [
|
||||
pkgs.nushell
|
||||
pkgs.zsh
|
||||
];
|
||||
|
||||
systemPackages = with pkgs; [
|
||||
nushell
|
||||
fish
|
||||
zoxide
|
||||
vivid
|
||||
ripgrep
|
||||
yazi
|
||||
jq
|
||||
yq-go
|
||||
eza
|
||||
fzf
|
||||
gh
|
||||
fastfetch
|
||||
carapace
|
||||
];
|
||||
systemPackages = with pkgs; [
|
||||
nushell
|
||||
fish
|
||||
zoxide
|
||||
vivid
|
||||
ripgrep
|
||||
yazi
|
||||
jq
|
||||
yq-go
|
||||
eza
|
||||
fzf
|
||||
gh
|
||||
fastfetch
|
||||
carapace
|
||||
bat
|
||||
bat-extras.core
|
||||
];
|
||||
|
||||
shellAliases = {
|
||||
v = "nvim .";
|
||||
ff = "fastfetch --load-config examples/10.jsonc";
|
||||
g = "glimpse --interactive -o both -f llm.md";
|
||||
gg = "open llm.md | save -r /dev/stdout | ^xclip -sel c";
|
||||
rn = "yazi";
|
||||
c = "clear";
|
||||
e = "exa";
|
||||
el = "exa -la";
|
||||
l = "ls -a";
|
||||
ll = "ls -la";
|
||||
cl = "c; l";
|
||||
ap = "cd ~/personal";
|
||||
ad = "cd ~/Downloads";
|
||||
ab = "cd ~/books";
|
||||
a = "cd ~";
|
||||
ah = "cd ~/dotfiles/hosts/thegeneralist";
|
||||
ai3 = "nvim /home/thegeneralist/dotfiles/hosts/thegeneralist/dotfiles/i3/config";
|
||||
rb = "nh os switch . -v -- --show-trace --verbose";
|
||||
shellAliases = {
|
||||
v = "nvim .";
|
||||
vi = "vim";
|
||||
vim = "nvim";
|
||||
|
||||
ff = "fastfetch --load-config examples/10.jsonc";
|
||||
|
||||
g = "glimpse --interactive -o both -f llm.md";
|
||||
gg = "open llm.md | save -r /dev/stdout | ^xclip -sel c";
|
||||
rn = "yazi";
|
||||
cat = "bat";
|
||||
c = "clear";
|
||||
e = "exa";
|
||||
ea = "exa -a";
|
||||
el = "exa -la";
|
||||
l = "ls -a";
|
||||
la = "ls -a";
|
||||
ll = "ls -la";
|
||||
cl = "c; l";
|
||||
ap = "cd ~/personal";
|
||||
ad = "cd ~/Downloads";
|
||||
ab = "cd ~/books";
|
||||
a = "cd ~";
|
||||
ah = "cd ~/dotfiles/hosts/thegeneralist";
|
||||
ai3 = "nvim /home/thegeneralist/dotfiles/hosts/thegeneralist/dotfiles/i3/config";
|
||||
rb = "nh os switch . -v -- --show-trace --verbose";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.sharedModules = [
|
||||
({
|
||||
home.file = {
|
||||
".zshrc" = let
|
||||
configFile = ./config.nu;
|
||||
envFile = ./env.nu;
|
||||
in {
|
||||
text = "exec nu --env-config ${envFile} --config ${configFile}";
|
||||
force = true;
|
||||
{
|
||||
home = {
|
||||
sessionPath = [ "$HOME/.amp/bin" "$HOME/.npm-packages/bin" "/opt/homebrew/bin" ];
|
||||
file = {
|
||||
".zshrc" =
|
||||
let
|
||||
configFile = ./config.nu;
|
||||
envFile = ./env.nu;
|
||||
in
|
||||
{
|
||||
text = "exec nu --env-config ${envFile} --config ${configFile}";
|
||||
force = true;
|
||||
};
|
||||
|
||||
".config/nushell/zoxide.nu".source = pkgs.runCommand "zoxide.nu" { } ''
|
||||
${getExe pkgs.zoxide} init nushell --cmd cd > $out
|
||||
'';
|
||||
|
||||
".config/nushell/ls_colors.txt".source = pkgs.runCommand "ls_colors.txt" { } ''
|
||||
${getExe pkgs.vivid} generate gruvbox-dark-hard > $out
|
||||
'';
|
||||
};
|
||||
|
||||
".config/nushell/zoxide.nu".source = pkgs.runCommand "zoxide.nu" {} ''
|
||||
${getExe pkgs.zoxide} init nushell --cmd cd > $out
|
||||
'';
|
||||
|
||||
".config/nushell/ls_colors.txt".source = pkgs.runCommand "ls_colors.txt" {} ''
|
||||
${getExe pkgs.vivid} generate gruvbox-dark-hard > $out
|
||||
'';
|
||||
};
|
||||
})
|
||||
}
|
||||
(homeArgs: {
|
||||
programs.nushell = {
|
||||
enable = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue