{ config, pkgs, ... }:

{
  environment.shellAliases = {
    # Nix Commands
    "nix:rebuild" = "sudo nixos-rebuild switch";
    "nix:update" = "sudo nixos-rebuild switch --upgrade";
    "nix:purge" = "sudo nix-collect-garbage -d && sudo /run/current-system/bin/switch-to-configuration boot";
    "nix:edit" = "$EDITOR /etc/nixos";
    "nix:push" = "cd /etc/nixos && git add -A && git commit -m \"$(date -u +%s)\" && git push";
    "nix:pull" = "cd /etc/nixos && git pull";

    # Git Config
    "git:config:name" = "printf \"Enter Git Name: \"; read -r name; sudo sed -i \"s/gitName = \\\".*\\\";/gitName = \\\"$name\\\";/\" /etc/nixos/settings.nix";
    "git:config:email" = "printf \"Enter Git Email: \"; read -r email; sudo sed -i \"s/gitEmail = \\\".*\\\";/gitEmail = \\\"$email\\\";/\" /etc/nixos/settings.nix";
    "git:config:key" = "printf \"Enter Git Public Key: \"; read -r key; sudo sed -i \"s|gitKey = \\\".*\\\";|gitKey = \\\"$key\\\";|\" /etc/nixos/settings.nix";

    "fixaudio" = "systemctl --user restart pipewire pipewire-pulse wireplumber";
    "nf" = "neofetch";
  };
}
