this post was submitted on 03 Mar 2024
15 points (74.2% liked)

Selfhosted

40347 readers
340 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

I use Fedora Kinoite daily and find it to be the only OS to make sense really.

I find Fedora CoreOS totally confusing (with that ignition file, no anaconda, no user password by default, like how would I set this up anywhere I dont have filesystem access to?)

But there are alternatives. I would like to build my own hardened Fedora server image that can be deployed anywhere (i.e. any PC to turn into a secure and easy out-of-the-box server).

As modern server often uses containers anyways, I think an atomic server only makes sense, as damn Debian is just a pain to use.

Experiences, recommendations?

you are viewing a single comment's thread
view the rest of the comments
[–] Pantherina@feddit.de 1 points 8 months ago (1 children)

I would be interested in automatic updates on NixOS!

[–] jlh@lemmy.jlh.name 2 points 8 months ago

This wiki page has an example on how to do automatic updates on a normal install of nixos:

https://nixos.wiki/wiki/Automatic_system_upgrades

But this won't work for nixos-generate because nixos-generate doesn't have a configuration.nix file in the booted system.

Here is the code I use for my nixos-generate flake that I use to generate all of the nixos images in my homelab:

https://codeberg.org/jlh/h5b/src/commit/763a873c5bb7a4706ad021ea5ac3634b4efeadce/nodes/common.nix#L113

The way this works is that it includes the flake source code as a folder in the nix store on the booted system, and the nixos-upgrade timer will then use the flake to build an updated version of itself. Note that nixos-generate uses the packages output of the flake, while nixos-upgrade uses the nixosConfigurations output of the flake. I have written the flake so that they build identical systems, but it means there's some code that I had to write twice in flake.nix.

Feel free to try it out yourself, though note that you will probably have to rip out the agenix stuff to get it to build.

Nixos isnt really that user friendly yet, but insanely powerful once you understand how it works. Feel free to ask questions if anything seems confusing.