3 ms·
Personally I use the same approach to piku, but instead rebuild my Nixos config on push. My projects use nix flakes, so I get both something that I know will ru
by myaccountonhn 2y ago
Personally I use the same approach to piku, but instead rebuild my Nixos config on push. My projects use nix flakes, so I get both something that I know will run on my server and on my local machine with the full development environment. No containers needed technically, but I use systemd nspawn to run the software in its own sandboxed namespace.
My entire server is then managed declaratively, so if I want to add a new project, it’s like 3-5 lines of Nginx config and push, that’s all. Something goes wrong? Just revert the commit.
- ku1ik 2y agoThis sounds super interesting! Do you have an example of such a config somewhere, that you can share?
- myaccountonhn 2y agoI did a write-up of setting up nixos with git deploys here: https://mccd.space/posts/git-to-deploy/ https://mccd.space/posts/git-to-deploy/. As far as the nixos config is concerned, there is nothing crazy in it. It is just a regular nix config with nginx (https://nixos.wiki/wiki/Nginx https://nixos.wiki/wiki/Nginx). You can see there that adding nginx is just four lines of code, ~eight with ssl. Use it to proxy to your applications that are setup as systemd services (https://wiki.nixos.org/wiki/Systemd/User_Services https://wiki.nixos.org/wiki/Systemd/User_Services). Edit: btw I'm a big fan of asciinema! ty for making it. :)
- nextaccountic 2y agoQuestion, could one use piku for that? (Would it be able to rebuild nixos on each commit?)