whole flake: cleanup

This commit is contained in:
Charlie Root 2024-11-02 17:45:34 +01:00
commit 57831df0d5
Signed by: faukah
SSH key fingerprint: SHA256:jpYIt4Vkz1NBTQcks/N9OPTfTFxE6KF2W/rV7hrfrIw
22 changed files with 330 additions and 437 deletions

View file

@ -1,15 +0,0 @@
{
config,
lib,
pkgs,
...
}: let
inherit (config.meta.mainUser) username;
in {
home-manager.users.${username}.programs.atuin = {
enable = true;
package = pkgs.atuin;
enableFishIntegration = true;
enableBashIntegration = true;
};
}

View file

@ -1,25 +0,0 @@
{
config,
lib,
pkgs,
...
}: let
inherit (config.modules.other.system) username;
inherit (lib) mkIf;
cfg = config.modules.system.programs.eza;
in {
config = mkIf cfg.enable {
home-manager.users.${username} = {
programs.eza = {
enable = true;
package = pkgs.eza;
git = true;
icons = "auto";
enableNushellIntegration = true;
enableBashIntegration = true;
enableFishIntegration = true;
enableZshIntegration = true;
};
};
};
}

View file

@ -1,69 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.programs.fish;
inherit (config.modules.other.system) username;
in {
options.modules.programs.fish = {
enable = mkEnableOption "fish";
extraAliases = mkOption {
type = types.attrs;
description = "extra shell aliases";
default = {};
};
};
config = mkIf cfg.enable {
programs.fish.enable = false;
# homix.".config/fish/config.fish".source = fishinit;
# users.users.${username}.shell = pkgs.fish;
environment = {
# shells = [pkgs.fish];
# pathsToLink = ["/share/fish"];
};
home-manager.users.${username} = {
programs = {
fish = {
enable = true;
interactiveShellInit = "set fish_greeting";
plugins = [
{
name = "sponge";
inherit (pkgs.fishPlugins.sponge) src;
}
{
name = "done";
inherit (pkgs.fishPlugins.done) src;
}
{
name = "puffer";
inherit (pkgs.fishPlugins.puffer) src;
}
];
shellAbbrs = {
c = "clear";
cc = "cd ~ && clear";
mv = "mv -iv";
rm = "trash -v";
ls = "eza ";
l = "eza -a ";
la = "eza -lha --git";
lg = "lazygit";
cd = "z";
v = "nvim";
h = "hx";
k = "kak";
e = "emacs";
};
};
};
};
};
}

View file

@ -1,13 +1,7 @@
_: {
imports = [
./fish.nix
./nh.nix
./starship.nix
./thefuck.nix
./zoxide.nix
./beets.nix
./atuin.nix
./zellij
./eza.nix
];
}

View file

@ -1,101 +0,0 @@
# Credits to raf, his flake is in the README.md
{
config,
lib,
...
}: let
inherit (builtins) map;
inherit (config.meta.mainUser) username;
hmCfg = config.home-manager.users.${username};
inherit (lib.strings) concatStrings;
in {
home-manager.users.${username} = let
elemsConcatted = concatStrings (
map (s: "\$${s}") [
"hostname"
"username"
"directory"
"shell"
"nix_shell"
"git_branch"
"git_commit"
"git_state"
"git_status"
"jobs"
"cmd_duration"
]
);
in {
home.sessionVariables = {
STARSHIP_CACHE = "${hmCfg.home.homeDirectory}/.cache/starship";
};
programs.starship = {
enable = true;
enableFishIntegration = true;
enableTransience = true;
settings = {
scan_timeout = 2;
command_timeout = 2000; # nixpkgs makes starship implode with lower values
add_newline = false;
line_break.disabled = false;
format = "${elemsConcatted}\n$character";
hostname = {
ssh_only = true;
disabled = false;
format = "@[$hostname](bold blue) "; # the whitespace at the end is actually important
};
# configure specific elements
character = {
error_symbol = "[](bold red)";
success_symbol = "[](bold green)";
vicmd_symbol = "[](bold yellow)";
format = "$symbol [|](bold bright-black) ";
};
username = {
format = "[$user]($style) in ";
};
directory = {
truncation_length = 2;
# removes the read_only symbol from the format, it doesn't play nicely with my folder icon
format = "[ ](bold green) [$path]($style) ";
};
# git
git_commit.commit_hash_length = 7;
git_branch.style = "bold purple";
git_status = {
style = "red";
ahead = " ";
behind = " ";
conflicted = " ";
renamed = "»";
deleted = " ";
diverged = " ";
modified = "!";
stashed = "";
staged = "+";
untracked = "?";
};
# language configurations
# the whitespaces at the end *are* necessary for proper formatting
lua.symbol = "[ ](blue) ";
python.symbol = "[ ](blue) ";
rust.symbol = "[ ](red) ";
nix_shell.symbol = "[󱄅 ](blue) ";
golang.symbol = "[󰟓 ](blue)";
c.symbol = "[ ](black)";
nodejs.symbol = "[󰎙 ](yellow)";
package.symbol = "📦 ";
};
};
};
}

View file

@ -1,24 +0,0 @@
{
config,
lib,
pkgs,
...
}: let
inherit (config.modules.other.system) username;
inherit (lib) mkIf;
cfg = config.modules.system.programs.oh-my-posh;
in {
config = mkIf cfg.enable {
home-manager.users.${username} = {
programs.thefuck = {
enable = true;
package = pkgs.thefuck;
enableInstantMode = true;
enableNushellIntegration = true;
enableBashIntegration = true;
enableFishIntegration = true;
enableZshIntegration = true;
};
};
};
}

View file

@ -1,24 +0,0 @@
{
config,
lib,
pkgs,
...
}: let
inherit (config.modules.other.system) username;
inherit (lib) mkIf;
cfg = config.modules.system.programs.eza;
in {
config = mkIf cfg.enable {
home-manager.users.${username} = {
programs.zoxide = {
enable = true;
package = pkgs.zoxide;
enableNushellIntegration = true;
enableBashIntegration = true;
enableFishIntegration = true;
enableZshIntegration = true;
};
};
};
}