I’m sekun, and I like programming stuff
Manage Secrets in NixOS
Recently, I experimented with running NixOS on a DigitalOcean droplet (which I will probably write about in the future), and migrated some of my toy projects from App Platform. During the migration process, I realized that I would have to somehow handle the DB certificate, and other sensitive credentials. I can’t just hardcode these! One of the more popular projects for problems like this is agenix. Their README for how to use it was a bit confusing (for me) so hopefully this post will be of use to others....
Create Rust binaries, and Docker images with Nix
Introduction A few days ago, I released the abomination of a project called emojied (website, repo) to the world. It went great, I’m glad people found it funny. However, I’m not too pleased with the deployment process: from building the project to shipping it. I made heavy use of Docker to build the necessary static assets, and binary. Here’s the current setup: Dev environment PostgreSQL (handled by NixOS) rustc, openssl, cargo, etc....
What I learned from building an emoji URL shortener in Rust
So, I made an emoji URL shortener with Rust and shared it in some places including the Rust community. And oh man this is the first thing I made that got this many visitors which is pretty nice knowing that people were curious enough to try it despite them probably feeling disgusted from me bringing such a thing to existence. Repo: https://github.com/sekunho/emojied Website: https://emojied.net Some glowing ✨ reviews: “Thanks, I hate it....
Packaging Pre-built Binaries with Nix Flake
Here’s the scenario: You have a nix environment all set up with all the dependencies you need for working on your next awesome project. All but one. nixpkgs doesn’t have the version you want. Fortunately, there’s a static binary file on their GitHub page. So should you just manually download it every time you set your project up, or should you write a Nix package that builds it from source?...