Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. My server now lives in a Git repo!

My server now lives in a Git repo!

Scheduled Pinned Locked Moved Uncategorized
nixosinfrastructureagitopsselfhostedlinux
15 Posts 6 Posters 46 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • tux@burningboard.netT This user is from outside of this forum
    tux@burningboard.netT This user is from outside of this forum
    tux@burningboard.net
    wrote last edited by
    #1

    My server now lives in a Git repo! 📂✨ Just took the plunge and set up my first host completely declaratively. Infrastructure as Code (IaC) is a total game changer for keeping the digital engine room organized.

    #NixOS #InfrastructureAsCode #GitOps #SelfHosted #Linux #DevOps

    Tuxis Mastodon UI

    favicon

    (ui.burningboard.org)

    jimmyb@selfhosted.cafeJ S 2 Replies Last reply
    1
    0
    • R relay@relay.an.exchange shared this topic
    • tux@burningboard.netT tux@burningboard.net

      My server now lives in a Git repo! 📂✨ Just took the plunge and set up my first host completely declaratively. Infrastructure as Code (IaC) is a total game changer for keeping the digital engine room organized.

      #NixOS #InfrastructureAsCode #GitOps #SelfHosted #Linux #DevOps

      Tuxis Mastodon UI

      favicon

      (ui.burningboard.org)

      jimmyb@selfhosted.cafeJ This user is from outside of this forum
      jimmyb@selfhosted.cafeJ This user is from outside of this forum
      jimmyb@selfhosted.cafe
      wrote last edited by
      #2

      @tux Are you using one repo per server/host?

      tux@burningboard.netT 1 Reply Last reply
      0
      • jimmyb@selfhosted.cafeJ jimmyb@selfhosted.cafe

        @tux Are you using one repo per server/host?

        tux@burningboard.netT This user is from outside of this forum
        tux@burningboard.netT This user is from outside of this forum
        tux@burningboard.net
        wrote last edited by
        #3

        @jimmyb

        I'm currently only using Git locally and simply push the Nix config to the server via SFTP. There are certainly smarter solutions out there. 🙃

        jimmyb@selfhosted.cafeJ erwyn@mastodon.onlineE 2 Replies Last reply
        0
        • tux@burningboard.netT tux@burningboard.net

          @jimmyb

          I'm currently only using Git locally and simply push the Nix config to the server via SFTP. There are certainly smarter solutions out there. 🙃

          jimmyb@selfhosted.cafeJ This user is from outside of this forum
          jimmyb@selfhosted.cafeJ This user is from outside of this forum
          jimmyb@selfhosted.cafe
          wrote last edited by
          #4

          @tux Ah okay. 👍🏼

          1 Reply Last reply
          0
          • tux@burningboard.netT tux@burningboard.net

            My server now lives in a Git repo! 📂✨ Just took the plunge and set up my first host completely declaratively. Infrastructure as Code (IaC) is a total game changer for keeping the digital engine room organized.

            #NixOS #InfrastructureAsCode #GitOps #SelfHosted #Linux #DevOps

            Tuxis Mastodon UI

            favicon

            (ui.burningboard.org)

            S This user is from outside of this forum
            S This user is from outside of this forum
            satobi@burningboard.net
            wrote last edited by
            #5

            @tux
            Hi, its my first comment on mastodon ✌️

            Am i right that NixOS can use configuration files to set up the server or ist an IaC tool like Terraform?

            tux@burningboard.netT 1 Reply Last reply
            1
            0
            • R relay@relay.mycrowd.ca shared this topic
            • S satobi@burningboard.net

              @tux
              Hi, its my first comment on mastodon ✌️

              Am i right that NixOS can use configuration files to set up the server or ist an IaC tool like Terraform?

              tux@burningboard.netT This user is from outside of this forum
              tux@burningboard.netT This user is from outside of this forum
              tux@burningboard.net
              wrote last edited by
              #6

              @satobi

              Welcome to our instance!

              NixOS uses configuration files to describe the desired state of your entire system — packages, services, and settings — and then reproduces that state. So it’s not just running commands, but defining a complete declarative system setup.

              Terraform is also declarative, but focuses mainly on infrastructure like VMs, networks, or cloud resources — not the internal system configuration.

              👉 In short: NixOS manages system state, Terraform manages infrastructure — similar idea, different scope.

              S 1 Reply Last reply
              1
              0
              • tux@burningboard.netT tux@burningboard.net

                @satobi

                Welcome to our instance!

                NixOS uses configuration files to describe the desired state of your entire system — packages, services, and settings — and then reproduces that state. So it’s not just running commands, but defining a complete declarative system setup.

                Terraform is also declarative, but focuses mainly on infrastructure like VMs, networks, or cloud resources — not the internal system configuration.

                👉 In short: NixOS manages system state, Terraform manages infrastructure — similar idea, different scope.

                S This user is from outside of this forum
                S This user is from outside of this forum
                satobi@burningboard.net
                wrote last edited by
                #7

                @tux
                Thank you for your response.

                Pretty interesting never heared of NixOS.

                Does NixOS change wirh the configuration Files or can they just used at the beginning?

                krutonium@social.treehouse.systemsK tux@burningboard.netT 2 Replies Last reply
                1
                0
                • S satobi@burningboard.net

                  @tux
                  Thank you for your response.

                  Pretty interesting never heared of NixOS.

                  Does NixOS change wirh the configuration Files or can they just used at the beginning?

                  krutonium@social.treehouse.systemsK This user is from outside of this forum
                  krutonium@social.treehouse.systemsK This user is from outside of this forum
                  krutonium@social.treehouse.systems
                  wrote last edited by
                  #8

                  @satobi @tux

                  If you're doing it right, everything is in the configuration file. In fact, the system will take steps to prevent you from making changes to the system yourself - the settings for your services are symlinks to a directory owned by a service that is readonly even to root. It's designed to require you to use Nix, enforcing Code-as-Documentation.

                  I think it's important to understand as well that there is 3 things you can call Nix.

                  The Package Manager, The Language, and the OS.

                  Each one can technically be used on it's own - many people use the language and package manager on Non-Nix OS's, like other Linux Distros and even MacOS, but they work best together.

                  This bit is very off topic, but the end result of all this is quite neat:

                  Everything is reproducible. The binaries and configuration files will always have the same hash, and the same files end up in the same places.

                  This extends far enough out that the laptop I am typing to you on right now has a tmpfs for the root filesystem. The system mounts /nix to that root filesystem, and in a fraction of a second populates the entire filesystem and proceeds to boot.

                  The only data that survives a reboot is /home and /nix.

                  My Laptop's OS is, effectively, ephemeral. There is no sustained system state that survives a reboot that isn't also defined in my configuration.

                  Also you can totally use Nix to do Infrastructure, it's just a little bit more involved.

                  A 1 Reply Last reply
                  0
                  • tux@burningboard.netT tux@burningboard.net

                    @jimmyb

                    I'm currently only using Git locally and simply push the Nix config to the server via SFTP. There are certainly smarter solutions out there. 🙃

                    erwyn@mastodon.onlineE This user is from outside of this forum
                    erwyn@mastodon.onlineE This user is from outside of this forum
                    erwyn@mastodon.online
                    wrote last edited by
                    #9

                    @tux @jimmyb how do you rebuild your OS then? You have a service rebuilding it automatically? Or are you logging into the server to issue a nixos-rebuild?

                    tux@burningboard.netT 1 Reply Last reply
                    0
                    • krutonium@social.treehouse.systemsK krutonium@social.treehouse.systems

                      @satobi @tux

                      If you're doing it right, everything is in the configuration file. In fact, the system will take steps to prevent you from making changes to the system yourself - the settings for your services are symlinks to a directory owned by a service that is readonly even to root. It's designed to require you to use Nix, enforcing Code-as-Documentation.

                      I think it's important to understand as well that there is 3 things you can call Nix.

                      The Package Manager, The Language, and the OS.

                      Each one can technically be used on it's own - many people use the language and package manager on Non-Nix OS's, like other Linux Distros and even MacOS, but they work best together.

                      This bit is very off topic, but the end result of all this is quite neat:

                      Everything is reproducible. The binaries and configuration files will always have the same hash, and the same files end up in the same places.

                      This extends far enough out that the laptop I am typing to you on right now has a tmpfs for the root filesystem. The system mounts /nix to that root filesystem, and in a fraction of a second populates the entire filesystem and proceeds to boot.

                      The only data that survives a reboot is /home and /nix.

                      My Laptop's OS is, effectively, ephemeral. There is no sustained system state that survives a reboot that isn't also defined in my configuration.

                      Also you can totally use Nix to do Infrastructure, it's just a little bit more involved.

                      A This user is from outside of this forum
                      A This user is from outside of this forum
                      arthurspringer@mastodon.social
                      wrote last edited by
                      #10

                      @krutonium @satobi @tux how much more difficult is it to setup a server via nixos compared to ubuntu server? i just want to host a fileserver and maybe immich in the future

                      tux@burningboard.netT 1 Reply Last reply
                      0
                      • A arthurspringer@mastodon.social

                        @krutonium @satobi @tux how much more difficult is it to setup a server via nixos compared to ubuntu server? i just want to host a fileserver and maybe immich in the future

                        tux@burningboard.netT This user is from outside of this forum
                        tux@burningboard.netT This user is from outside of this forum
                        tux@burningboard.net
                        wrote last edited by
                        #11

                        @arthurspringer @krutonium @satobi

                        I believe setting up NixOS is not much harder than setting up a regular server.

                        I recently ordered a virtual machine with Ubuntu from Hetzner (or another provider) and ran the following script to get started:

                        curl https://www.google.com/search?q=https://raw.githubusercontent.com/elitak/nixos-infect/master/nixos-infect | PROVIDER=hetznercloud NIX_CHANNEL=nixos-25.11 bash 2>&1 | tee /tmp/infect.log

                        Link Preview Image
                        GitHub - elitak/nixos-infect: [GPLv3+] install nixos over the existing OS in a DigitalOcean droplet (and others with minor modifications)

                        [GPLv3+] install nixos over the existing OS in a DigitalOcean droplet (and others with minor modifications) - elitak/nixos-infect

                        favicon

                        GitHub (github.com)

                        Important: Make sure to add your public SSH key when ordering the VM in the provider’s web interface or add it manually.

                        For the rest of the configuration, I recommend consulting an AI — that’s what I did as well.

                        Once everything is set up, you can find the complete configuration in the file /etc/nixos/configuration.nix You can easily edit it directly on the server using Nano.

                        Good luck!

                        A 1 Reply Last reply
                        1
                        0
                        • erwyn@mastodon.onlineE erwyn@mastodon.online

                          @tux @jimmyb how do you rebuild your OS then? You have a service rebuilding it automatically? Or are you logging into the server to issue a nixos-rebuild?

                          tux@burningboard.netT This user is from outside of this forum
                          tux@burningboard.netT This user is from outside of this forum
                          tux@burningboard.net
                          wrote last edited by
                          #12

                          @Erwyn @jimmyb

                          Yes, exactly. I just log in via SSH, run nixos-rebuild switch there, and then reboot.

                          1 Reply Last reply
                          1
                          0
                          • tux@burningboard.netT tux@burningboard.net

                            @arthurspringer @krutonium @satobi

                            I believe setting up NixOS is not much harder than setting up a regular server.

                            I recently ordered a virtual machine with Ubuntu from Hetzner (or another provider) and ran the following script to get started:

                            curl https://www.google.com/search?q=https://raw.githubusercontent.com/elitak/nixos-infect/master/nixos-infect | PROVIDER=hetznercloud NIX_CHANNEL=nixos-25.11 bash 2>&1 | tee /tmp/infect.log

                            Link Preview Image
                            GitHub - elitak/nixos-infect: [GPLv3+] install nixos over the existing OS in a DigitalOcean droplet (and others with minor modifications)

                            [GPLv3+] install nixos over the existing OS in a DigitalOcean droplet (and others with minor modifications) - elitak/nixos-infect

                            favicon

                            GitHub (github.com)

                            Important: Make sure to add your public SSH key when ordering the VM in the provider’s web interface or add it manually.

                            For the rest of the configuration, I recommend consulting an AI — that’s what I did as well.

                            Once everything is set up, you can find the complete configuration in the file /etc/nixos/configuration.nix You can easily edit it directly on the server using Nano.

                            Good luck!

                            A This user is from outside of this forum
                            A This user is from outside of this forum
                            arthurspringer@mastodon.social
                            wrote last edited by
                            #13

                            @tux @krutonium @satobi oh nice, is this just for vps tho? i am gonna try and set up a homelab on a thinkcentre tiny, should i just go for a usb-stick there?

                            tux@burningboard.netT 1 Reply Last reply
                            0
                            • A arthurspringer@mastodon.social

                              @tux @krutonium @satobi oh nice, is this just for vps tho? i am gonna try and set up a homelab on a thinkcentre tiny, should i just go for a usb-stick there?

                              tux@burningboard.netT This user is from outside of this forum
                              tux@burningboard.netT This user is from outside of this forum
                              tux@burningboard.net
                              wrote last edited by
                              #14

                              It's even easier at home, at least if you have a keyboard and monitor connected to your server.

                              There is an ISO with a graphical installer.

                              Link Preview Image
                              Download | Nix & NixOS

                              Nix is a tool that takes a unique approach to package management and system configuration. Learn how to make reproducible, declarative and reliable systems.

                              favicon

                              (nixos.org)

                              Link Preview Image
                              1 Reply Last reply
                              0
                              • S satobi@burningboard.net

                                @tux
                                Thank you for your response.

                                Pretty interesting never heared of NixOS.

                                Does NixOS change wirh the configuration Files or can they just used at the beginning?

                                tux@burningboard.netT This user is from outside of this forum
                                tux@burningboard.netT This user is from outside of this forum
                                tux@burningboard.net
                                wrote last edited by
                                #15

                                @satobi

                                The file /etc/nixos/configuration.nix always remains the same!
                                You can also create additional files, e.g., an eytra file for the web server config.

                                1 Reply Last reply
                                1
                                0
                                Reply
                                • Reply as topic
                                Log in to reply
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes


                                • Login

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • World
                                • Users
                                • Groups