Sounds like a classic case of early onset yak-shaving. But given that I too get bitten by this bug from time to time, I approve.
Comment on Persistent packages on Steam Deck using Nix
rikudou@lemmings.world 11 months ago
And if anyone’s interested in what prompted the writing of this guide, I wanted to play Palworld but didn’t know the IP address of the local PC my server is on. I was also really lazy to get the IP address from the PC itself, so I decided to use nmap to scan my local network and find the PC that way. Found out nmap is not installed by default so I had to install it somehow and then I remembered that SteamOS added the /nix directory to its exceptions that survive across upgrades.
In short, instead of taking two minutes to get the IP address I spent over half an hour getting nix to work. And decided to share in case it helps others.
Badland9085@lemm.ee [bot] 11 months ago
filister@lemmy.world 11 months ago
One comment though, you are moving the
bashrcandbash_profileinstead of copying it. So consider fixing it in your instructions.You could have also run a for loop and ping all the IPs in your subnet. Something like this will work:
for i in {1..254}; do ping -c 1 -W 1 192.168.1.$i &> /dev/null && echo 192.168.1.$i; donePresuming that your subnet is 192.168.1.0/24. This command will loop through all the IPs in this network and only print the one that are alive.
I didn’t know that Steam have added an exception for
/nixwhich is pretty cool. Thanks for sharingrikudou@lemmings.world 11 months ago
The move is intentional, the configuration file I included makes Home Manager manage .bashrc and .bash_profile, the original files are moved for backup.
Ping wouldn’t help that much, there’s around ~30 devices on my network. And it’s very much possible my PC blocks ICMP. And in addition, nmap includes the manufacturer in the output which is what I wanted to base my guess on.
filister@lemmy.world 11 months ago
I am pretty sure your PC doesn’t block ICMP requests and you can get the MAC address of the IP address using the
arpcommand and then check the first three octets against the MAC vendors database.This is all possible in Bash but the script will be slightly more complicated and will involve three different tools, ping, arp, curl.
But I am sure you know how to check your PC IP address anyway.