If you use the commandline as your IDE, then entr is super usefull. As most unix programms, it does exatly one thing: “Run arbitrary commands when files change” The syntax goes like this: NAMES_OF_FILES_TO_WATCH | entr ENTR_FLAGS COMMAND COMMAND_FLAGS Example usage The entr website lists a bunch of usecases and examples, some are quite elaborate. Here are some of the things I do with entr: Export a markdown file to pdf and reexport it so that it is always up to date Many converter tools (like latexmk, hugo and diagramms) have a flag that makes them watch for changes in files (and do their thing then).
After living in a love-hate relationship with my nixos-configuration it finally came to the point that it became too big of a file to handle. I already had it versioned (nearly everything I write is versioned). But now the file approached a few hundred lines at I was going to loose my grip on it. A few hundred lines of code is nothing. But a few hundred lines of config is a whole lot.
I want to get a directory backed up with borg on my nixos-server (regulus.fritz.box). The client may just be a regular unixoid, doesn't have to be nixos (I am using MacOS for testing). All the commands (unless explicitly stated otherwise) are executed on the client. Both systems have borg installed. This is a tutorial, so most explaining will be about what to do, not why to do it.
I am currently rewriting the Chris Wellons’s racing simulation in rust as a training exercise. His program is really nice in that it is visual, interesting and well under 500 lines of Code - really inspiring (I wouldn’t have minded speaking variable names and comments though). Rust is still hard for me, I am mostly fighting the borrow checker. But the extremely helpfully error-messages and Stackoverflow mostly help me get over it.
Nix is packagemanager like nothing I have seen anywhere else (I have suspicion that Guix goes in a similar direction, but I haven’t tried it out yet). Using it is a bit similar to using a package manager for the first time: Once you have seen the light, there is no coming back. That’s why I have Nix running on 3 machines currently: My main Laptop, my “home-server”-raspberry-pi and (since this weeks) my MacBook for work (I am in the happy situation that my current employer allows devs much freedom on their work-devices).
Given a raspberry pi 4 with an ethernet connection a micro-sd card a usb-keyboard … this is how to set up the RP with nixos so that you can ssh into it. We won't need to attach a screen to it. All we need beyond above is a computer with an internet connection that can write to the SD card (using dd).