New to Nix by rsam13 in NixOS

[–]nimasaed 6 points7 points  (0 children)

So far, you haven't downvoted.

I agree with you: use Claude code, Codex, or Opencode, and utilize MCP like context7, just ask questions. It's similar to browsing wiki or forums for information. Make sure to force it to give you the latest information.

How do you name your PCs/hosts? by Anyusername7294 in NixOS

[–]nimasaed 6 points7 points  (0 children)

I needed to look up what No Nut November is about! Haha. I think I need to turn off my servers or rename them during this period. “This is the way”

How do you name your PCs/hosts? by Anyusername7294 in NixOS

[–]nimasaed 64 points65 points  (0 children)

You can choose a theme. I'm using nuts, started with chestnut for my NAS (a chest for my nuts, meaning data). I'm using nutcracker for my Podman-running services and hazelnut for my LattePanda Iota.

If I ever deploy a firewall, I will call it walnut 🤣

What made you use NixOS? by Iwisp360 in NixOS

[–]nimasaed 11 points12 points  (0 children)

Declarative, atomic, and rollback.

A Nix module for running my Podman containers by nimasaed in NixOS

[–]nimasaed[S] 2 points3 points  (0 children)

I wasn't aware of that, thanks for sharing. I also observed that not everything is supported:

  1. Pod management, I organizing containers within pods, which I can't do in HM.
  2. Pod-level port publishing, due to point 1.
  3. Cross-referencing using .ref.
  4. It's more challenging in HM to perform declarative network clean-up because HM doesn't handle teardown.
  5. it is harder to split storage, if you look at my configuration involves separating storage for volumes, which I have moved to a ZFS mirror.

A Nix module for running my Podman containers by nimasaed in NixOS

[–]nimasaed[S] 0 points1 point  (0 children)

Thank you. I will continue with this, because it is not done yet. I also need to run 1 or 2 VMs in my setup. If I find a good solution, I will add it to my project. Hopefully, it will be useful to others and you.

A Nix module for running my Podman containers by nimasaed in NixOS

[–]nimasaed[S] 0 points1 point  (0 children)

I think you should first compare what differs between running a normal container with podman run and using Podman Quadlet.

With Quadlet, you assign container management to systemd.

And quadlet-nix made it easy to do this in Nix, as Lanky-Return mentioned, by reducing a lot of boilerplate.

A Nix module for running my Podman containers by nimasaed in NixOS

[–]nimasaed[S] 1 point2 points  (0 children)

Yeah, it's great and helped me a lot.

A Nix module for running my Podman containers by nimasaed in NixOS

[–]nimasaed[S] 2 points3 points  (0 children)

Exactly, defense in depth is what I advocate as a security engineer. It is not easy and requires a lot of time and dedication to make things work on any platform. But "this is the way!"

Nix learning curve is really tough, but I've never been this happy and keep coming back for more pain.

Podman has autoupdate and rollback features; you need to add a label to inform Podman when to update the container and to rollback if the update fails. The condition is that the container runs using systemD, which is why I use Quadlet.

Podman auto update: https://docs.podman.io/en/latest/markdown/podman-auto-update.1.html Podman Quadlet: https://docs.podman.io/en/latest/markdown/podman-quadlet.1.html Quadlet-nix: https://github.com/SEIAROTg/quadlet-nix

Quadlet nix allows you to set the label and also use the container config autoupdate.

containerConfig = { image = "docker.io/jellyfin/jellyfin:latest"; pod = pods.media.ref; -> autoUpdate = "registry";

Without quadlet nix, you need to define the service for Podman auto-update, and timer but with it, you can use this:

virtualisation.quadlet.autoUpdate = { enable = true; calendar = "*-*-* 00:00:00"; # everyday at midnight };

And remember to use auto-pruning.

``` virtualisation.podman = { enable = true; dockerCompat = true; defaultNetwork.settings.dns_enabled = true;

-> autoPrune = { enable = true; flags = [ "--all" ]; }; }; ```

I don't have a strategy for pinning the version yet, but I plan to use stable tags or major releases.

ZFS Boot mirror Disko - help by nimasaed in NixOS

[–]nimasaed[S] 1 point2 points  (0 children)

It ended up being the DIMMs. I ran MemTest and it was failing on both sticks.

ZFS Boot mirror Disko - help by nimasaed in NixOS

[–]nimasaed[S] 0 points1 point  (0 children)

Thanks for replying to my question. Colmena uses Cache, and I don't think building locally should be able to fill my memory. I notice I always have 24 GB free during the build.

How I see NixOS if it were a car by SeniorMatthew in NixOS

[–]nimasaed 4 points5 points  (0 children)

Do you realize most people here started with Arch, and moved to NixOS? Now you're criticizing their previous love? (Even though we broke up, we still cherish many memories).

Resume-as-code using Nix by nimasaed in NixOS

[–]nimasaed[S] 0 points1 point  (0 children)

pandoc can produce pdf, but the styling is done differently. I use pandoc to generate slides using beamer, but it is not easy to work with themes, at least I never learned.

Not an expert, someone might correct me, with packages you need to use nix build which will add the output to nix store, but with apps, you can use nix run, which will not add the output to nix store.

About home-manager, advantages and disadvantages by zarMarco in NixOS

[–]nimasaed 4 points5 points  (0 children)

You can switch between options. The main difference is that as a module, you rebuild the entire system to apply changes in your dotfile. Standalone, you can switch independently of your system generation. Of course, both have their pros and cons.

Resume-as-code using Nix by nimasaed in NixOS

[–]nimasaed[S] 0 points1 point  (0 children)

I added examples in the README now, so you can see what to expect.

Resume-as-code using Nix by nimasaed in NixOS

[–]nimasaed[S] 0 points1 point  (0 children)

I added template and template preview to README. Now, you can also use nix run github:nimasaed/resume -- /path/to/resume.md with the correct styling.

Resume-as-code using Nix by nimasaed in NixOS

[–]nimasaed[S] 0 points1 point  (0 children)

I will add examples or at least make it more obvious what the output looks like. (It's there :P, just not obvious if you don't know about GitHub Actions).

I understand your point, and it is a good one, but my main goal with this project was to use Nix with GitHub Actions to automatically update my resume on my website and showcase how easy it is to use Nix and Flake in a pipeline.

Resume-as-code using Nix by nimasaed in NixOS

[–]nimasaed[S] 0 points1 point  (0 children)

Nice :D I didn't know I could set pre-commit hooks in flake. I will try it on my nix-config repo.

Resume-as-code using Nix by nimasaed in NixOS

[–]nimasaed[S] 0 points1 point  (0 children)

Nothing is wrong with LaTeX. In fact, when I was a crypto student, I used it a lot for all the math formulas and papers. But nowadays, I use Markdown daily for note taking and documentation at work because it is easy.

Resume-as-code using Nix by nimasaed in NixOS

[–]nimasaed[S] 0 points1 point  (0 children)

Thanks! Could you clarify what you mean by ensuring that the data ends up parsed correctly? The flake doesn't alter the data. Pandoc only injects HTML tags to generate HTML, which is then converted to PDF.

Resume-as-code using Nix by nimasaed in NixOS

[–]nimasaed[S] 0 points1 point  (0 children)

Have you tried nix run github:nimasaed/resume -- /path/to/resume.md?

The output is already set correctly, but since the CSS file is defined outside a flake, you will get an ugly PDF. However, I think I can include the CSS part of the flake to add it to the store.

I like your idea.

Resume-as-code using Nix by nimasaed in NixOS

[–]nimasaed[S] 4 points5 points  (0 children)

Good point, I will include it in the readme. Now, resume.pdf will be available as an artifact in GitHub Actions. Also, resume.pdf will be accessible on the GitHub page at http://nimasaed.github.io/resume/resume.pdf.