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,
|
# Specify your home configuration modules here, for example,
|
||||||
# the path to your home.nix.
|
# 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
|
# Optionally use extraSpecialArgs
|
||||||
# to pass through arguments to home.nix
|
# 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 = [
|
home.packages = [
|
||||||
pkgs.zsh-completions
|
pkgs.zsh-completions
|
||||||
|
pkgs.bat
|
||||||
|
pkgs.fd
|
||||||
|
pkgs.htop
|
||||||
|
pkgs.ripgrep
|
||||||
|
pkgs.wget
|
||||||
];
|
];
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -24,13 +29,20 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
lg = "lazygit";
|
|
||||||
cat = "bat";
|
cat = "bat";
|
||||||
diff = "delta";
|
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 = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
|
@ -18,18 +18,14 @@
|
|||||||
# The home.packages option allows you to install Nix packages into your
|
# The home.packages option allows you to install Nix packages into your
|
||||||
# environment.
|
# environment.
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.bat
|
|
||||||
pkgs.beancount
|
pkgs.beancount
|
||||||
pkgs.coq
|
pkgs.coq
|
||||||
pkgs.delta
|
pkgs.delta
|
||||||
# pkgs.dive
|
# pkgs.dive
|
||||||
pkgs.entr
|
pkgs.entr
|
||||||
pkgs.fava
|
pkgs.fava
|
||||||
pkgs.fd
|
|
||||||
pkgs.htop
|
|
||||||
pkgs.ripgrep
|
|
||||||
pkgs.typst
|
pkgs.typst
|
||||||
pkgs.wget
|
pkgs.lazygit
|
||||||
|
|
||||||
# Neovim deps
|
# Neovim deps
|
||||||
# pkgs.texlab
|
# pkgs.texlab
|
||||||
@ -64,6 +60,11 @@
|
|||||||
EDITOR = "nvim";
|
EDITOR = "nvim";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.zsh.shellAliases = {
|
||||||
|
lg = "lazygit";
|
||||||
|
s = "kitty +kitten ssh";
|
||||||
|
};
|
||||||
|
|
||||||
programs.direnv = {
|
programs.direnv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableZshIntegration = 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.kitty.shellIntegration.enableZshIntegration = true;
|
||||||
programs.emacs.enable = true;
|
programs.emacs.enable = true;
|
||||||
|
|
||||||
programs.lazygit.enable = true;
|
|
||||||
|
|
||||||
programs.neovim.enable = true;
|
programs.neovim.enable = true;
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
programs.home-manager.enable = true;
|
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