There is a similar question on the site which must not be named.

My question still has a little different spin:

It seems to me that one of the biggest selling points of Nix is basically infrastructure as code. (Of course being immutable etc. is nice by itself.)

I wonder now, how big the delta is for people like me: All my desktops/servers are based on Debian stable with heavy customization, but 100% automated via Ansible. It seems to me, that a lot of the vocal Nix user (fans) switched from a pet desktop and discover IaC via Nix, and that they are in the end raving about IaC (which Nix might or might not be a good vehicle for).

When I gave Silverblue a try, I totally loved it, but then to configure it for my needs, I basically would have needed to configure the host system, some containers and overlays to replicate my Debian setup, so for me it seemed like too much effort to arrive nearly at where I started. (And of course I can use distrobox/podman and have containerized environments on Debian w/o trouble.)

Am I missing something?

  • wolf@lemmy.zipOP
    link
    fedilink
    English
    arrow-up
    3
    ·
    10 months ago

    Sorry, I have only Ansible files at work which I cannot share and my private Ansible setup is in a private git repository. I elaborated further down in another comment my workflow.

    My suggestion is to forget about best practices (like roles) for private desktop setup, simply start with a task file and a fresh installation of your favorite distro inside a virtual machine. From that starting point, everything you do to configure the VM you do via Ansible. Want to set the hostname? Learn about ansible.builtin.hostname, want do install a package? Use ansible.builtin.apt, ansible.builtin.dnf or similar, want to harden your sshd config? Look at ansible.builtin.lineinfile, ansible.builtin.copy or ansible.builtin.template … Screwed up your VM? Replace it with a new one, run your Ansible tasks and continue were you left off…

    Hope that helps!

    • MigratingtoLemmy@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      10 months ago

      Thanks. I use Ansible myself, but I was more interested in how I would run Ansible on my daily driver, from my daily driver.

      • wolf@lemmy.zipOP
        link
        fedilink
        English
        arrow-up
        1
        ·
        10 months ago

        Sorry, perhaps I do not understand what you are asking for?

        On a *NIX box you install ansible, start sshd and then run something like:

        ansible-playbook -i inventory -u username -e 'ansible_user=username' all.yml  -K --limit hostname.domain.net