rb
This commit is contained in:
parent
822e36fac6
commit
fc618fcee0
|
@ -12,8 +12,7 @@
|
||||||
pu = "git push -u berg main && git push -u hub main";
|
pu = "git push -u berg main && git push -u hub main";
|
||||||
fr = "sudo systemctl reboot --firmware";
|
fr = "sudo systemctl reboot --firmware";
|
||||||
ser = "ssh root@joygnu.org";
|
ser = "ssh root@joygnu.org";
|
||||||
sp = "sudo nixos-rebuild switch --flake ~/nix/#pc";
|
rb = "bash ~/nix/home/zsh/pc-laptop.sh";
|
||||||
sl = "sudo nixos-rebuild switch --flake ~/nix/#laptop";
|
|
||||||
up = "sudo nix flake update ~/nix";
|
up = "sudo nix flake update ~/nix";
|
||||||
del = "sudo nix-collect-garbage -d";
|
del = "sudo nix-collect-garbage -d";
|
||||||
gtk = "nvim ~/nix/home/gtk/default.nix";
|
gtk = "nvim ~/nix/home/gtk/default.nix";
|
||||||
|
|
12
home/zsh/pc-laptop.sh
Executable file
12
home/zsh/pc-laptop.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
hostname=$(hostname)
|
||||||
|
|
||||||
|
if [[ $hostname == *"pc"* ]]; then
|
||||||
|
sudo nixos-rebuild switch --flake ~/nix/#pc
|
||||||
|
elif [[ $hostname == *"laptop"* ]]; then
|
||||||
|
sudo nixos-rebuild switch --flake ~/nix/#laptop
|
||||||
|
else
|
||||||
|
echo "Unable to determine the type of machine."
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue