Giter VIP home page Giter VIP logo

Comments (13)

Mic92 avatar Mic92 commented on May 23, 2024 1

Here is an example flake: https://github.com/Lassulus/flakes-testing/blob/master/flake.nix
but agreed the documentation at this point is non-existent.

from disko.

Mic92 avatar Mic92 commented on May 23, 2024 1

This is the workflow is used in nixos-remote: https://github.com/numtide/nixos-remote/blob/f4235fead39ec6053eca4362008b4f626f9460f6/nixos-remote#L162

After using kexec it uses nix copy to upload and execute the script before doing the nixos install

from disko.

Mic92 avatar Mic92 commented on May 23, 2024 1

You can actually already use nixos-remote with the normal nixos unstable installer. If nixos-remote sees VARIANT=installer in /etc/os-release than it will not try to kexec again.

from disko.

Lassulus avatar Lassulus commented on May 23, 2024 1

@Mic92

Note that Disko will remove existing partitions!

Does that mean one needs to delete the import to Disko once the installation is over? I assumed Disko was declarative…

Only if you run the zap_creatE_mount script or the create script. you have to explicitly execute those. it doesn't automatically run on nixos-rebuild

from disko.

Mic92 avatar Mic92 commented on May 23, 2024

Any help to improve the documentation is appreciated.

from disko.

aidenscott2016 avatar aidenscott2016 commented on May 23, 2024

@Mic92 what kind of help do you need? I would like to be learn how to use this module so maybe I can contribute a few paragraphs once I understand it a bit better

Maybe you could start by stating how you expect a typical desktop user to use this. I have made a couple of successful installs using disko through a few methods learned from reading various issues here. I imagined that given a valid hardware-config.nix and disko.nix running sudo nix-install --flake .#hostname would "just work" and go ahead and create and mount the partitions I want. Is that supported?

from disko.

jackinloadup avatar jackinloadup commented on May 23, 2024

@aidenscott2016 disko, as I understand, does not yet perform any tasks while nixos-install is run. Disko exposes two scripts, disko-create and disko-mount, which need to be run before installing to prep the storage medium and place it where the installer is expecting.

You can see how I have used disko recently in this thread. There are likely many other valid usage strategies that can be used or could be explored.

from disko.

ppenguin avatar ppenguin commented on May 23, 2024

@Mic92 Thanks for the info (sorry for the belated reply, I kinda lost track, but am now actually deploying the next vps...)
I'm a bit under time pressure, but if/when I get some clean epiphany I'll consider if I can contribute to the docs as well...

from disko.

aidenscott2016 avatar aidenscott2016 commented on May 23, 2024

thank you @jackinloadup that's really helpful. I did manage to get it working for myself in the end after piecing together information from various issues. I hope to have some time in the next few days which I hope I can use to put some more words on the README at least. e.g. took me a while to figure out that lvm volumes are created in alphabetical order

from disko.

Mic92 avatar Mic92 commented on May 23, 2024

@aidenscott2016 Thanks.We hired also a technical writer to work on disko, but it would be great if you could put your text in some form in writing and than we can give it to them to improve (the technical writer is not an expert on nix/nixos). I might do this myself otherwise (I am mostly working on disko in my free time), but I am also in the process to document this project https://github.com/numtide/nixos-remote/

from disko.

ppenguin avatar ppenguin commented on May 23, 2024

..., but I am also in the process to document this project https://github.com/numtide/nixos-remote/

Small update: I did the last VPS deployment with my multi-host-flake and an adoption of nixos-remote which has kexec functionality removed, since I didn't want to risk failure because I have less than 2GB RAM (and I had a nixos live-CD already booted in the VPS). I quickly dumped the adaptation here

It worked like a charm.

I'm now doing pretty much all my server updates from my dev host with

NIX_SSHOPTS=-t nixos-rebuild switch --target-host $tgthost --use-remote-sudo --flake .#tgthost

while refining and committing the config

from disko.

Mic92 avatar Mic92 commented on May 23, 2024

@aidenscott2016 I started to draft out an installation tutorial. If you want to take a look: https://pad.lassul.us/MHuZ0A65Ru2cXoFNexsnTw#
Just feel free to edit (i.e. by adding a flake based workflow)

from disko.

Diti avatar Diti commented on May 23, 2024

@Mic92

Note that Disko will remove existing partitions!

Does that mean one needs to delete the import to Disko once the installation is over? I assumed Disko was declarative…

from disko.

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.