nix-infra/common/home_manager/common.nix

122 lines
3.3 KiB
Nix

{ pkgs, config, lib, ... }:
let
home-manager = builtins.fetchTarball
"https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz";
in {
imports =
[ (import "${home-manager}/nixos") ../../common/home_manager/helix.nix ];
home-manager.useGlobalPkgs = true;
home-manager.users.agatha = {
home.username = "agatha";
home.homeDirectory = "/home/agatha";
home.stateVersion = config.system.stateVersion;
home.packages = with pkgs; [
bat
btop
choose
exa
fzf
gnupg
ouch
ripgrep
tealdeer
zoxide
];
programs = {
home-manager.enable = true;
git = {
enable = true;
userName = "Agatha V. Lovelace";
userEmail = "agatha@technogothic.net";
signing.key = "33185E0D62AD7294379947D4C37ABADDB597BCA1";
signing.signByDefault = true;
aliases = {
plog =
"log --graph --pretty=format:'%h -%d %s -%an %n' --abbrev-commit --date=relative --branches";
pfusch = "push --force-with-lease";
stat = "diff --compact-summary";
undo = "reset --soft HEAD~";
};
extraConfig = {
init = { defaultBranch = "mistress"; };
core = { editor = "hx"; };
};
};
starship = {
enable = true;
settings = {
add_newline = false;
format = lib.concatStrings [
"[$hostname](bold red)"
"$character"
"$directory"
];
right_format =
lib.concatStrings [ "$git_branch" " " "$cmd_duration" ];
character = {
success_symbol = "";
error_symbol = "[ ](purple)";
};
directory = {
truncation_length = 2;
fish_style_pwd_dir_length = 1;
read_only = " ";
style = "cyan";
read_only_style = "cyan";
};
cmd_duration = { min_time = 10000; };
git_branch = {
format = "$symbol $branch";
symbol = "";
};
hostname = {
ssh_only = false;
format = "$hostname";
};
};
};
fish = {
enable = true;
interactiveShellInit = builtins.readFile (pkgs.fetchurl {
url =
"https://git.lain.faith/sorceress/dotfiles/raw/commit/80be649e9663e3db67041192c714329e20b10cc9/.config/fish/config.fish";
sha256 = "sha256-ZZCTXnRZfotksiJj7iVJnLz+XnWHTlIsZzv3gbbZoRQ=";
});
plugins = [
{
name = "fzf";
src = pkgs.fetchFromGitHub {
owner = "jethrokuan";
repo = "fzf";
rev = "479fa67d7439b23095e01b64987ae79a91a4e283";
sha256 = "0k6l21j192hrhy95092dm8029p52aakvzis7jiw48wnbckyidi6v";
};
}
{
name = "pisces";
src = pkgs.fetchFromGitHub {
owner = "laughedelic";
repo = "pisces";
rev = "e45e0869855d089ba1e628b6248434b2dfa709c4";
sha256 = "073wb83qcn0hfkywjcly64k6pf0d7z5nxxwls5sa80jdwchvd2rs";
};
}
];
};
command-not-found.enable = false;
nix-index = {
enable = true;
enableFishIntegration = true;
};
};
};
}