NixOS configuration banner

NixOS configuration

21 devlogs
91h 43m 20s

My NixOS configuration utilizing Dendritic Pattern and following best practices (unlike my 3 previous configs).

NixOS Logo designed by Tim Cuthbertson (@timbertson).

The NixOS logo is licensed under the [Creative Commons Attribution 4.0
Int…

My NixOS configuration utilizing Dendritic Pattern and following best practices (unlike my 3 previous configs).

NixOS Logo designed by Tim Cuthbertson (@timbertson).

The NixOS logo is licensed under the Creative Commons Attribution 4.0
International License
.

This project uses AI

I use AI as a helper. Most, if not all code is written by me. AI helps me to prototype and learn new concepts. AI is also used for chore type tasks.

Demo Repository

Loading README...

janekmusin

I’ve done it! It’s finally ready.


It’s only now that I’ve realized that the release description is wrong from the use of English point of view. Great.


Let’s see if past me was right. Those were my predicitions:

I expect: 600 commits, 250 issues/PRs, around $70 in github actions, 2000 workflow runs, 15% failure rate, 100 closed issue, 130 files, 10000 lines of real code, around 100 lines/hour.

Current stats:

  • 594 commits / -1% error
  • 259 issues/PRs / +4% error
  • $43 in github costs / -39% error
  • 1319 workflow runs / -35% error
  • 14.25% failure rate / -5% error
  • 90 closed issues / -10% error
  • 120 files / -8% error
  • 8000 lines / -20% error
  • 90 lines/hour / -10% error

I’m pretty happy with my predictions and how they turned out.


I will write more in the ship message. This is the last devlog. I will continue to work on this config later and I will submit it to future hackclub projects, if I will be able to. It’s really a shame that flavortown is ending.

Attachment
0
janekmusin

I just merged that docs PR. It alone took me over 10 hours.


I hope dedicated docs for reviewers (you) are allowed. I have a backup plan, but I don’t know if I will make it with time.


Anyway, now I’m doing finishing touches. I will obviously work on my config and improve it later, but I feel like it is ready to ship as is.


I didn’t get everything done that I wanted to. I’m sure I’ll be submitting this project to future Hack Club hackathons, but I’ve also got a ton of other ideas for things I’ll be working on.

Attachment
0
janekmusin

I’m currently procrastinating on ending the work on a big improvement to the docs. I can safely say that after it, the project will be ready for shipment (that doesn’t mean the ship is coming today tho, there are still things I want to work on).


I hate writing docs. “I already know everything, right?”, “Why do I need to describe that again?” - These are my thoughts whenever I bring myself to writing the docs. Consciously I know I have to do that, but it’s still hard to overcome that.


It’s also safe to say that I haven’t done much on the school trip. It was awesome, but I barely had free time so I was able to code something only once.


I don’t really have positive news. From an outsider perspective, reading those later devlogs must be pretty funny with me being more and more depressed with the state of the project (I’m fine guys, don’t worry).


As for the image, it’s the state the last of files I need to finish before submitting the PR and being ready to ship.

Attachment
0
janekmusin

This isn’t quite the hourly devlog I wanted, but I don’t feel I’ve achieved much more than for previous 2 devlogs. This is mainly my fault, because I tried to create a workflow that would dramatically speed up CI for PRs. If this workflow worked, the clock time would be reduced by around 80% and the runners usage would be lower by more than 90%. But I couldn’t get that running and scrapped the idea. Current workflow is good enough, but I have plans to return to this idea.


From the brighter side of things, there’s a little left in the functional side of things. There are like 2 or 3 issues related to the code itself (I use github issues as a todo) I need to fix before the project is completely ready.


The biggest thing I’ve done in that 3 hours is an alternative install guide. It’s nothing flashy, in hindsight I could’ve write it much faster.


I’m trying to introduce bits of comedy to the docs and everything related to the project. The biggest example of that is the john host, but there are other smaller things. Before shipment, I plan to go through every file and check them, while checking I want to introduce a single thing that will make me smile each time I read that file.


Thanks for reading. I want to believe I’m not writing those things just for myself.


I’m sorry again for not adding any meaningful screenshot, but code instead. Nix isn’t JS and I usually can’t show progress directly, especially in cases such like this, when the thing I worked most on is a docs page.

Attachment
0
janekmusin

So far I’m delivering on my promise.


After thinking about it, creating devlogs that often is not that good of an idea. I barely do any work (more on that later) and I have to write useless things, such as what you’re currently reading.


Over last hour of work I created highly sophisticated, world class workflow for publishing releases. And the best part? I’m not joking. As far as I’m aware NOBODY has that kind of a system.


Let’s describe it then. This workflow takes 3 things as inputs: version tag, issue/PRs names and optional description for the release. The workflow does the following: Installs nix, setups cachix with my cache, runs nothing-but-nix action (you know, the normal, generic things for nix development). Then it builds my ISO host named john (the lore on the name is hilarious, I have to share that story, but later). Later it uploads it to sourceforge, as john is too fat for github releases. After that, it creates a release. It does all of that automatically, without my involvement.


John lore:

Someday, I think it was at the start of this week I was thinking about how can I name my ISO host. I wanted my hosts to be named after fictional characters, but I lacked inspiration, so I went to #flavortown on Slack and asked for any names of fictional characters. The only respose I got was just “john”, I was pretty disapointed, ngl, but then I had a really good idea I used F5, see using F5 gave me a whole new perspective and… STOP this pointless reference to Kenadian. So I had a really good idea, I created a whole wiki dedicated to john: https://john-the-character.fandom.com/wiki/John_the_Character_Wiki then I could name the host “john” without violating my rules.


The moral of the story? Don’t devlog often, unless you want people to read some weird things.


I don’t really know what can I put as the image. Code is prohibited… BUT GITHUB actions screenshots aren’t… yeah, they probably hate me. So here you go:


Explanation: When you add a workflow, it will run to test it. Thanks to this failure, I was able to fix that before it was too late. I love CI.

Attachment
0
janekmusin

Firefox config (so general desktop) config is completed. I love doing those “minigames” when you have to figure how to convert imperative settings into declarative ones. First dconf (GNOME) and now firefox.


I’ve promised to log my work more often. I don’t think I will be able to deliver on that promise. There are just so many things to do and I know I will be distracted by some of them.


In Monday, I’m going on a 2 week school trip. If I don’t write the docs there, this project is cooked. I probably won’t be able to properly ship it. So I’m not stressed at ALL.


There’s that point of diminishing returns. Since progress is in most cases (including coding) linear, the percentage of which your project has grown (and your motivation) is decreasing each hour/day/week/whatever.


From a nicer side of things, here are some stats of the project:

  • 417 commits
  • 190 issues/PRs
  • This project “costed” github $20.52 in github actions
  • 756 workflow runs
  • 148 of which failed (little less than 20%)
  • 69 closed issues (nice)
  • 104 files
  • 11213 lines of code (4000 of which are in facter config, so not real code)
  • Around 95 lines of code/hour

I plan to compare the stats from now and when I ship the project. I expect: 600 commits, 250 issues/PRs, around $70 in github actions, 2000 workflow runs, 15% failure rate, 100 closed issue, 130 files, 10000 lines of real code, around 100 lines/hour.

We will see.

If you read the full thing, I’m thankful. I’m writing this for myself, but as everyone, I like getting attention.

Attachment
0
janekmusin

GNOME finally works!


There are “only” 2 things I have to do:

  • Improving docs (If you don’t see the pattern already visit an oculist)
  • Creating showcase host for you and reviewers to try out

Aside from that, there is a massive pile of things I want to do. To name a few:

  • Creating Niri config
  • Giving GNOME and Plasma feature parity
  • Moving to normal podman quadlets, instead of nix-podman-stacks convenience layer I use now
  • Packaging a few things
  • Creating around quarter stack of hosts (yes minecraft stack)
  • NixOS mobile (finally)

I think that’s it for now. I really like writing those devlogs, but there’s just not that much happening in the repo.

Attachment
Attachment
0
janekmusin

Mission failed successfully.


I’ve been working towards slowly fixing more issues and creating custom installation ISO. I finally got it running after almost a day of troubleshooting (redundant import).


The ISO is not quite right. It was supposed to have my custom gnome config, not the stock one, but besides that, there are no issues.


Other notable changes include:

  • Moving to GNOME as a main DE
  • Fixing issues
  • More fixing issues
  • Even more fixing issue
  • You guessed it
  • Bankrupting Github (I cost them $4 in CI daily)
  • Destroying git history
  • Writing docs
  • and probably billion other things I forgot about

The biggest thing I need to work on now is showcase host. People who check our projects work on Windows (?), I need to think of some way to show them my fancy Linux dotfiles without making them install some weird OS.

I’m thinking of creating script that creates WSL machine or QEMU VM with my config and launches it.

We will see.

Attachment
Attachment
0
janekmusin

I literally have nothing flashy to show, that I haven’t show before. All I did during that time was chore: and docs: tasks. I’m seeing no real difference in how my config works on my laptop, compared to one or even two devlogs ago.


There has been a lot of stuff going on and I really feel I put that seven and a half hours into it. The README isn’t quite finished, but it’s really much better than it was before. It’s quite possibly the only thing I have to show. Every link in the README is clickable and takes you somewhere to the docs.


There’re even more (!) issues than there were at the time of the last devlog, but I don’t plan to finish the config before Flavortown ends. I will do everything to take the config to “good enough state” and then I will ship.


My biggest problem right now is the fact I need to have something to show. Yes, a nix flake is cool, but some kind of demo is required.


Despite all of that, I’m optimistic. I believe I can finish in less than 30 hours of work from now.

Attachment
0
janekmusin

At least I was right…

There’s no end to the docs saga in sight. I need to write the README, install guide and resolve around 20 issues, each of which will take no less than a hour.

I don’t like shipping unfinished work, but I may be forced to work on some of the issues after Flavortown.

I expect for the docs side of the project to take another 8 hours. Then I will work on everything else. I don’t think this project will be ready to ship for the next 20 hours of work.

I don’t really know what to put here. Images are required. I hope I won’t be banned for github screenshot.

On the screenshot, you can see that almost every file and folder has been modified in the last 2 days (since last devlog). You can also see how many commits and issues I have (I treat issues like todo list).

Attachment
0
janekmusin

First real machine! Yippe!

That also means the code part of the project is finished, at least for now. If I have time to spare, I will create hosts for my desktop, my phones and VPSes and reship after that.

Now it’s docs time. I hate writing docs, but I have to do it. I can already see myself procrastinating and doing weird things. I expect the docs side of the project to take at least 8 hours, we will see if I’m good at predicting stuff.

Attachment
0
janekmusin

Sorry for late devlog.

I did metric ton of things. Around half the time since last devlog was spent in the loop: 1. Install 2. Test 3. Note issues 4. Fix 5. Back to 1.

This took way, way more time than the 6h logged in this devlog, if I had to guess, I would aim in the low 30s or high 20s. From an outsider perspective I haven’t accomplished much. The end is even further than it was last devlog. I might have to ship version without mobile nixos, but we will see.

The only* small win I got is the CI/CD pipeline. I can’t recall many nixos configs with CI/CD, so this, despite not being hard at all, is somehow an achievement.

On screenshot: Proof of automated checks working

Attachment
0
janekmusin

I’ve got first “real” machine running the config, it’s using the “Server” config. I run it as my server. I have few problems with it, but those should be resolved by the end of the week.

Also, by today evening (UTC +1) I should have second machine running the config - my laptop, I’m doing final corrections to the config, but according to my best knowledge it works now.

Since last devlog I have been mainly fixing things, but there’s more to be fixed.

I can see the end now. There’re few issues I need to resolve, I need to setup CI/CD management of flake.lock, create documentation and install script, and, somehow install NixOS mobile without destroying my phone.

Attachment
0
janekmusin

It seems like my assumptions about nixos-anywhere were wrong and it can’t be used to install nixos on localhost. I spent most of those 5 hours troubleshooting that, before I realized I can’t do what I wanted to do.

I’ve deleted the ‘Desktop’ host, I won’t be installing NixOS on my main machine before trying everything up on a laptop.

I’ve also added the ‘Server’ host for my server, but setting it up is harder than I thought, mainly because of the quality of the docs.

I hope to finish this config in less than 20 hours, but I don’t think I will be able to. Not only I have to create the installation guide, but also fix few things, add the server host and few little thing, but I also “have to” fight final boss of declarative operating systems: Mobile NixOS

Attachment
0
janekmusin

The config is ready to be installed!!!

Or at least I think so.

Most of the time logged in this devlog was spent on adding the documentation, going through existing files and fixing them.

Now I only have to install, check what isn’t working , fix that and I’m done (for the desktop config, I also have 3 servers and a phone).

This is the last time the screenshot isn’t related to the actual computers I will be deploying the config to.

Attachment
0
janekmusin

The configuration should be fully working by now. I’ve finished the desktop environment config, and while I wouldn’t want to share the project, at least for now, I will begin the early tests.

Because screenshots of code are banned and I have nothing else to show, on the screenshot I have a proof that my system builds and I’ve eliminated all internal evaluation errors.

Attachment
0
janekmusin

I’ve been to hell and beyond.

It’s a lot harder to partition the drive with ZFS and using tmpfs as a root, when you know nothing about those things. Doing this declaratively…

Deciding which files and directories to persist was also a hard task.

From your perspective, it appears I’ve coded for only 2 hours since the last devlog. It isn’t true. I’ve spent at least 6 hours searching configurations and surfing the internet to find what parts of the FS can’t be erased.

Attachment
Attachment
0
janekmusin

Easy parts done.

Honestly, the whole project is easy. Nix is a pretty easy language and I don’t implement any hard logic. (I might regret those words).

Attachment
0
janekmusin

Theming done!!!

I’m very proud of myself for the image svg to png block.

I also made few smaller changes and created few smaller modules

Attachment
0
janekmusin

I haven’t finished any worth mentioning. Despite that, I made lots of progress, mostly regarding smaller things. From now I will put the code of my main machine, unless I made changes to only one part.

I’m pretty happy with my AI usage with this project. Almost all of the code is still mine, which was unheard of in my previous projects.

Attachment
0
janekmusin

I finally finished the secrets config. It was harder than I expected. At least 100% of the code is mine

Attachment
0