Normalize shell aliases

This commit is contained in:
2025-06-25 04:38:36 -07:00
parent 0d4d60413b
commit c5d1e140cd
2 changed files with 42 additions and 50 deletions

View File

@@ -2,7 +2,12 @@
# Help is available in the configuration.nix(5) man page and in the NixOS manual # Help is available in the configuration.nix(5) man page and in the NixOS manual
# (accessible by running nixos-help). # (accessible by running nixos-help).
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
{ {
imports = [ imports = [
@@ -100,8 +105,6 @@
openFirewall = true; openFirewall = true;
}; };
hardware.xone.enable = true;
# Enable sound with pipewire. # Enable sound with pipewire.
services.pulseaudio.enable = false; services.pulseaudio.enable = false;
security.rtkit.enable = true; security.rtkit.enable = true;
@@ -137,22 +140,21 @@
# thunderbird # thunderbird
]; ];
}; };
# users.users.crestline = { # users.users.crestline = {
# isNormalUser = true; # isNormalUser = true;
# description = "Crestline"; # description = "Crestline";
# extraGroups = [ # extraGroups = [
# "networkmanager" # "networkmanager"
# "wheel" # "wheel"
# "input" # "input"
# "dialout" # "dialout"
# ]; # ];
# packages = with pkgs; [ # packages = with pkgs; [
# # thunderbird # # thunderbird
# ]; # ];
# }; # };
#services.displayManager.autoLogin = { #services.displayManager.autoLogin = {
# enable = true; # enable = true;
# user = "crestline"; # user = "crestline";
@@ -296,13 +298,13 @@
}; };
programs.bash.shellAliases = { programs.bash.shellAliases = {
nixrebuild = "cd /etc/nixos && sudo nixos-rebuild switch --flake .#default"; 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 .#default"; nixupdate = "cd /etc/nixos && sudo nix flake update && sudo nixos-rebuild switch --flake .#$(hostname)";
nixedit = "sudo nano /etc/nixos/hosts/cap-nr200p/configuration.nix"; nixedit = "sudo nano /etc/nixos/hosts/$(hostname)/configuration.nix";
scrwebcam = "sudo pkill scrcpy ; sudo modprobe -r v4l2loopback ; sudo modprobe v4l2loopback && nohup scrcpy --camera-facing=back --video-source=camera --v4l2-sink=/dev/video0 --no-window --no-audio-playback 2>&1 1>/dev/null"; scrwebcam = "sudo pkill scrcpy ; sudo modprobe -r v4l2loopback ; sudo modprobe v4l2loopback && nohup scrcpy --camera-facing=back --video-source=camera --v4l2-sink=/dev/video0 --no-window --no-audio-playback 2>&1 1>/dev/null";
}; };
virtualisation.waydroid.enable = true; virtualisation.waydroid.enable = true;
hardware.steam-hardware.enable = true; hardware.steam-hardware.enable = true;
@@ -362,7 +364,6 @@
hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot
services.blueman.enable = true; services.blueman.enable = true;
hardware.rtl-sdr.enable = true; hardware.rtl-sdr.enable = true;
security.sudo = { security.sudo = {
@@ -396,8 +397,6 @@
capSysNice = true; capSysNice = true;
}; };
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
# started in user sessions. # started in user sessions.
# programs.mtr.enable = true; # programs.mtr.enable = true;

View File

@@ -263,16 +263,9 @@
# services.automatic-timezoned.enable = true; # services.automatic-timezoned.enable = true;
programs.bash.shellAliases = { programs.bash.shellAliases = {
nixrebuild = "pushd /etc/nixos && { trap 'popd' EXIT; sudo nixos-rebuild switch --flake .#default; }"; 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 .#default"; nixupdate = "cd /etc/nixos && sudo nix flake update && sudo nixos-rebuild switch --flake .#$(hostname)";
nixedit = "sudo nano /etc/nixos/hosts/cap-slim7/configuration.nix"; nixedit = "sudo nano /etc/nixos/hosts/$(hostname)/configuration.nix";
conservebatt = "sudo bash -c 'echo 1 > /sys/bus/platform/drivers/ideapad_acpi/VPC2004*/conservation_mode && cat /sys/bus/platform/drivers/ideapad_acpi/VPC2004*/conservation_mode'";
noconservebatt = "sudo bash -c 'echo 0 > /sys/bus/platform/drivers/ideapad_acpi/VPC2004*/conservation_mode && cat /sys/bus/platform/drivers/ideapad_acpi/VPC2004*/conservation_mode'";
yesway = "nohup waybar >/dev/null 2>&1 &";
noway = "pkill waybar";
}; };
#programs.appimage = { #programs.appimage = {