Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calamares: fix calamares modules, add nixos modules, and add new iso #161788

Merged
merged 9 commits into from
May 3, 2022

Conversation

vlinkz
Copy link
Member

@vlinkz vlinkz commented Feb 25, 2022

Motivation for this change

Currently, installing NixOS is rather difficult for new users, and the new experience when booting into one of the graphical ISOs is a blank GNOME or Plasma desktop with no super obvious indication of what to do next. Even though following the guide is not all that hard, I believe that integrating Calamares into the current NixOS isos would help make the installation experience better for new users.

Closes #15573
Closes #21662
Closes #100475

Things done

This draft PR contains 3 things:

  1. Updates the calamares package to fix the functionality of multiple modules.
  2. Adds a package for calamares-nixos-extensions, which implements NixOS backend for some calamares modules
  3. Adds configuration for a GNOME and Plasma5 ISOs with calamares installer

The GNOME test ISO can be downloaded here nixos-gnome-22.05pre375061.c777cdf5c56-x86_64-linux.iso
The Plasma5 test ISO is also available here: nixos-plasma5-22.05pre375061.c777cdf5c56-x86_64-linux.iso.

All feedback is appreciated!

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

Current Issues

  • No way to enable unfree drivers
    • Laptops with Broadcom wifi cards will not have it enabled after installation

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Feb 25, 2022
@vlinkz vlinkz changed the title Fix calamares, add nixos modules, and add new iso calamares: fix calamares modules, add nixos modules, and add new iso Feb 25, 2022
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/considering-new-installation-approaches/17778/16

@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Feb 25, 2022
@ofborg ofborg bot requested a review from manveru February 25, 2022 15:32
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Feb 25, 2022
@bobvanderlinden
Copy link
Member

bobvanderlinden commented Feb 27, 2022

I simplified the calamares-nixos-extensions a bit: bobvanderlinden@c34a688

I also worked on making sure I could run calamares inside a VM more easily without rebuilding the ISO (it was slow on my laptop): https://github.com/bobvanderlinden/nixpkgs/tree/calamares-nixos

@vlinkz
Copy link
Member Author

vlinkz commented Feb 27, 2022

Merged your changes. Looks great!

pkgs/tools/misc/calamares/default.nix Outdated Show resolved Hide resolved
pkgs/tools/misc/calamares/default.nix Outdated Show resolved Hide resolved
pkgs/tools/misc/calamares/default.nix Outdated Show resolved Hide resolved
pkgs/tools/misc/calamares/default.nix Outdated Show resolved Hide resolved
pkgs/tools/misc/calamares/default.nix Outdated Show resolved Hide resolved
@davidak
Copy link
Member

davidak commented Mar 1, 2022

This are things i noticed when testing:

  • When it's booted, i see the window overview. No idea how that happened. I should only see the Installer window.
  • installing with german locales work
  • Check if there is a locale present in Calamares that is not in NixOS and lead to failure

Screenshot from 2022-03-01 19-02-25

"Welcome to Calamares" is not user friendly. A user does not have to know which software we use for the Installer.

  • Suggestion: "Welcome to the NixOS Installation."
  • The window should also be called: "NixOS Installation"

Screenshot from 2022-03-01 19-08-33

  • The install actually uses 6.6G! Also have some reserve for installing apps. Probably multiply by 2 to allow updates.

We still don't have official system requirements :(

2022-02-26_20-39

  • LUKS setup works
  • but i have to type the password 2 times. that's annoying for the user and will discourage them from using a secure setup

that's different from NixOS install following manual. usually i'm asked only in stage 1, not grub

Screenshot from 2022-03-01 22-02-49
Screenshot from 2022-03-01 22-06-37

  • manual partitioning with one XFS partition works

Screenshot from 2022-03-01 22-19-07

  • manual partitioning with one btrfs partition works

Instructions for manual partitioning should be added to the manual. At least before stable release!

  • Install on GPT failed (BIOS)

Not sure if that dialog is true or default Calamares. In any case, the option name has a typo!

Screenshot from 2022-03-01 22-47-55

Screenshot from 2022-03-01 22-48-40

Screenshot from 2022-03-01 23-00-46

A more useful and not so scary error dialog would be great!

Error:

=== START CALAMARES 3.2.44.3
2022-03-01 - 21:42:17 [1]: OsproberEntryList PartUtils::runOsprober(DeviceModel*)
    ERROR: os-prober cannot start. 
2022-03-01 - 21:59:28 [1]: void Calamares::ViewManager::onInstallationFailed(const QString&, const QString&)
    ERROR: Installation failed: "Boost.Python error in job \"nixos-customize-config\"." 
  • Install on btrfs + swap failed

It should swapon manually created swap partitions even for the install. nixos-generate-config should do the rest...

Screenshot from 2022-03-01 23-13-29

Error:

=== START CALAMARES 3.2.44.3
2022-03-01 - 21:42:17 [1]: OsproberEntryList PartUtils::runOsprober(DeviceModel*)
    ERROR: os-prober cannot start. 
2022-03-01 - 21:59:28 [1]: void Calamares::ViewManager::onInstallationFailed(const QString&, const QString&)
    ERROR: Installation failed: "Boost.Python error in job \"nixos-customize-config\"." 
  • Install on UEFI system with GPT works

  • Autologin works

Screenshot from 2022-03-01 19-10-57

The showcases switch too fast. I learned from conference streaming that i as a video mixer have to read the text slowly, twice and then switch the scene.

  • So please make the switch so slow that everyone can actually read it!

Better showcases for desktop users can be added in a later PR. Should be done before shipping stable release!

Screenshot from 2022-03-01 19-12-29

  • Can you add a button to see what's going on, for e.g. in case of an error. Even elementary OS has that!

1_A0L01Q8mgDNFdjLbs66P6A

  • The end screen should include instruction how a user should proceed. 1. read manual if anything is unclear 2. edit configuration.nix to change the system. Use different desktop etc.

We can add selection of a desktop in a new PR.

Thanks for your work. This is a huge milestone for NixOS! ✨

@bobvanderlinden
Copy link
Member

bobvanderlinden commented Mar 3, 2022

Can you add a button to see what's going on, for e.g. in case of an error. Even elementary OS has that!

I was hoping this would be easy, but apparently elementary OS isn't based on Calamares. Their installer seems custom: https://github.com/elementary/installer. I haven't found an option to see the live log in Calamares. I've submitted a feature request: calamares/calamares#1896

@vlinkz
Copy link
Member Author

vlinkz commented Mar 3, 2022

I'm working on the errors with luks and swap. Figured out what's needed in the configuration, now in the process of automating it in the modules. Will push changes soon

@vlinkz
Copy link
Member Author

vlinkz commented Mar 4, 2022

  • but i have to type the password 2 times. that's annoying for the user and will discourage them from using a secure setup

Install on btrfs + swap failed

  • Install on GPT failed (BIOS)

Should all be fixed in the new version of calamares-nixos-extensions. Currently uploading new test image.

@vlinkz
Copy link
Member Author

vlinkz commented Mar 4, 2022

  • When it's booted, i see the window overview. No idea how that happened. I should only see the Installer window.

I believe that this is intended behavior in GNOME 40 and above. Unsure if there is a way to disable it for the intaller

@davidak
Copy link
Member

davidak commented Mar 4, 2022

I believe that this is intended behavior in GNOME 40 and above.

That was already fixed in the image yesterday. It looks like this after boot:

Screenshot from 2022-03-04 15-16-40

I thought we might want to maximize the window also, but it would look bad on bigger screens.

I check the boxes when i have retested the reported issues and they are fixed.

@ofborg ofborg bot added the 11.by: package-maintainer This PR was created by the maintainer of the package it changes label Mar 5, 2022
@SuperSandro2000 SuperSandro2000 added the 2.status: merge conflict This PR has merge conflicts with the target branch label Mar 7, 2022
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/what-would-you-do-if-you-were-the-bdfl-of-nix/6949/17

@vlinkz vlinkz force-pushed the calamares-nixos branch from c23061a to 607152a Compare May 3, 2022 16:19
@vlinkz
Copy link
Member Author

vlinkz commented May 3, 2022

Ok, updated licenses and added networking on "No Desktop" options. Building new ISOs, but everything seems good to go!

@davidak
Copy link
Member

davidak commented May 3, 2022

Result of nixpkgs-review pr 161788 run on x86_64-linux 1

2 packages marked as broken and skipped:
  • libsForQt512.kpmcore
  • libsForQt514.kpmcore
2 packages blacklisted:
  • nixos-install-tools
  • tests.nixos-functions.nixos-test
5 packages built:
  • calamares
  • calamares-nixos
  • calamares-nixos-extensions
  • libsForQt5.kpmcore (libsForQt515.kpmcore ,plasma5Packages.kpmcore)
  • partition-manager

@vlinkz
Copy link
Member Author

vlinkz commented May 3, 2022

ISOs uploaded!

@vlinkz vlinkz force-pushed the calamares-nixos branch from 607152a to 1d3a6de Compare May 3, 2022 19:41
@ofborg ofborg bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label May 3, 2022
@davidak
Copy link
Member

davidak commented May 3, 2022

What happened (to the Calamares 3.2.56 update)?

@vlinkz
Copy link
Member Author

vlinkz commented May 3, 2022

Think something went wrong with a push, lemme check

@vlinkz vlinkz force-pushed the calamares-nixos branch from 1d3a6de to 607152a Compare May 3, 2022 20:09
@vlinkz
Copy link
Member Author

vlinkz commented May 3, 2022

Ok, fixed

@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label May 3, 2022
Copy link
Member

@davidak davidak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good. Checked also the used repository. Only the patches are too much for me to review, but it does work.

Tested install

  • with Plasma ISO on UEFI hardware, LUKS, Pantheon, autologin
  • with GNOME ISO on BIOS VM, LUKS, MATE

i have not found any bigger issue

@davidak davidak merged commit 0114388 into NixOS:master May 3, 2022
@davidak
Copy link
Member

davidak commented May 3, 2022

We can now wait for the channel to advance to include the changes and announce it then, so more people can test it. https://nixpk.gs/pr-tracker.html?pr=161788

If you read this, feel free to test using the last ISOs linked in the description.

@vlinkz
Copy link
Member Author

vlinkz commented May 3, 2022

Looks great, thanks for your help! I'll continue testing as we approach 22.05 release!

@vlinkz vlinkz deleted the calamares-nixos branch May 3, 2022 21:10
@Raagh
Copy link

Raagh commented May 3, 2022

Thanks for all the hard work folks, hopefully, this will bring nixos to more people.

@jonringer
Copy link
Contributor

Very nice, :)

Proud of all the great work, will definitely diminish some of the overhead of adopting NixOS :)

@davidak
Copy link
Member

davidak commented May 6, 2022

It is now in the unstable channel and i was able to boot the gnome image.

I announced this achievement on my social media: https://chaos.social/@davidak/108253717600383941

@dasJ i suggest to use my image for the release announcement post. I gave it a very permissive license, so media can use it too.

@dasJ
Copy link
Member

dasJ commented May 6, 2022

I think this is relevant for @Mic92

@06kellyjac
Copy link
Member

06kellyjac commented May 13, 2022

Just trying out the installer (which is great) but I noticed I don't get any logs within "toggle logs" because os-prober cannot start

IDK if it being a VM caused any of the issues here

image

I am using https://hydra.nixos.org/build/175427824 so maybe I should grab a newer copy from hydra

@davidak
Copy link
Member

davidak commented May 13, 2022

@06kellyjac that is the expected output right now (calamares/calamares#1921)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: installer Related to graphical Calamares Installer 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog 8.has: documentation This PR adds or changes documentation 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 11-100 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NixOS Calamares installer RFC: Graphical installer for NixOS Guided installer