Nix, Looking Back at 2022
discourse.nixos.org
discourse.nixos.org
Let's say I have a declarative definition for a web server. The NixOS configuration defines that I want nginx (or Apache or whatever), and that I have three web roots for three domains, and I'd like a no-www-to-www redirection, and this SSH key in authorized_keys and so on.
How do I get my files that I'd like nginx to serve on the server?
Do I still need Ansible? Is there a config option for "right next to the configuration file lies a tar archive with the web root contents"? Something else?
I've found services.nginx.virtualHosts.<name>.root, but that takes a path name.
How do the HTML files get into that directory when installing NixOS?
That's a general problem. You could also install PhotoPrism. How do your photos get onto the server?
Is that something that NixOS covers? It's totally fine to say "no, we're about configuring packages, not copying user data around", but when people sing NixOS' praises it always sounds like "one NixOS command and my working environment is there". That's where my understanding is falling short so far.