RSSAmplifier

Blog

(untitled)

skogsbrus.xyzRSS feed ↗16 posts

Latest posts

NixOS Router Update [draft]

It's been two and a half years since I "built" my own router with NixOS. I haven't made a particularly good effort in keeping the original blog post up-to-date, so this is a low-effort attempt at a retrospect. Send an email to contact@skogsbrus.xyz or a DM on Matrix if you have any specific questions you'd like to have answered. In Brief It's been a great project to get more hands-on experience…

MacOS tips & tricks [draft]

Touch ID and sudo Add this as the first line in /etc/pam.d/sudo_local. auth sufficient pam_tid.so This will let you authenticate with Touch ID when authenticating with sudo. Don't log in to iCloud on your work laptop This might strike some as obvious, but it's a mistake I made and it definitely was not worth it . LinearMouse If you use both an external mouse and a touchpad, use this progam to have…

My 3D printing workflow

Tools Neovim OpenSCAD Ultimaker Cura Ender 3 V2 Git Vim + OpenSCAD OpenSCAD is a declarative / programmatic CAD software. Your only control is through declaration of objects, their sizes, positions, and transformations. OpenSCAD does have an integrated editor, but there isn't any Vim plugin so it's not particularly nice to write in if you are used to Vim. However, OpenSCAD does have an option to…

Elixir charlists: wat

In Elixir, a range is a sequence of integers with a fixed step. The most common method of declaring a range is to use the x..y syntax. Enum is a collection of algorithms to work on enumerables. Enum.to_list converts an enumerable to a list. Armed with that knowledge, review the following code and try to consider what the results should be. Enum.to_list -1..10 [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]…

Don't Put All Your Apples In One Basket

It is safe to assert that the majority of Apple users haven't read the terms of service they agree to when using services such as App Store, Find My, or iCloud. Even without having read those terms, I think most users might not be surprised to hear that Apple can revoke your Apple account permanently. I do however imagine that most people would be surprised to hear that Apple can do this without…

Pattern matching structs in Elixir

This is a short piece on Elixir structs: what they are and how you can use pattern matching with structs to ensure valid states in your programs. Defining a struct Let's start by defining a struct, Foo . defmodule Foo , do : defstruct [ bar: " baz "] We can quickly validate that this works as expected: without a default argument, bar is assigned the value "baz" . Otherwise it is assigned the…

Doppelganger

In 2023 a doppelganger is an everyday thing, at least if it's AI-generated. A few years earlier, I learned first-hand that they exist in real life too. This is a short entry on my doppelganger, David McMahon. Eight years ago, I think, a friend of mine in Stockholm sent me a DM on Instagram with a wild photo. He was at Fotografiska , a museum for photography, and there was an exhibition called Pony…

Man pages are nice

Man pages are an overlooked resource for quality documentation. These are some of my favorites. man man man . If you've read man pages before, you may have noticed that many have a number associated with them. Have you ever learnt what those numbers mean? For example, man open shows the man pages for OPEN(1) . What does this 1 mean? As explained by man man , this number is called the "section…

A personal mantra

I am not my body. My body is a vehicle and I am its mechanic. Neglect the body, chafe the mind. I do not deserve leisure at the cost of atrophy. Leisure does not fulfill me, it only puts the world on pause. Purpose is key. I am a builder. I love, I learn, and I grow. This is who I strive to be.

My Digital Life [draft]

Identity E-mail Because I use Fastmail, I have the possibility to generate masked email addresses . This means that I typically don't expose my actual email address for services I don't trust. Furthermore, I typically try to use unique email addresses per service. If one address starts receiving spam, I just remove that address and I find out which service leaked it. This is not as inconvenient as…

Using Nix [draft]

This post aims to be a collection of useful tips & tricks that I've learnt over the years of using Nix & NixOS. What is Nix*? The Nix ecosystem has a lot of overloaded terms: Nix the language , Nix the package manager , NixOS the operating system , Nixpkgs, the official repository of Nix packages How do these relate to each other? The Nix package manager uses the Nix language to define packages…

SSH Config: How To Work Faster With Remote Hosts

ssh_config is a power tool. I think few people realize that, because more often than not I see people remembering IP addresses by heart, using command-line ssh options such as -A repeatedly, and relying on their shell history to find out what options or IP addresses they usually reach out to. Relying on history is absolutely fine, even a productivity boost, but depending on your history for…

Stable Diffusion on NixOS

I've had a fun time following the buzz about Stable Diffusion (SD), but I've been itching to get my hands dirty with it. This weekend, I put in a lot of hours to get a flake.nix working for SD. It was rough, but I'm happy now that I'm on the other side of it. I didn't manage to get it 100% declarative, but almost. I've probably also committed 100 sins in terms of what you shouldn't do when…

Building a Router with NixOS

I've now been using NixOS for one year. I use it to manage both my private PC and my laptop at work. Overall, it has been a great experience. I really appreciate the scale and control it brings to my digital life. In May 2022, I stepped it up a notch by adding a third device running NixOS, namely a custom-built router! After a month of interspersed work I had successfully replaced my home network…

Six Months with NixOS

My journey with NixOS is now 6 months old. In this post, I'd like to think back on this time and reflect what my experience has been like, what I have learned, and what I still haven't learned. For the curious, this is my current config: https://github.com/skogsbrus/os. Probably not an inspiration on how to structure your configs (yet!), but it might serve as a reference if you find anything there…

Converting to NixOS

Intro In the beginning of June 2021, I started tinkering with NixOS on an old laptop (my beloved Samsung Ativbook 9+ from 2011). Many users on Hacker News had expressed that it was a paradigm shift and that the OS had completely rewired their understanding and wants of a modern OS. It had peaked my interest. With a couple of afternoons' worth of tinkering, I managed to produce a configuration that…