Comments (13)
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.
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.
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.
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.
Any help to improve the documentation is appreciated.
from disko.
@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.
@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.
@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.
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.
@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.
..., 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.
@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.
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)
- `disko` is always formatting HOT 6
- Failed to create partition on `msdos` table HOT 3
- make zfs type more flexible to allow arbitrary vdev options HOT 4
- Rootfs mount order issue (tmpfs + zfs) HOT 3
- SWAP option to set boot.resumeDevice HOT 1
- `diskoScript` depends on `bash` but does not add it to PATH HOT 2
- Support for BTRFS subvolumes to be created but not mounted HOT 2
- Unclear how to use disko with LUKS + keyfile on usb stick configuration HOT 3
- swapon --show : wrong device HOT 12
- Support for “in-place” updates? HOT 7
- error: attribute 'disks' missing HOT 5
- ZFS features support HOT 25
- Specifying raidintegrity doesn't load required kernel modules
- Use a dummy LUKS key file in installTest HOT 2
- 140edd2 breaks btrfs subvolumes needed for boot on my machine HOT 5
- Need help for a strange issue HOT 2
- Can't rollback zfs dataset before mounting drives HOT 3
- Support clearing partition data before creation for GPT type HOT 3
- Why is `keyFile` deprecated? HOT 3
- Flake checks are broken
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from disko.