Live data from Hacker News

What scripts have you built to stand up a new server?

news.ycombinator.com

51–55 of 55 posts

Re: What scripts have you built to stand up a new server?

#51
post #47
post #44

Earlier quoted context omitted.

I recently started using devbox over homebrew for package installs on my Mac and this has gotten me more interested in nix - however, neither of the VPS providers we use offer NixOS as an OS option, is there a way to achieve that declarative setup on Ubuntu?

the magic of nixos-anywhere is that you can start with a common OS base image and overwrite it with nixos. you can also run nix as a service on other operating systems. https://lix.systems/install/#on-any-other-linuxmacos-system

I had high hopes, but it's obviously designed for less paranoid consumers since executing the verb "plan" is all "ya, fam, but I'm gonna need to be root to tell you what I'm gonna do"

  `lix-installer` needs to run as `root`, attempting to escalate now via `sudo`...
  TRACE execute:execute: lix_installer::cli: Execvp'ing `"sudo"` with args `["sudo", "env", "SHELL=/usr/local/bin/bash", "./lix-installer", "-vvvv", "--logger=full", "plan"]`
I guess I'll have to patch the source to have it tell me why it wants unrestricted access just to tell me what it is going to do

Re: What scripts have you built to stand up a new server?

#53
post #47
post #44

Earlier quoted context omitted.

I recently started using devbox over homebrew for package installs on my Mac and this has gotten me more interested in nix - however, neither of the VPS providers we use offer NixOS as an OS option, is there a way to achieve that declarative setup on Ubuntu?

the magic of nixos-anywhere is that you can start with a common OS base image and overwrite it with nixos. you can also run nix as a service on other operating systems. https://lix.systems/install/#on-any-other-linuxmacos-system

Excellent, thanks. I'll do some reading!

Re: What scripts have you built to stand up a new server?

#55
post #34

I’ve written a huge number of shell and Python scripts to deal with these sorts of things. But I recently started learning Go and had a lightbulb moment: why not write a cross-platform tool that does this? I really like Neovim’s approach of using Lua for configs, both for the core app as well as for plugins, so I too am taking that approach. (Yes, I’m aware that Ansible and Nix exist. I like them. This is really just…

Do you have this published somewhere? I might be interested in collaborating if you're interested :)
Post reply on HN