feat: move git to module
This commit is contained in:
parent
1b546b236b
commit
dc4f1537d8
@ -17,7 +17,7 @@
|
||||
|
||||
# Specify your home configuration modules here, for example,
|
||||
# the path to your home.nix.
|
||||
modules = [ ./yadunut-mbp/home.nix ./modules/zsh.nix ./modules/neovim.nix ];
|
||||
modules = [ ./yadunut-mbp/home.nix ./modules/zsh.nix ./modules/neovim.nix ./modules/git.nix ];
|
||||
|
||||
# Optionally use extraSpecialArgs
|
||||
# to pass through arguments to home.nix
|
||||
|
27
modules/git.nix
Normal file
27
modules/git.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userEmail = "yadunand@yadunut.com";
|
||||
userName = "Yadunand Prem";
|
||||
delta.enable = true;
|
||||
lfs.enable = true;
|
||||
extraConfig = {
|
||||
init.defautBranch = "main";
|
||||
|
||||
pull.rebase = true;
|
||||
pull.autostash = true;
|
||||
|
||||
rebase.autostash = true;
|
||||
|
||||
core.excludefile = "~/.gitignore_global";
|
||||
|
||||
push.autoSetupRemote = true;
|
||||
|
||||
|
||||
commit.gpgsign = true;
|
||||
commit.verbose = true;
|
||||
|
||||
gpg.format = "ssh";
|
||||
};
|
||||
};
|
||||
}
|
@ -3,6 +3,11 @@
|
||||
|
||||
home.packages = [
|
||||
pkgs.zsh-completions
|
||||
pkgs.bat
|
||||
pkgs.fd
|
||||
pkgs.htop
|
||||
pkgs.ripgrep
|
||||
pkgs.wget
|
||||
];
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
@ -24,13 +29,20 @@
|
||||
];
|
||||
};
|
||||
shellAliases = {
|
||||
lg = "lazygit";
|
||||
cat = "bat";
|
||||
diff = "delta";
|
||||
s = "kitty +kitten ssh";
|
||||
};
|
||||
};
|
||||
|
||||
programs.fzf.enable = true;
|
||||
programs.fzf.enableZshIntegration = true;
|
||||
|
||||
programs.zoxide.enable = true;
|
||||
programs.zoxide.enableZshIntegration = true;
|
||||
|
||||
programs.eza.enable = true;
|
||||
programs.eza.enableZshIntegration = true;
|
||||
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
|
@ -18,18 +18,14 @@
|
||||
# The home.packages option allows you to install Nix packages into your
|
||||
# environment.
|
||||
home.packages = [
|
||||
pkgs.bat
|
||||
pkgs.beancount
|
||||
pkgs.coq
|
||||
pkgs.delta
|
||||
# pkgs.dive
|
||||
pkgs.entr
|
||||
pkgs.fava
|
||||
pkgs.fd
|
||||
pkgs.htop
|
||||
pkgs.ripgrep
|
||||
pkgs.typst
|
||||
pkgs.wget
|
||||
pkgs.lazygit
|
||||
|
||||
# Neovim deps
|
||||
# pkgs.texlab
|
||||
@ -64,6 +60,11 @@
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
programs.zsh.shellAliases = {
|
||||
lg = "lazygit";
|
||||
s = "kitty +kitten ssh";
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
@ -73,22 +74,20 @@
|
||||
};
|
||||
};
|
||||
|
||||
programs.fzf.enable = true;
|
||||
programs.fzf.enableZshIntegration = true;
|
||||
|
||||
programs.zoxide.enable = true;
|
||||
programs.zoxide.enableZshIntegration = true;
|
||||
|
||||
programs.eza.enable = true;
|
||||
programs.eza.enableZshIntegration = true;
|
||||
|
||||
programs.kitty.shellIntegration.enableZshIntegration = true;
|
||||
programs.emacs.enable = true;
|
||||
|
||||
programs.lazygit.enable = true;
|
||||
|
||||
programs.neovim.enable = true;
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
programs.git.extraConfig = {
|
||||
gpg.ssh.program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign";
|
||||
user.signingkey = "~/.ssh/yadunut_ed25519.pub";
|
||||
};
|
||||
|
||||
programs.gh = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user