fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

9.8K
active users

#nixops

0 posts0 participants0 posts today
Continued thread

Well, since @nyunyu's PC now runs #Nixos + flakes, it is time for me to learn #NixOps in practice, so I can provision her machine from remote.

The declarative approach is cool for me, not for her, and really needs a small GUI that does:

* edit a list of wished system / user programs
* do a `rebuild test`
* do a `commit` + push
* do a `rebuild switch`
* sometimes with `nix flake update`

Holy fuck, a huge journey just ended today:

My final, my largest, most active personal repo was finally converted to flakes & #colmena for managing #nixOS hosts.

My Git oracles informed me that I first started trying to convert this repo on the 8th April 2021 😳

It had become such a massive chore to have one repo still stuck in the #nixops swamp, that I finally set aside a day on the weekend and JFDI.

Being a personal repo, previous attempts had suffered from "bah, I don't have time for this"

Replied in thread

@nobodyinperson how are you managing multiple #NixOS #RapberryPi configurations?

I only have a new #FrameWork and legacy #System76, laptops, and my configurations are already divergent. I plan to add my Pi's into the mix, but need a better strategy.

#GitOps doesn't seem to cut it, and, though I know it would work, think I should go for something more idiomatic than #Ansible templates. I've seen some very interesting #NixOps setups, but github.com/NixOS/nixops?tab=re says it's in maintenance mode!?!

GitHubGitHub - NixOS/nixops: NixOps is a tool for deploying to NixOS machines in a network or cloud.NixOps is a tool for deploying to NixOS machines in a network or cloud. - NixOS/nixops

I've just deployed my first #Nix package to a remote machine using #NixOps, and it's been quite easy and convenient. Now it's time to learn how to write a #NixOS service to run the binary as part of the system's lifecycle and I'll be able to say that I've deployed a pet project using the #Nix stack for the first time!

I'm discovering that since I last used #nixos , pretty much all of the services I want to run have native configuration support. I remember trying to set up #nomad back in the day and everything just being a pain. Now it's as simple as pie. I just need to figure out a better multi-node deploy strategy. Seems like #nixops is the main thing out there, but the docs are almost non-existent

playing around with #SelfHosting #Nextcloud on #NixOS while waiting for new hardware to arrive... realizing that I don't quite know the right way, NixOS-wise, to structure things. this machine will be responsible for a few different things - it'll serve as a NAS, a NextCloud instance, a NixOS cache and build machine, a #HomeAssistant instance, and probably more...

should the responsibilities be split into VMs? (#NixOps?) docker containers? just throw everything in the main install?

I intend to back all the data up outside, so I'm not sure what the best balance is...

Replied in thread

@trisweb Love it. Running it on my desktop and most VMs. Even using Nix as a package manager for my Macbook.

Things I like in particular:

  • with direnv and Nix, I can put a reproducible definition of the development enviroment into directory for the project needing it, and things generally just work, even if one project needs different versions of dependencies than another.
  • I can wrap an existing service definition in configuration.nix in a container spec, run nixos-rebuild switch and now the service runs in a container
  • if I messed up my configuration, I just switch to the previous generation
  • if the boot breaks, I just boot the previous generation

Apart from that, there’s #Nixops. Check out the configuration for nixos.org’s PostgreSQL server - once you’ve given Nixops your Hetzner API key and rented the server, a single command and this rather short file will take care of setting up the machine from scratch, including database server with Prometheus monitoring exporter, ZFS replication and Wireguard (well ok, that’s cheating a little since all the common bits shared across all machines in the Hetzner deployment have been factored out of the machine specific file).

social.flaig.nameThe Pond

С новой версией nixops стало неудобно работать.
Теперь утилита проверяет наличие файла nixops.nix или flake.nix в текущей директории. Если его нету - выдаёт ошибку. Из директории с исходным кодом nixpkgs тоже не запускается. Надо, либо указывать новый параметр `--network` с указанием расположения файла `nixops.nix`, либо переходить сперва в директорию где он расположен, и только после этого запускать nixops.
Неудобно и непривычно :(
Так ещё надо осваивать `nix flake`...