Giter Site home page Giter Site logo

Comments (3)

dustinlyons avatar dustinlyons commented on May 3, 2024

Hi, currently I haven't tested this on a server, but I hope to one day as I have a home lab I need to migrate over to Nix. I'm happy you're exploring this though.

One thing to note, on NixOS this will try to install a display manager, window compositor, etc. which may not play well in the server environment. So those would need to be turned off.

Those errors you're currently seeing are coming from disko. Here is the command the script runs:

sudo nix run --extra-experimental-features nix-command --extra-experimental-features flakes \
    github:nix-community/disko -- --mode zap_create_mount ./modules/nixos/disk-config.nix

Their current README shows this command:

sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko /tmp/disko-config.nix

But under the hood it looks like zap_create_mount maps to disko. (zap_create_mount was previously the standard way, looks like they updated it but made zap_create_mount "legacy" and still supported).

So this should work. Here is the disk-config my project uses:

_: {
  # This is the disk layout for a dual-boot system with Windows 10.
  disko.devices = {
    disk = {
      nvme0n1 = {
        device = "/dev/nvme0n1";
        type = "disk";
        content = {
          type = "gpt";
          partitions = {
            ESP = {
              type = "EF00";  # EFI partition type.
              size = "500M";
              content = {
                type = "filesystem";
                format = "vfat";
                mountpoint = "/boot";
              };
            };
            root = {
              start = "901G";  # Start immediately after Windows partition.
              size = "100%";  # Takes the remaining half of the disk space.
              content = {
                type = "filesystem";
                format = "ext4";
                mountpoint = "/";
              };
            };
          };
        };
      };
    };
  };
}

What's interesting is your environment doesn't have the rm command?

/nix/store/k4rgz2yf5f04iplv4i5pizwsm3wnx24c-disko: line 1: rm: command not found

I've had folks tell me NixOS was working for them as of last week, and I see some new regressions listed on the disko project Issues. Maybe you could check with them and report back if you learn something?

from nixos-config.

dustinlyons avatar dustinlyons commented on May 3, 2024

Hi @ryanmsnyder, did you ever get this to work?

from nixos-config.

ryanmsnyder avatar ryanmsnyder commented on May 3, 2024

Hi @dustinlyons, I apologize - I for some reason thought that disko would handle the reinstallation of NixOS. I thought that since I was starting on a NixOS environment that I could skip Step 1 of your NixOS setup instructions. disko was wiping the disk of the VPS and then didn't have anything to boot from.

I've since been able to deploy your config to a Hetzner vm running Ubuntu with nixos-anywhere, which uses disko to partition the disk and then handles the installation of NixOS.

Anyway, it turned out to be unrelated to your config! Thanks again for sharing your configuration. It has been immensely helpful as I learn more about Nix.

from nixos-config.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.