Conversation

Jarkko Sakkinen

Edited 23 days ago

This might get me in trouble but I’ve often thought that NixOS could be reimagined with nu :-) For my taste it would be also more elegant approach.

Conceptual configuration.nux:

export def main [] {
  {
    hostname: "evil"
    users: [
      { name: "jarkko" groups: [wheel network] shell: bash }
    ]
    packages: [bash git vim]
    services: {
      sshd: { enable: true port: 22 }
      nginx: {
        enable: true
        sites: [
          { server_name: "example.com" root: "/var/www" }
        ]
      }
    }
    networking: {
      firewall: { allow: [22 80 443] }
    }
  }
}

I’ve used NixOS at work because I had to at one point. That’s where I know it from. I don’t have much personal interest on pursuing this further but now the world has at least the idea of “NuxOS” ;-)

#nixos

1
0
1
You have one language for scripting/shoehorning the OS and configuration. That's why I think it could be quite elegant. Configuration language would be "functional DSL" on top of nu.
1
0
0

@jarkko
I love NixOS and nushell.
But please those braces , brackets, square brackets etc feels like a maze to read🥹

0
0
0