A tiny mouse, a hacker.

  • 0 Posts
  • 17 Comments
Joined 11 months ago
cake
Cake day: December 24th, 2023

help-circle
  • Currently using postfix + dovecot + rspamd on Debian, but will be migrating to NixOS-mailserver (mostly because I am migrating to NixOS anyway; it’s the exact same stack under the hood, though).

    Regarding self-hosting dying: yes and no. I use a relay for some of my outgoing mail, because I have to communicate with people behind allowlists, and I can’t afford to get myself on one. I do not send much mail, so I comfortably fit into the free plan of my relay of choice (smtp2go). Other than a handful of recipients, I have had no trouble sending email anywhere, and I have much more control over what I receive and how by self-hosting. Even if I had to use a relay for most of my outgoing mail, I’d still self-host my e-mail, because it gives me a whole lot more control and privacy. With that said, way back when I started self-hosting, I also had to use a relay for some recipients, for the exact same reason: them using allow-lists. Back then it was my university, now it’s my kids’ school (a curious coincidence, I guess). There were always hosts that played a different game. Sure, they’ve concentrated into Google and Microsoft by now, but I can still send e-mail into those systems, even if through a relay, so self-hosting is still possible, and still gives you plenty of benefits.

    I’ve been self-hosting my email for the past… almost 30 years. Today, I think it is easier to do so than 30 years ago. There’s more to set up, but those are well documented, and with solutions like nixos-mailserver, mostly automated away. But the tools got better too! My setup catches a lot more spam now than it did a few decades ago, using a fraction of the resources, and tweaking my spam filters and other properties of the setup are considerably easier too.


  • I self host my email, and I have one mailbox, but countless addresses. Everything that needs an email address, has its dedicated one. Not because of security considerations (if someone would get into any of my aliases, I’d be fucked either way), but because I find it easier to filter and manage.

    Like,if I get an email to randomwebshop@, and it hasno relation to said place, I will know that they either sold my data, or were compromised. I can then route it to /dev/null, and then everyone who tries to spam that address will be gone from my inbox.

    It also makes it easier to tag mail, because I tag based on a property that I control. No reliance on sender, subject, list id or anything that the sender controls.


  • I’m one of those crazy people with / and /home on tmpfs. Setting that up is very easy with Impermanence, but it does require some care and self control. That is precisely the reason I set it up: I have no self control, and need the OS to force my hand. Without impermanence, my root and home fills up with garbage fast. I tend to try and play with a lotof things, and I abandon most of them. With Impermanence, I don’t need to clean up after myself: I delete the git checkout, and all state, cache and whatnit the software littered around my system will be gone on reboot.

    In short, Impermanence makes my system have that freshly installed, clean and snappy feeling.

    The whole thing sounds scarier and more complicated than it really is.


  • So instead of commenting inside of nix files, you put nix files into .org documents and collate them so you can make your nix files an OS and a website and a zettelkasten-looking set of linked annotated nodes.

    Yup! And writing it in Org allows me to structure the configuration any way I like. It makes it a whole lot easier to group things that belong together close to each other, and I never have to fight the Nix language to do so. I can also generate easily browsable, rich documentation that explains what’s what and why, which helps me tremendously, because a year after I installed and configured something, I will not remember how and why I did it that way, so my own documentation will help me remember.

    Generating code from docs (rather than the other way around) also means that I’m much more likely to document things, because the documentation part is the more important part. It… kinda forces a different mindset on me. And, like I said, this allows me to structure the configuration in a way that makes sense to me, and I am not constrained by the limitations of the Nix language. I can skip a tremendous amount of boilerplate this way, because I don’t need to use NixOS modules, repeating the same wrapping for each and every one of them. Also feels way more natural, to be honest.

    You have home on tmpfs. Isn’t that volatile? Where do you put your data/pictures/random git projects? Build outputs? How’s your RAM? (Sorry if I’m missing something obv)

    It is volatile, yes, in the sense that if I reboot, it’s lost. I am using Impermanence, for both /home and /. The idea here is that anything worth saving, will be recorded in the configuration, and will be stored on a persistent location, and will get bind mounted or symlinked. So data, pictures, source code, etc, live on an SSD, and they get symlinked into my home. For example, the various XDG userdirs (~/Downloads, etc), I configured them to live under ~/data, and that dir lives on persistent storage and gets symlinked back.

    My root and /home are both set to 128Mb, intentionally small, so that if anything starts putting random stuff there, it will run out of space very fast, and start crashing and complaining loudly, and I’ll know that I need to take care of it: either by moving the data to persistent storage, or asking whatever is putting stuff there to stop doing that. My /tmp (where temporary builds end up) is 2Gb, and sometimes I need to remount it at 10gb (hi nerdfonts!), but most of the time, 2g is more than enough.

    I have 32Gb RAM, but only ~2.5g is used for tmpfs purposes (2g of it on /tmp itself), and most of the time, the majority of that is unused and as such, available for other things. My wife’s laptop with 16Gb RAM uses a similar setup, with 512mb for /tmp, and that works just as fine.

    I do have 64Gb of swap on a dedicated SSD, though, and that helps a lot. I currently have 3GB ram free, and 37G of swap used, but don’t feel any issues with responsiveness. I don’t even know what’s using my swap! Everything feels snappy and responsive enough.

    What’s your bootup like?

    A few seconds from poweron to logging in. By far the slowest part of it is the computer waiting for me to enter my password.

    ❯ systemd-analyze
    Startup finished in 8.667s (kernel) + 29.308s (userspace) = 37.975s
    graphical.target reached after 29.307s in userspace.
    

    Looking at systemd-analyze blame and systemd-analyze critical-path, most of that userspace time is due to waiting for the network to come online (18s), and for docker to start up (7s). Most of that is done parallel, though. Boot to gdm is waaay faster than that.

    Another commenter mentioned difficulties in setting up specialized tools w/o containerizing, and another mentioned that containers still have issues. Have you run into a sitch where you needed to workaround such a problem? (e.g. something in wine, or something that needs FHS-wrangling)

    I haven’t run into any issues with containers, and I’m using a handful of them. docker, podman, flatpak all work fine out of the box (after setting up permanent storage for their data, so they don’t try to pull 10gb containers into my 128mb root filesystem :D). Wine… I’m using Wine via Lutris to play Diablo IV, and it has worked without issues so far out of the box, I didn’t have to fight to make it work.

    I did run into a few problems with some stuff. AppImages for example require running them with appimage-run, but you can easily set up binfmt_misc to automatically do that for you, so you can continue your curl https://example.com/dl/Example.AppImage -o Example.AppImage && chmod +x Example.AppImage && ./Example.AppImage practices after that.

    There’s also cases where downloaded binaries don’t work out of the box, because they can’t find the dynamic linker. I… usually don’t download random third party binaries, so I don’t often run into this problem. The one case where I did, is Arduino tooling. I have a handy script in my (arduino-powered) keyboard firmware to patch those with patchelf. But if need be, there’s buildFHSEnv, which allows us to build a derivation that simulates an FHS environment for the software being packaged. So far, I did not need to resort to that. Come to think of it… using buildFHSEnv would likely be simpler for my keyboard firmware than the patching. I might play with that next time I’m touching that repo.




  • I’ve been daily driving NixOS for about a year now, switched from over two decades of running Debian. I’ll try to answer your questions from my perspective:

    How much can I grok in a week?

    If you have some experience with functional programming or declarative configs (think Ansible), then it’s a lot easier. You can definitely learn enough in a week to get started. One year in, my Nix knowledge is very light still, and I get by fine. On the other hand, there’s a lot of Nix I simply don’t use. I don’t write reusable Nix modules, and my NixOS configuration isn’t split into small, well manageable files. It’s a single 3k lines long, 130k sized flake.nix. Mind you, it’s not complete chaos: it is generated from an Org Roam document (literate programming style; my Org Roam files are 1.2mb in size, clocking in at a bit below 10k lines).

    With that said, it took me about a month of playing and experimenting with NixOS in a VM casually, a couple of hours a week, to get comfortable and commit to switching. It’s a lot easier once you switched, though.

    How quick is it to make a derivation?

    For most things, a couple of minutes tops. I found it easier to create derivations than creating Debian packages, and I was a Debian Developer for two decades, had a lot more and lot deeper understanding of Debian packaging practices. It’s not trivial, but it’s also not hard. The first derivation is maybe a bit intimidating, but the 10th is just routine.

    Regarding make install & co, you can continue doing that. I use project-specific custom flakes and direnv to easily set up a development environment. That makes development very easy. For installing stuff… I’d still recommend derivations. A simple ./configure && make && make install is usually very easy to write a derivation for. And nixpkgs is huge, chances are, someone already wrote one.

    How quick is it to install something new and random?

    With a bit of self control and liberal use of direnv & flakes, near instant.

    How long do you research a new package for?

    https://search.nixos.org/packages, you can search for a package, and you can explore its derivation. The same page also provides search for NixOS options, so you can explore available NixOS modules to help you configure a package.

    Can you set up dev environments quickly or do you need to write a ton of configs?

    Very easy, with a tiny amount of practice. Liberal use of flakes & direnv, and you’re good to go. I can’t comment much on Python, because I don’t do much Python nowadays, but JavaScript, Go, Rust, C, C++ have been very easy to build dev environments for.

    What maintenance ouchies do you run into? How long to rectify?

    None so far. If it builds, it usually works. I do need to read release notes for packages I upgrades, but that’s also reasonably easy, because I can simply “diff” the package version between my running system, and the configuration I just built: I can see which packages were upgraded, and can look up their release notes if need be. In short, about the same effort as upgrading Debian was (where I also rarely ran into upgrade/maintenance gotchas).

    Do I need to finagle on my own to have /boot encrypted?

    If you use the NixOS installer, then yeah, you do have to fiddle with that a bit more than one would like. If you install via other means (eg, build your own flake and use something like nixos-anywhere to install it), then it’s pretty easy and well supported and documented.

    Feel free to ask further question, I’m happy to elaborate on my experience so far.


  • Meson and CMake are the two major players I’ve seen along autotools. Are they better? In some respects, yes (especially Meson, imo), in others… not really. For a pet project that only targets two platforms, I’d just stick to handwritten worst-practices Makefile. You will likely have less trouble with that than any of the others, simply because you know it already.


  • I think the first thing to figure out would be why udev is getting shut down. Perhaps you could extract its logs? journalctl -b -u systemd-udevd.service should do the trick. This gets you the logs of the current boot’s udevd service.

    Once you know why it is shutting down, it will be time to figure out how to stop it from shutting down. That should, hopefully, fix the problem you’re having.


  • My parents moved to Linux on their own accord: Dad just wanted something that stays the same, and doesn’t try to exploit him, so he’s been a happy Debian & XFCE user for about a decade now; Mom never used Windows, so she’s happy with Debian & GNOME I was a Debian user (and developer) back when they switched to Linux, and Debian is where they stayed. Dad’s in IT, so he can manage both systems fine, most of the time. I need to unfuck it from time to time, when Dad decides it is a good idea to try and install the latest LibreOffice Ubuntu arm64 .deb package on his x86_64 Debian oldstable, throwing whatever --force flags at dpkg he can find, but other than that, they have everything they need, are happy with their choices, and need very little support from me.

    In my own household, Linux is the only system to begin with (apart from a handful of Android phones we all hate, and an XBox, which is slowly getting replaced by a Linux mini PC). I’ve been a Linux user since late 1996, and I purposefully only bought hardware that works decently with Linux, so setting up scanners, printers and the like are a breeze.

    Wife saw my setup, how I operate it mostly with the keyboard (she hates the mouse more than I do!), wanted the same, so I built her something similar (NixOS + Wayland + niri + firefox + geary). She never had her own computer before, but did use Windows at work from time to time. She didn’t want to use it on her laptop, though. She wanted something tailor built for her, for her very reluctant computer-usage. So Linux it is! She doesn’t hate it, which is the best I can accomplish with anything computer-related when it comes to her. I’m maintaining her laptop, but that too, requires little work. I just update it from time to time. She’s loving that she can send a print job from her laptop, from the living room, to the printer in my work room.

    Kids played with both the xbox, and the gaming mini pc I built, and much prefer the latter, because it is easier to navigate, it is faster (using cheaper hardware), it is more stable, so when they’re old enough to get their own computers, they want Linux too, and I shall abide. Luckily, while schools around here are rather windows-oriented, they have to accommodate Linux users too, so the kids will be more than fine with their Linux computers, even for school tasks. Whether they’ll end up maintaining their computers or not remains to be seen. If they want to, I’ll teach them how to.


  • algernon@lemmy.mltoLinux@lemmy.mlNixOS forked
    link
    fedilink
    arrow-up
    3
    ·
    7 months ago

    There’s plenty, but I do not wish to hijack this thread, so… have a look at the Forgejo 7.0 release notes, the PRs it links to along notable features (and a boatload of bugfixes, many of which aren’t in Gitea). Then compare when (and if) similar features or fixes were implemented in Gitea.

    The major difference (apart from governance, and on a technical level) between Gitea and Forgejo is that Forgejo cherry picks from Gitea weekly (being a hard fork doesn’t mean all ties are severed, it means that development happens independently). Gitea does not cherry pick from Forgejo. They could, the license permits it, and it even permits sublicensing, so it’s not an obstacle for Gitea Cloud or Gitea EE, either. They just don’t.


  • It’s about 5 times longer than previous releases were maintained for, and is an experiment. If there’s a need for a longer term support branch, there will be one. It’s pointless to start maintaining an 5+ year branch with 0 users and a handful of volunteers, none of whom are paid for doing the maintenance.

    So yes, in that context, 15 months is long.


  • Or one could buy any of the existing pre-built splits. Which might be more expensive, but it does not involve something one very explicitly said they don’t want to do.

    I’d rather spend twice as much on a well built keyboard with warranty than trying to solder one together myself and botch it up, and then it suddenly costs more than if I just bought a pre-built one.



  • I use a keyboard with 64 keys (Keyboardio Model 100), with a layout that would likely drive any normal person mad: there are no numbers on the base layer, and all modifiers are on the thumb cluster. My top row is shifted symbols like @*$^%!&. I love it. I can reach every key without moving my hand, which helped tremendously with my RSI. With clever use of layers, one-shot modifiers & layers (where one-shot means that you press and release a modifier, and it remains active for the next keypress only), I have access to every symbol available on a traditional layout and more, without having to move my hand or do weird finger gymnastics.

    It’s not a keyboard I’d normally carry (it’s heavy, split, and takes up more space than a traditional full-size one), that’s not why I like it small. I like it small because I don’t need to move my hand to reach all the keys, and that increases my typing comfort a lot. I have no use for a dedicated numpad: I can just press my right palm key and turn that half of my keyboard into a numpad. If I’m typing a single digit, I don’t even need to hold the palm key. If I’m typing a longer number, I can double tap the palm key to toggle the numpad layer on, and tap it a third time once I’m done. I don’t need cursor keys, because I can tap the left palm key to turn the keyboard into navigation mode: the right side controls the text cursor (ie, arrow keys, page up/down, home/end), and the left side controls the mouse. Most of the time, I don’t even need a mouse, because I can control the pointer from the comfort of my keyboard. I do have a trackball placed inbetween the two halves for the rare cases where I require more mousing than what is comfortable with keys, but… that’s not used all that often.

    So, in short, the reason I prefer small and split is because they let me type without moving my hand, or stretching my fingers uncomfortably, and I still have convenient access to every symbol I need. I might need to do a bit more “work” to type certain things, but that’s a small price to pay for the comfort I gain by not having to move my hands.

    I can write at ~120WPM with this setup (but I normally don’t need to, my normal typing speed is closer to ~60WPM, because my speed is limited by thinking speed, not my typing speed), I write code with this, I write prose in both English and Hungarian, and I even play some games with it! (Most games I play with a controller though, because I can do that from the couch.)

    Just because it is small doesn’t mean it can’t do everything a full-sized keyboard can. I just do the same things in a different way, with different compromises. With a full-sized one, if you want to type numbers, you either have to move your hand to the numpad, or use two hands to type something like 1994. I can type that number with one hand, without moving my hand: instead of moving hands, I switch layers. With a full-sized keyboard, if you need Home, End, PageUp, PageDown or the like, you either need to move your hand, or you need whatever program you’re using to have different bindings for the same functionality. I can just press a key to go into navigation mode, and move the cursor whatever way I like, without moving my hands, or finding an alternative binding - works in every program, anywhere - instead of moving hands, I press an extra key. I found that pressing an extra key (especially if I don’t need to hold it) is more comfortable than moving hands. I also found that not moving my hands increased my accuracy, because I don’t need to find the home position when moving my hand back: it never moved in the first place.


  • In most games, I move with a mousetrackball, controlling everything with one hand didn’t quite work out for me. I do use the thumbstick to navigate menus or the like, and it works well for that. As for the thumb button: I usually bind that to Jump, or to Esc (or whatever other key gets me to the game menu). It really depends on the game how much I use the thumb button.

    If I were building a gamepad, I’d build something very close to the Azeron, but probably replace the thumb stick with a D-Pad, or 4 buttons or something along those lines. I’d put those to better use than the thumbstick. And I’d make the thumb button trigger by pressing downwards, rather than out.