Added git config and zsh p10k
Signed-off-by: Menno van Leeuwen <menno@vleeuwen.me>
This commit is contained in:
parent
c3b0297d6c
commit
6e6b402df3
@ -11,3 +11,7 @@ Tested on:
|
|||||||
```
|
```
|
||||||
curl -sSL https://raw.githubusercontent.com/vleeuwenmenno/dotfiles/master/setup.sh | bash -s -- "--install"
|
curl -sSL https://raw.githubusercontent.com/vleeuwenmenno/dotfiles/master/setup.sh | bash -s -- "--install"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Updating
|
||||||
|
To update you can run the alias `update` to pull and switch.
|
||||||
|
Afterwards you should reopen a new shell to see the applied changes.
|
26
config/gitconfig
Normal file
26
config/gitconfig
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
[gpg]
|
||||||
|
format = ssh
|
||||||
|
[gpg "ssh"]
|
||||||
|
program = /opt/1Password/op-ssh-sign
|
||||||
|
[commit]
|
||||||
|
gpgsign = true
|
||||||
|
|
||||||
|
[user]
|
||||||
|
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM+sKpcREOUjwMMSzEWAso6830wbOi8kUxqpuXWw5gHr
|
||||||
|
name = "Menno van Leeuwen"
|
||||||
|
email = "menno@vleeuwen.me"
|
||||||
|
|
||||||
|
[includeIf "gitdir:/home/menno/Projects/Sandwave/**"]
|
||||||
|
path = /home/menno/Projects/Sandwave/.gitconfig
|
||||||
|
|
||||||
|
[includeIf "gitdir:/home/menno/Projects/Personal/**"]
|
||||||
|
path = /home/menno/Projects/Personal/.gitconfig
|
||||||
|
|
||||||
|
[safe]
|
||||||
|
directory = *
|
||||||
|
|
||||||
|
[advice]
|
||||||
|
detachedHead = false
|
||||||
|
|
||||||
|
[push]
|
||||||
|
default = current
|
1683
config/p10k.zsh
Normal file
1683
config/p10k.zsh
Normal file
File diff suppressed because it is too large
Load Diff
66
home.nix
66
home.nix
@ -1,14 +1,20 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
fonts.fontconfig.enable = true;
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
username = "menno";
|
username = "menno";
|
||||||
homeDirectory = "/home/menno";
|
homeDirectory = "/home/menno";
|
||||||
stateVersion = "23.11";
|
stateVersion = "23.11";
|
||||||
|
|
||||||
packages = [
|
packages = with pkgs; [
|
||||||
pkgs.gnumake
|
gnumake
|
||||||
pkgs.btop
|
btop
|
||||||
pkgs.go
|
go
|
||||||
|
fortune
|
||||||
|
lsd
|
||||||
|
zsh
|
||||||
|
zsh-powerlevel10k
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -26,7 +32,57 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
userName = "Menno van Leeuwen";
|
userName = "Menno van Leeuwen";
|
||||||
userEmail = "menno@vleeuwen.me";
|
userEmail = "menno@vleeuwen.me";
|
||||||
|
includes = [ { path = "~/.dotfiles/config/gitconfig"; } ];
|
||||||
|
};
|
||||||
|
|
||||||
|
zsh = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
oh-my-zsh = {
|
||||||
|
enable = true;
|
||||||
|
plugins = [
|
||||||
|
"git"
|
||||||
|
"docker"
|
||||||
|
"1password"
|
||||||
|
"ubuntu"
|
||||||
|
"tmux"
|
||||||
|
"sudo"
|
||||||
|
"screen"
|
||||||
|
"adb"
|
||||||
|
"brew"
|
||||||
|
"ufw"
|
||||||
|
"zsh-interactive-cd"
|
||||||
|
"zsh-navigation-tools"
|
||||||
|
"yarn"
|
||||||
|
"vscode"
|
||||||
|
"composer"
|
||||||
|
"laravel"
|
||||||
|
"golang"
|
||||||
|
"httpie"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
shellAliases = {
|
||||||
|
l = "lsd -Sl --reverse --human-readable --group-directories-first";
|
||||||
|
update = "git -C ~/.dotfiles pull && home-manager switch --flake ~/.dotfiles";
|
||||||
|
docker-compose = "docker compose";
|
||||||
|
gg = "git pull";
|
||||||
|
gl = "git log --stat";
|
||||||
|
};
|
||||||
|
|
||||||
|
initExtra = "source ~/.dotfiles/config/p10k.zsh";
|
||||||
|
|
||||||
|
syntaxHighlighting = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
plugins = with pkgs; [
|
||||||
|
{
|
||||||
|
name = "powerlevel10k";
|
||||||
|
src = zsh-powerlevel10k;
|
||||||
|
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
# nushell.enable = true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
20
setup.sh
20
setup.sh
@ -90,6 +90,18 @@ switch_to_home_manager() {
|
|||||||
home-manager switch --flake ~/.dotfiles
|
home-manager switch --flake ~/.dotfiles
|
||||||
}
|
}
|
||||||
|
|
||||||
|
continue_install() {
|
||||||
|
echo 'Nix and dotfiles are installed'
|
||||||
|
source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||||
|
chmod +x ~/.dotfiles/setup.sh
|
||||||
|
bash -c "~/.dotfiles/setup.sh -c"
|
||||||
|
}
|
||||||
|
|
||||||
|
add_exec_zsh() {
|
||||||
|
echo 'Adding `exec zsh` to `~/.bashrc`...'
|
||||||
|
grep -qxF 'exec zsh' ~/.bashrc || echo "exec zsh" | tee -a ~/.bashrc
|
||||||
|
}
|
||||||
|
|
||||||
# Check if parameter is help, continue or initial
|
# Check if parameter is help, continue or initial
|
||||||
if [ "$1" == "-i" ] || [ "$1" == "--install" ]; then
|
if [ "$1" == "-i" ] || [ "$1" == "--install" ]; then
|
||||||
# Check if .dotfiles exists, if so stop
|
# Check if .dotfiles exists, if so stop
|
||||||
@ -110,10 +122,7 @@ if [ "$1" == "-i" ] || [ "$1" == "--install" ]; then
|
|||||||
# Clone dotfiles
|
# Clone dotfiles
|
||||||
clone_dotfiles
|
clone_dotfiles
|
||||||
|
|
||||||
echo 'Nix and dotfiles are installed'
|
continue_install
|
||||||
source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
|
||||||
chmod +x ~/.dotfiles/setup.sh
|
|
||||||
bash -c "~/.dotfiles/setup.sh -c"
|
|
||||||
elif [ "$1" == "-c" ] || [ "$1" == "--continue" ]; then
|
elif [ "$1" == "-c" ] || [ "$1" == "--continue" ]; then
|
||||||
# Run initial home-manager setup
|
# Run initial home-manager setup
|
||||||
home_manager_setup
|
home_manager_setup
|
||||||
@ -121,6 +130,9 @@ elif [ "$1" == "-c" ] || [ "$1" == "--continue" ]; then
|
|||||||
# Run initial home-manager switch
|
# Run initial home-manager switch
|
||||||
switch_to_home_manager
|
switch_to_home_manager
|
||||||
|
|
||||||
|
# Add `exec zsh` to bashrc
|
||||||
|
add_exec_zsh
|
||||||
|
|
||||||
# We're done here!
|
# We're done here!
|
||||||
echo 'Installation complete! Please restart your shell and enjoy!'
|
echo 'Installation complete! Please restart your shell and enjoy!'
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user