2022-04-05 10:03:33 +03:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
secrets = import ./secrets.nix;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
# Home Manager needs a bit of information about you and the
|
|
|
|
# paths it should manage.
|
2022-04-05 11:26:26 +03:00
|
|
|
home.username = secrets.home.name;
|
|
|
|
home.homeDirectory = secrets.home.dir;
|
2022-04-05 10:03:33 +03:00
|
|
|
|
|
|
|
# This value determines the Home Manager release that your
|
|
|
|
# configuration is compatible with. This helps avoid breakage
|
|
|
|
# when a new Home Manager release introduces backwards
|
|
|
|
# incompatible changes.
|
|
|
|
#
|
|
|
|
# You can update Home Manager without changing this value. See
|
|
|
|
# the Home Manager release notes for a list of state version
|
|
|
|
# changes in each release.
|
|
|
|
home.stateVersion = "21.11";
|
|
|
|
|
|
|
|
# Let Home Manager install and manage itself.
|
|
|
|
programs.home-manager.enable = true;
|
2022-04-05 10:42:47 +03:00
|
|
|
|
2022-04-05 16:40:07 +03:00
|
|
|
programs.zsh = {
|
|
|
|
enable = true;
|
|
|
|
enableAutosuggestions = true;
|
|
|
|
defaultKeymap = "viins";
|
|
|
|
dotDir = ".config/zsh";
|
|
|
|
|
2022-04-05 17:02:37 +03:00
|
|
|
history = {
|
|
|
|
path = "${config.xdg.dataHome}/zsh/zsh_history";
|
|
|
|
expireDuplicatesFirst = true;
|
|
|
|
ignorePatterns = [
|
|
|
|
"rm *"
|
|
|
|
"kill *"
|
|
|
|
];
|
|
|
|
};
|
2022-04-05 16:40:07 +03:00
|
|
|
|
|
|
|
oh-my-zsh = {
|
|
|
|
enable = true;
|
|
|
|
theme = "robbyrussell";
|
|
|
|
};
|
2022-04-05 17:02:37 +03:00
|
|
|
|
|
|
|
initExtraFirst = ''
|
|
|
|
if [ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]; then
|
|
|
|
source $HOME/.nix-profile/etc/profile.d/nix.sh;
|
|
|
|
fi
|
|
|
|
|
|
|
|
source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh
|
|
|
|
|
|
|
|
export NIX_PATH=$HOME/.nix-defexpr/channels''${NIX_PATH:+:$NIX_PATH}
|
|
|
|
'';
|
2022-04-05 16:40:07 +03:00
|
|
|
};
|
|
|
|
|
2022-04-05 11:26:26 +03:00
|
|
|
programs.git = {
|
|
|
|
enable = true;
|
|
|
|
userName = secrets.git.name;
|
|
|
|
userEmail = secrets.git.email;
|
|
|
|
extraConfig = {
|
|
|
|
core.editor = "nvim";
|
|
|
|
init.defaultBranch = "main";
|
|
|
|
pull.rebase = true;
|
|
|
|
};
|
2022-04-05 12:55:49 +03:00
|
|
|
aliases = {
|
|
|
|
co = "checkout";
|
|
|
|
ci = "commit";
|
|
|
|
cia = "commit --amend";
|
|
|
|
cian = "commit --amend --no-edit";
|
|
|
|
st = "status -sb";
|
|
|
|
fpush = "push --force-with-lease";
|
|
|
|
};
|
2022-04-05 11:26:26 +03:00
|
|
|
};
|
|
|
|
|
2022-04-05 10:42:47 +03:00
|
|
|
programs.exa = {
|
|
|
|
enable = true;
|
2022-04-05 16:40:07 +03:00
|
|
|
enableAliases = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
xdg.configFile = {
|
|
|
|
"alacritty/alacritty.yml".source = ../programs/alacritty/alacritty.yml;
|
2022-04-05 10:42:47 +03:00
|
|
|
};
|
2022-04-05 10:03:33 +03:00
|
|
|
}
|