Live data from Hacker News

Journaling using Nix, Vim and coreutils

tangled.sh

21–30 of 65 posts

Re: Journaling using Nix, Vim and coreutils

#21

Nix always felt like an OS on the blockchain. It's fine if you value verifiability above everything, but becomes very burdensome if you find yourself tweaking your dev environment often. Still, I think it probably teaches good discipline.

I've found NixOS is fantastic for evolving my environment. Update `configuration.nix` and then `sudo nixos-rebuild switch`. Done.

What kind of "tweaks" are you doing? You could use `nix-shell` to try out a new environment. If you like it the environment, you can make it declarative by creating a `shell.nix` file.

If you want to go further, you might make consider making a flake, but I would recommend reading https://nix.dev/concepts/flakes.html first.

Re: Journaling using Nix, Vim and coreutils

#22
post #11
post #6

Earlier quoted context omitted.

Nix is a form of computing that's simultaneously 20 years in the past and 20 years in the future. I love it. Honest answer though, it's a deterministic way of building up a computer/environment. Think pip/uv/packages.lock but for everything.

open to the select few who are able to ignore what the official documentation says and spend some on the (admittedly friendly) irc channel to learn how it REALLY works.

I've done ok without irc, though now you mention it, I do miss me some irc.

Re: Journaling using Nix, Vim and coreutils

#23
post #17

I don't see what nix is doing for you? There's vim, absolutely, coreutils (though I don't immediately see anything GNU-specific), and a tiny wrapper script that happens to be written in flake.nix but could trivially be factored out. I don't see anything that I wouldn't expect to run on, say, OpenBSD if you installed vim. (That said, yes, it's a nice journaling system)

I was somewhat expecting that the flake would include nvim bundled with the vimrc in the folder. You could then just open nvim in the `nix develop` environment (or even use something like direnv to activate it when you cd in) and have a minimal journaling environment

Yeah, if it included ex. nvim plugins then it would make more sense to me. It's just this particular combination is for installing tools that I struggle to imagine aren't default-installed everywhere, and version-locking some of the most stable programs I've ever used (though I guess neovim might make breaking changes?). Honestly it strikes me as most useful as a 'hello world 2.0' flake demo.

Re: Journaling using Nix, Vim and coreutils

#24
post #5

I don't see what nix is doing for you? There's vim, absolutely, coreutils (though I don't immediately see anything GNU-specific), and a tiny wrapper script that happens to be written in flake.nix but could trivially be factored out. I don't see anything that I wouldn't expect to run on, say, OpenBSD if you installed vim. (That said, yes, it's a nice journaling system)

This is a pretty poor example for a few reasons, but the idea is that anyone get can a shell with the tool fully installed along with all its dependencies, with a single command: nix shell 'git+ https://tangled.sh/@oppi.li/journal ' It's massive overkill for a shell alias, but for a more complex project it can be very nice.

Sure; I'm typing this comment on a NixOS machine in a browser controlled from a flake I wrote myself - I get using nix and flakes in general. It's just that this particular case seems like such overkill that it actually seems like a weird tradeoff even if you're used to flakes.

Re: Journaling using Nix, Vim and coreutils

#25

I don't see what nix is doing for you? There's vim, absolutely, coreutils (though I don't immediately see anything GNU-specific), and a tiny wrapper script that happens to be written in flake.nix but could trivially be factored out. I don't see anything that I wouldn't expect to run on, say, OpenBSD if you installed vim. (That said, yes, it's a nice journaling system)

Bring back blosxom: https://en.m.wikipedia.org/wiki/Blosxom

Re: Journaling using Nix, Vim and coreutils

#27

Nix always felt like an OS on the blockchain. It's fine if you value verifiability above everything, but becomes very burdensome if you find yourself tweaking your dev environment often. Still, I think it probably teaches good discipline.

> Nix always felt like an OS on the blockchain. It's fine if you value verifiability above everything, but becomes very burdensome if you find yourself tweaking your dev environment often.

With Nix, "dev environment" can be scoped to be specific to a project. Where on a typical system, you might install a compiler & libraries, with Nix you can describe the development environment in isolation. (Dev Containers uses containers to similar effect).

I'd rephrase your comment as: NixOS is anti-practical. Rather than just changing a config (& restarting a service), you have to change a NixOS config, rebuild that, & switch to the updated config. -- I'd say NixOS (and Nix) support the mindset of "put in all the effort up front now, in order to save effort later".

If someone's written a nix-shell or devenv file for a project, then no further effort is required to get a working dev environment setup. (Devenv is notable for nicer DX over docker-compose for things like "services.postgres.enable = true" to get a working DB).

Re: Journaling using Nix, Vim and coreutils

#28
post #15
post #14

Earlier quoted context omitted.

I've only dabbled, but what have you learned in the irc that isn't in the docs?

Haven't tried in a while and haven't checked the documentation now but back then the method for installing packages in the docs was commented on like "yeah you're not supposed to do that". Features were in a perpetual "experimental" but not really state.

Regarding "not supposed to do that": the docs mention you can install packages with commands like "nix-env -iA ", using nix approximately the same way as apt or pacman. -- Trouble is, this is kindof a footgun. (e.g. it's a bad idea to run this command with sudo, even though you'd use sudo for equivalent commands). So, it's easier to just say "you're not supposed to do that".

Re: Journaling using Nix, Vim and coreutils

#29
So, I've been keeping a journal for 17 years, off and on. I don't know anyone else who does it my way, so here's my method.

I made a dedicated email account just for the journal. I personally chose gmail but if you distrust google you could use any other provider including self-hosted.

At the end of the day, or when I feel like it, I log in and email the account from itself with a message about whatever happened that day and whatever I'm thinking or feeling, and use the date for the subject line, like "August 12, 2025". I never, ever send emails to anything else from that account nor connect it to anything or use it for anything else. It is a total island.

The result is 17 years of easily-searchable journal, password-protected, backed-up, accessible from anywhere that has internet, can't be "lost" like a physical journal (yes I know I'm trusting google, but again, go self-host if you're worried about that), can't be "found" by someone looking through my things.

I can't even tell you how much value I've gotten out of it. You forget things you don't even know you forgot. So many little moments and days in life. You'll be shocked at the things you used to think and feel sometimes. You'll be shocked at whole magical days that you haven't thought of in years and years and likely would never have thought of again. It's a record of me changing over time and the phases I've gone through. I can't recommend it enough.

And it doesn't take much discipline, either. It's not something I "have" to do. I do it when I feel like it. There are years where I have only 25 entries, and others where I have 200. It depends how much I felt like writing. I find it spikes in years where I'm feeling very emotional, usually during bad times. But I've written down many great days too.

Re: Journaling using Nix, Vim and coreutils

#30

So, I've been keeping a journal for 17 years, off and on. I don't know anyone else who does it my way, so here's my method. I made a dedicated email account just for the journal. I personally chose gmail but if you distrust google you could use any other provider including self-hosted. At the end of the day, or when I feel like it, I log in and email the account from itself with a message about whatever happened that…

A message in a bottle, thrown into your own swimming pool every evening. I like it.
Post reply on HN