you are viewing a single comment's thread
view the rest of the comments
[–] 72 points 1 year ago* (last edited 1 year ago) (13 children)

One thing the author probably hasn't done yet or just doesn't mention is that you can configure .container services with systemd-podman units (often called quadlets), e.g. a simple MariaDB container would look like this:

[Unit]
Description=MariaDB container

[Container]
Image=docker.io/mariadb:latest
Environment=MYSQL_ROOT_PASSWORD=rootpassword
Environment=MYSQL_USER=testuser
Environment=MYSQL_PASSWORD=testpassword
Environment=MYSQL_DATABASE=testdb

[Install]
WantedBy=multi-user.target

Short intro Full reference

This is superb, because it means your containers finally feel well-integrated with the rest of the OS and you can use systemctl, journalctl, etc. just like you would with other services.

Personally, I use this as an alternative to Podman/Docker compose and have been very happy with it running rootless containers from Nextcloud, Pufferpanel, Forgejo, Authentik, etc. (ask me for .container files if you need any help, I'm currently working on a small repo with a collection)

  • source
  • hideshow 13 child comments
  • [–] 16 points 1 year ago (3 children)

    Excuse me, peasant crontab enjoyer here, but what?! I could write a (mostly) declarative system without having to learn Nix?! I should probably be learning systemd anyway, it's looking more and more like the present, let alone the future.

    I run a bunch of remote reverse proxies that are functionally identical, but for having a different Cloudflare key and calling for a different static IP

    Could I write the entire config to a self hosted Git > pull that repo > change those two variables and have a running machine?

    Remote updates have been kicking my ass, I either can't wrap my head around Screen or it isn't fit for my need. Being able to pull the new config from Git over Tailscale and then run it would be game changing for me.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 4 points 1 year ago

    Most compiled output of NixOS configuration (besides packages, perhaps) is just systemd units anyway. I found out quickly when learning nix that my lack of systemd prowess was going to cap how well I could understand NixOS.

  • source
  • parent
  • [–] 4 points 1 year ago (1 child)

    It's amazing, the gitea container supports this. Autostarts on machine restart, etc.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 1 year ago (2 children)

    That idea feels very useful but I also distrust it and it makes me angry for reasons I can't articulate.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 1 year ago

    Your distrust is kind of reasonable: I've been using this a lot for the past year and there definitely were two or three moments where it was a bit annoying, too little transparent on what commands will be run, etc.

  • source
  • parent
  • load more comments (1 reply)