Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)H
Posts
3
Comments
190
Joined
2 yr. ago

  • That the American Dream exists or ever really existed.

  • I got a test box set up with nixos and a config that runs all of my services. I wanted to test the declarative rebuild promise of it, so I:

    1. Filled the services with my some of my backed up data (a copy of the data, not the actual backup)
    2. Ran it for a few days using some of the services
    3. Backed up the data of the nixos test server, as well as the nixos config
    4. Reinstalled nixos on the test box, brought in the config, and rebuilt it.

    And it worked!!! All serviced came back with the data, all configuration was correct.

    I'm going to keep testing, and depending on how that goes I may switch my prod server and nas to nixos.

  • Deleted

    Permanently Deleted

    Jump
  • I also recommend forgejo over gitea. I'm running forgejo and I love it.

    For your reverse proxy, look into pangolin. It combines proxy with wireguard tunneling and auth. So you can set up access controls on a service by service level. It's great. I use it and love it. No affiliation. Just really happy with how it works.

  • ok then

    Jump
  • Cough (ext) cough (.to)

  • I agree with the other folks recommending Pangolin on a VPS for this. It's great. It combines a reverse proxy and a wireguard tunnel together for you. You don't have to open any ports on your home network, and Pangolin allows you to set access levels for each individual service.

    So you can have some fully open for those who aren't going to mess with VPNs and tunneling, and you can put other things behind Pangolin auth to add additional protection.

  • Are you able to ssh in with Pangolin? I'm also using Pangolin on a VPS, and though a little while ago (last year somteime?) they demoed a tool for ssh over the pangolin tunnel, I could not get it to work.

  • Local library is another great source to get those CDs to rip mp3s

  • Nice. I got three 14TBs around the same time for the same reason glad I did.

  • I scored some new WD 14tb drives for $120 US last October, and I am glad I did! Was a hell of a deal.

  • +1. Olauncher is fantastic

  • I gave nixos a shot and pretty immediately noped out. All I wanted as a starting point was nvim with lazyvim. And as you said, it was a huge research project and after an hour with no luck, I nuked it.

  • 🤦

  • Is WordPress running in docker or on the host is?

    What you could do is set up and NFS or smb share on the ote other server, move all the media to that share on the file server and then mount the NFS/b share to the folder on the WordPress server.

    Set up the NFS/smb share to mount at boot. WordPress shoudnt wvwn notice the difference.

  • I didn't realize that. Thanks for pointing that out!

  • It would not, as @Quibblekrust@thelemmy.club explained in their comment (which I neglected to include in my explanation), Bash uses a special variable called IFS when executing for loops like this. IFS stands for Input Field Separators, and is a list of one of each type of whitespace (tab, space, and newline), and uses these as separators automatically.

    So instead of taking that whole ls output as one string of text, the for loop automatically separates it into an iterable list of strings using the newline separator.

  • I was also a teach for a number of years! Hello fellow teacher. :)

    I agree. Bash, and GNU/Linux in general is amazing. My recent foray has been into Python, and I'm having an utter blast writing code and learning.

  • You've got a few things going on to be broken down here.

    And forgive me if anything I say here seems condescending, it's not meant to be, I just like to be very explanatory with things like this and to assume the reader may not know anything about anything. (Not as an insult, but simply as a gap in knowledge).

    Also, while I'm proficient at Bash, I'm no expert.

    LIST=$(ls): Here you've stored the output of the ls command to the variable LIST, which gives you a list of items in the given directory, in this case, whichever directory the command is run from. It's also a good idea to quote the variable assignment like this: "$(ls)".

    for i in $LIST;: This is the first part of the for loop statement, which is an iterator, meaning, it will loop or iterate over every item in the given variable/parameter/group of iterable items.

    The i here, as you said could be anything. You could say for file in $LIST; or for item in $LIST;. It doesn't matter, because it's just a variable name that you are using in the first part of the for statement.

    So what bash will do with this is loop over the list, and take each item in the list, and assign it to the variable i, which will allow you do act upon that single item by calling the variable i in some other commands.

    do echo "I found one!";: This is the next part of the for loop, which is the instruction set to be executed inside the for loop. Here is where you can act upon the items in your list that have been assigned to the variable i.

    In your case, you're just printing a statement to stdout (standard out), that says, "I found one!"

    It's like saying, for each item in this list, print "I found one!"

    So if there are 20 items in the list, it will print that statement 20 times.

    However, maybe you want to print the item itself as part of a statement. So instead of "I found one!", you could do something like:

    do echo "I found $i!"

    Which then would print "I found some-filename-or-directory-here!" for each item in your list.

    done: Finally, the done statement tells bash that this is the end of the for loop. So any commands after the done statement will only run once the for loop has iterated over all items in the list and executed the commands inside the for loop for each item on the list.

    A couple of notes:

    The ; is used as a command separator or terminator. So bash knows to first run LIST=$(ls) before it attempts to run whatever the next command might be.

    In bash, it's good practice to always quote your variables like so: for i in "$LIST";. This is to avoid errors for characters that might need escaping like whitespace, backslashes, and other special characters.

    With that in mind, if you're running a command like echo "I found $i!", you don't need to quote the variable again, because it's already inside a quote set.

    Further, it's not absolutely necessary, but it can also be a good idea to also enclose all of your variables in {}, so whenever you use a variable, you'd do something like: "${LIST}"

    This not only more clearly identifies variables in your bash scripts/commands, but is necessary when using bash's parameter expansion, which is pretty great.

  • Can you share the dongle you got? I tried a couple of bt dongles and they SUCKED.

  • Thank you for the pointers! Didn't take it as a put down at all. I appreciate the feedback, and your bash script.

    I didn't realize that gluetun had added this functionality, so I'll likely implement that as the more efficient way to keep the port updated.