Move shell aliases to appropriate modules

This commit is contained in:
2025-06-25 22:06:53 -07:00
parent eb1666f310
commit 4d7f3000cd
5 changed files with 16 additions and 24 deletions

View File

@@ -6,7 +6,7 @@
{
imports = [
# Include the results of the hardware scan.
# Hardware Scan
./hardware-configuration.nix
# Users
@@ -42,20 +42,12 @@
../../modules/application-groups/web.nix
];
networking.hostName = "cap-slim7"; # Define your hostname. #-#
networking.hostName = "cap-slim7";
# Set your time zone.
time.timeZone = "America/Los_Angeles";
# time.timeZone = "Pacific/Honolulu";
programs.bash.shellAliases = {
nixrebuild = "pushd /etc/nixos && { trap 'popd' EXIT; sudo nixos-rebuild switch --flake .#$(hostname); }";
nixupdate = "cd /etc/nixos && sudo nix flake update && sudo nixos-rebuild switch --flake .#$(hostname)";
nixedit = "sudo nano /etc/nixos/hosts/$(hostname)/configuration.nix";
nixlimitfive = "sudo nix-env --list-generations --profile /nix/var/nix/profiles/system | head -n -5 | cut -d ' ' -f2 | xargs -I {} sudo nix-env --delete-generations --profile /nix/var/nix/profiles/system {}";
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave