migrate terminal config to nix

This commit is contained in:
Benjamin Palko 2024-07-14 23:19:06 -04:00
parent 8d5d84dedb
commit 5eec1d1c38
4 changed files with 64 additions and 38 deletions

20
.zshrc
View file

@ -1,20 +0,0 @@
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
setopt beep
setopt autocd
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/benjamin/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
alias rebuild="sudo nixos-rebuild switch"
alias dotfiles="cd ~/dotfiles/"
alias nv="nvim"
neofetch --ascii /home/benjamin/dotfiles/aperture.txt

57
home-manager/terminal.nix Normal file
View file

@ -0,0 +1,57 @@
{ pkgs, ... }:
{
programs.kitty = {
enable = true;
shellIntegration.enableZshIntegration = true;
font = {
name = "JetBrainsMono NF";
size = 11;
};
settings = {
enable_audio_bell = "no";
window_margin_width = 10;
background_opacity = "0.5";
confirm_os_window_close = 0;
};
};
programs.zsh = {
enable = true;
autocd = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
initExtra = "neofetch --ascii ~/dotfiles/aperture.txt";
shellAliases = {
rebuild = "sudo nixos-rebuild switch";
dotfiles = "cd ~/dotfiles/";
nv = "nvim";
};
oh-my-zsh = {
enable = true;
plugins = [
"git"
"gh"
"bun"
];
theme = "robbyrussell";
};
history = {
path = "~/.histfile";
size = 10000;
};
};
programs.starship = {
enable = true;
settings = {
add_newline = false;
};
};
fonts.fontconfig.enable = true;
home.packages = [ (pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) ];
}

View file

@ -1,12 +0,0 @@
font_family JetBrainsMono NF
font_size 11
enable_audio_bell no
window_margin_width 10
background_opacity 0.5
confirm_os_window_close 0

View file

@ -16,8 +16,11 @@ in
./nvidia.nix ./nvidia.nix
./audio.nix ./audio.nix
./services.nix ./services.nix
./hyprland.nix
]; ];
environment.shells = with pkgs; [ zsh ];
programs.zsh.enable = true;
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.${username} = { users.users.${username} = {
shell = pkgs.zsh; shell = pkgs.zsh;
@ -63,7 +66,10 @@ in
users.${username} = { users.${username} = {
home.username = username; home.username = username;
home.homeDirectory = "/home/${username}"; home.homeDirectory = "/home/${username}";
imports = [ ./home.nix ]; imports = [
../home-manager/terminal.nix
./home.nix
];
}; };
}; };
@ -91,7 +97,6 @@ in
swaynotificationcenter swaynotificationcenter
swww swww
pywal pywal
kitty
rofi rofi
emote emote
# Screenshots # Screenshots
@ -100,10 +105,6 @@ in
swappy swappy
]; ];
programs.zsh.enable = true;
programs.starship.enable = true;
fonts.packages = with pkgs; [ (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) ];
programs.steam = { programs.steam = {
enable = true; enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play