tfc-nixos/chris/home.nix
2024-07-18 10:57:13 -05:00

127 lines
3.5 KiB
Nix

{ config, lib, pkgs, ... }:
{
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "chris";
home.homeDirectory = "/home/chris";
# 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"; # Did you read the comment?
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
programs.git = {
enable = true;
userName = "Chris Cochrun";
userEmail = "chris@cochrun.xyz";
};
home.packages = with pkgs; [
];
# home.file.".config/fish/config.fish" = {
# source = ../fish/config.fish;
# };
# home.file.".config/fish/functions" = {
# source = ../fish/functions;
# };
programs.nushell = {
enable = true;
};
# home.file.".config/macchina" = {
# source = ../macchina;
# recursive = true;
# };
home.file."bin" = {
source = ../scripts;
recursive = true;
};
home.shellAliases = {
ls = "exa -l";
la = "exa -la";
mkdir = "mkdir -pv";
nupd = "update-nix";
nupg = "upgrade-nix";
suspend = "systemctl suspend";
sysuse = "systemctl --user";
myip = "curl icanhazip.com";
nixs = "nix search nixpkgs";
ytd = "yt-dlp -o ~/Videos/%(title)s.%(ext)s";
dokupd = "sudo docker compose pull && sudo docker compose down && sudo docker compose up -d $1";
ncupd = "sudo docker exec -u www-data -it nextcloud-app-1 php occ upgrade";
ncmon = "sudo docker exec -u www-data -it nextcloud-app-1 php occ maintenance:mode --on";
ncmoff = "sudo docker exec -u www-data -it nextcloud-app-1 php occ maintenance:mode --off";
dms = "sudo docker exec -it mailserver setup $1";
down = "sudo docker compose down";
up = "sudo docker compose up -d";
pull = "sudo docker compose pull";
dlogs = "sudo docker compose logs --follow";
};
programs.starship = {
enable = true;
enableBashIntegration = true;
};
programs.bash = {
enable = true;
bashrcExtra = ''
# export ENV_EFI_CODE_SECURE=/run/libvirt/nix-ovmf/OVMF_CODE.fd ENV_EFI_VARS_SECURE=/run/libvirt/nix-ovmf/OVMF_VARS.fd
if [[ $TERM != "dumb" && (-z $INSIDE_EMACS || $INSIDE_EMACS == "vterm") ]]; then
source $(blesh-share)
ble-face auto_complete="fg=238"
fi
# eval "$(starship init bash)"
export LESS_TERMCAP_mb=$'\e[1;32m'
export LESS_TERMCAP_md=$'\e[1;32m'
export LESS_TERMCAP_me=$'\e[0m'
export LESS_TERMCAP_se=$'\e[0m'
export LESS_TERMCAP_so=$'\e[01;33m'
export LESS_TERMCAP_ue=$'\e[0m'
export LESS_TERMCAP_us=$'\e[1;4;31m'
'';
};
programs.zsh = {
enable = true;
autosuggestion.enable = true;
enableCompletion = true;
syntaxHighlighting.enable = true;
autocd = true;
dotDir = ".config/zsh";
shellAliases = {
ls = "exa -l";
la = "exa -la";
mpf = "mpv --profile=fast";
mps = "mpv --profile=slow";
ec = "emacsclient -t";
ecc = "emacsclient -c";
mkdir = "mkdir -pv";
nupd = "update-nix";
nupg = "upgrade-nix";
suspend = "systemctl suspend";
sysuse = "systemctl --user";
myip = "curl icanhazip.com";
};
initExtra = ''
macchina
'';
};
}