Experiences of Coding an Open Source Winston Transport
NOTE: Originally published on March 23rd, 2019 Lately I've had the time to think about logging in microservices. There seem to be a lot of options, but after looking at them I felt that the open source community around SRE isn't as mature as I thought it would be. What I mean by this is that the most common options seem to require a lot of configuration and require at least some sort of deep dive into the documentation just to get a simple central point for microservice logs. Since ...
Using Notion as a CMS for anything that reads markdown
PrefaceAs you might see from the fact that this blog resides on Mirror instead of Notion, I didn’t end up using this, but I reckon some might get usage out of the code that I wrote. :) TL;DR? *The finished code can be found, forked and tinkered with behind this link: * https://github.com/JaniAnttonen/notion-to-md-workerBackgroundWhile looking out for fun new things to try out on my personal website, I thought of using an external CMS for my blog posts, music and photos. Notion works well for ...
Experiences of Coding an Open Source Winston Transport
NOTE: Originally published on March 23rd, 2019 Lately I've had the time to think about logging in microservices. There seem to be a lot of options, but after looking at them I felt that the open source community around SRE isn't as mature as I thought it would be. What I mean by this is that the most common options seem to require a lot of configuration and require at least some sort of deep dive into the documentation just to get a simple central point for microservice logs. Since ...
Using Notion as a CMS for anything that reads markdown
PrefaceAs you might see from the fact that this blog resides on Mirror instead of Notion, I didn’t end up using this, but I reckon some might get usage out of the code that I wrote. :) TL;DR? *The finished code can be found, forked and tinkered with behind this link: * https://github.com/JaniAnttonen/notion-to-md-workerBackgroundWhile looking out for fun new things to try out on my personal website, I thought of using an external CMS for my blog posts, music and photos. Notion works well for ...

Subscribe to jantto

Subscribe to jantto
Share Dialog
Share Dialog
<100 subscribers
<100 subscribers
I had been eyeing Nix for a while, intrigued by the possibility to deterministically define dependencies to projects et cetera. Then, at the end of 2021 I found out about home-manager, which is a way to manage your standard development environment setup with Nix – It's like any dotfiles repo you've ever seen, but better.
First, we install Nix to accommodate for home-manager (I recommend everyone to read all the output and not just blindly answer* yes *to every choice):
sh <(curl -L https://nixos.org/nix/install)
Then, after that’s done with, we can install home-manager. Restart your shell and follow the standalone installation steps at https://nix-community.github.io/home-manager/index.html#sec-install-standalone.
If you're not familiar with Nix, making your custom home-manager configuration will be quite the hurdle. I recommend looking at existing configuration files and poking around them to make them your own, or at least that's what I did. As the creator of home-manager himself says, the error messages given out by home-manager & Nix when the configuration is not working properly are going to be hard to decipher, and you will not get far by looking at them, let alone googling the outputs, so be warned.
In my experience, Nix and thus home-manager breaks every time my Mac has a larger update. This probably has something to do with permissions and/or the nix-store partition which gets made on a Mac when you install Nix. Fortunately, fixing this minor annoyance is usually pretty straight forward: just reinstall Nix and follow the installation instructions. Like magic, home-manager is fixed too and your development environment is as it should.
Lately, this method has not been working right away, but have required some repeated wiggling from me to get it right; I'm sharing a small script that should remove your worries (at least if you're on an (Apple Silicon) Mac, that is.):
# Script ensuring nix installation
if nix --version ; then
echo "Nix installation found"
else
# Nix installation backs shell configs to these files,
# remove existing backups before proceeding
sudo rm /etc/bashrc.backup-before-nix
sudo rm /etc/bash.bashrc.backup-before-nix
sudo rm /etc/zshrc.backup-before-nix
# Run Nix installation answering y to all questions.
# Might require additional permissions from the OS
yes | sh <(curl -L https://nixos.org/nix/install)
fi
If you add that to your home-manager’s shell config, nix will automatically reinstall whenever the installation breaks. (After asking the sudo password, that is) It’s a good idea to run home-manager’s switch command after this to get the latest packages.
The configuration files this blog post is based on reside here:
I had been eyeing Nix for a while, intrigued by the possibility to deterministically define dependencies to projects et cetera. Then, at the end of 2021 I found out about home-manager, which is a way to manage your standard development environment setup with Nix – It's like any dotfiles repo you've ever seen, but better.
First, we install Nix to accommodate for home-manager (I recommend everyone to read all the output and not just blindly answer* yes *to every choice):
sh <(curl -L https://nixos.org/nix/install)
Then, after that’s done with, we can install home-manager. Restart your shell and follow the standalone installation steps at https://nix-community.github.io/home-manager/index.html#sec-install-standalone.
If you're not familiar with Nix, making your custom home-manager configuration will be quite the hurdle. I recommend looking at existing configuration files and poking around them to make them your own, or at least that's what I did. As the creator of home-manager himself says, the error messages given out by home-manager & Nix when the configuration is not working properly are going to be hard to decipher, and you will not get far by looking at them, let alone googling the outputs, so be warned.
In my experience, Nix and thus home-manager breaks every time my Mac has a larger update. This probably has something to do with permissions and/or the nix-store partition which gets made on a Mac when you install Nix. Fortunately, fixing this minor annoyance is usually pretty straight forward: just reinstall Nix and follow the installation instructions. Like magic, home-manager is fixed too and your development environment is as it should.
Lately, this method has not been working right away, but have required some repeated wiggling from me to get it right; I'm sharing a small script that should remove your worries (at least if you're on an (Apple Silicon) Mac, that is.):
# Script ensuring nix installation
if nix --version ; then
echo "Nix installation found"
else
# Nix installation backs shell configs to these files,
# remove existing backups before proceeding
sudo rm /etc/bashrc.backup-before-nix
sudo rm /etc/bash.bashrc.backup-before-nix
sudo rm /etc/zshrc.backup-before-nix
# Run Nix installation answering y to all questions.
# Might require additional permissions from the OS
yes | sh <(curl -L https://nixos.org/nix/install)
fi
If you add that to your home-manager’s shell config, nix will automatically reinstall whenever the installation breaks. (After asking the sudo password, that is) It’s a good idea to run home-manager’s switch command after this to get the latest packages.
The configuration files this blog post is based on reside here:
No activity yet