-
Notifications
You must be signed in to change notification settings - Fork 6
WIP: Separate installer and sub-components as skeleton from updatable system #329
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
base: main
Are you sure you want to change the base?
Changes from all commits
59d5732
d872d77
94c6bfe
d2db7c6
b266091
661a34f
9b4bd67
a4b2620
0b878be
9112205
dc92081
27d4d71
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,48 @@ | ||
| # Build NixOS system | ||
| { config, lib, pkgs | ||
| , version, safeProductName, fullProductName, greeting, install-playos | ||
| , squashfsCompressionOpts | ||
| # TODO: rename this to "skeleton" that exposes several components: | ||
| # - [ ] skeleton configuration params (partition labels, hard-coded paths like /boot/status.ini) | ||
| # - [x] the installer script (for e2e and release validation tests) | ||
| # - [x] the rescueSystem (for e2e and release validation tests) | ||
| # - [x] the installer ISO | ||
| { squashfsCompressionOpts | ||
| , systemImage | ||
| # TODO: combine this into a single systemMetadata attrset that is defined in the top-level default.nix | ||
| , safeProductName, fullProductName, kioskUrl, updateUrl, version | ||
| }: | ||
| let | ||
| nixos = pkgs.importFromNixos ""; | ||
| pkgs = import ./pkgs; | ||
|
|
||
| systemMetadata = { | ||
| inherit safeProductName fullProductName kioskUrl updateUrl version; | ||
| }; | ||
|
|
||
| # Rescue system | ||
| rescueSystem = pkgs.callPackage ./bootloader/rescue { | ||
| inherit (pkgs) nixos; | ||
| inherit squashfsCompressionOpts; | ||
| inherit systemMetadata; | ||
| }; | ||
|
|
||
|
|
||
| # Installation script | ||
| install-playos = pkgs.callPackage ./install-playos { | ||
| grubCfg = ./bootloader/grub.cfg; | ||
| inherit rescueSystem; | ||
| inherit systemImage systemMetadata; | ||
| }; | ||
|
|
||
| configuration = (import ./configuration.nix) { | ||
| inherit config pkgs lib install-playos version safeProductName fullProductName greeting squashfsCompressionOpts; | ||
| inherit install-playos squashfsCompressionOpts; | ||
| inherit systemMetadata; | ||
| }; | ||
|
|
||
| in | ||
| (nixos { | ||
| inherit configuration; | ||
| system = "x86_64-linux"; | ||
| }).config.system.build.isoImage | ||
|
|
||
| isoImage = (pkgs.nixos { | ||
| configuration = { | ||
| imports = [ configuration ]; | ||
| }; | ||
| system = "x86_64-linux"; | ||
| }).config.system.build.isoImage; | ||
| in | ||
| { | ||
| inherit install-playos isoImage rescueSystem; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| let | ||
| nixpkgs = builtins.fetchTarball { | ||
| # nixos-24.05 2024-10-07 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we don't plan to bump this on the regular, maybe there's some kind of context to capture about the specific version picked (Comment probably premature)
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, this is just temporarily set to one of the earlier releases (dc92081). It's an important question to decide on what this should be set to as it would become the "golden standard" for a long time. |
||
| url = "https://github.com/nixos/nixpkgs/archive/ecbc1ca8ffd6aea8372ad16be9ebbb39889e55b6.tar.gz"; | ||
| sha256 = "0yfaybsa30zx4bm900hgn3hz92javlf4d47ahdaxj9fai00ddc1x"; | ||
| }; | ||
|
|
||
| overlay = | ||
| self: super: { | ||
| rauc = (import ./rauc) super; | ||
|
|
||
| nixos = import "${nixpkgs}/nixos"; | ||
| }; | ||
| in | ||
| import nixpkgs { | ||
| overlays = [ overlay ]; | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -13,7 +13,8 @@ let | |||||
|
|
||||||
| importFromNixos = path: import (nixpkgs + "/nixos/" + path); | ||||||
|
|
||||||
| rauc = (import ./rauc) super; | ||||||
| # use RAUC from installer/skeleton | ||||||
| rauc = (import ../installer/pkgs).rauc; | ||||||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This might be an overkill, because it pulls in all the dependencies from installer's nixpkgs. If we want to avoid this, we could do:
Suggested change
The resulting RAUC bundle size difference is quite minimal, around 50MB:
|
||||||
|
|
||||||
| ocamlPackages = super.ocamlPackages.overrideScope (self: super: { | ||||||
| semver = self.callPackage ./ocaml-modules/semver {}; | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I support a new greeting art, and inlining it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current greeting is broken also, because the label text overflows the next line gets indented.