calamares: 3.3.13 -> 3.4.0, qt6-ize, clean up (#430636)

This commit is contained in:
K900
2025-08-12 15:16:19 +03:00
committed by GitHub
51 changed files with 2404 additions and 644 deletions
@@ -11,7 +11,7 @@
# Add Firefox and other tools useful for installation to the launcher
favoriteAppsOverride = ''
[org.gnome.shell]
favorite-apps=[ 'firefox.desktop', 'nixos-manual.desktop', 'org.gnome.Console.desktop', 'org.gnome.Nautilus.desktop', 'gparted.desktop', 'io.calamares.calamares.desktop' ]
favorite-apps=[ 'firefox.desktop', 'nixos-manual.desktop', 'org.gnome.Console.desktop', 'org.gnome.Nautilus.desktop', 'gparted.desktop', 'calamares.desktop' ]
'';
# Override GNOME defaults to disable GNOME tour and disable suspend
@@ -45,8 +45,8 @@
ln -sfT ${pkgs.plasma5Packages.konsole}/share/applications/org.kde.konsole.desktop ${
desktopDir + "org.kde.konsole.desktop"
}
ln -sfT ${pkgs.calamares-nixos}/share/applications/io.calamares.calamares.desktop ${
desktopDir + "io.calamares.calamares.desktop"
ln -sfT ${pkgs.calamares-nixos}/share/applications/calamares.desktop ${
desktopDir + "calamares.desktop"
}
'';
@@ -50,8 +50,8 @@
ln -sfT ${manualDesktopFile} ${desktopDir + "nixos-manual.desktop"}
ln -sfT ${pkgs.gparted}/share/applications/gparted.desktop ${desktopDir + "gparted.desktop"}
ln -sfT ${pkgs.calamares-nixos}/share/applications/io.calamares.calamares.desktop ${
desktopDir + "io.calamares.calamares.desktop"
ln -sfT ${pkgs.calamares-nixos}/share/applications/calamares.desktop ${
desktopDir + "calamares.desktop"
}
'';
@@ -4,16 +4,18 @@
{ pkgs, ... }:
let
calamares-nixos-autostart = pkgs.makeAutostartItem {
name = "io.calamares.calamares";
name = "calamares";
package = pkgs.calamares-nixos;
};
in
{
imports = [ ./installation-cd-graphical-base.nix ];
# required for kpmcore to work correctly
programs.partition-manager.enable = true;
environment.systemPackages = with pkgs; [
# Calamares for graphical installation
libsForQt5.kpmcore
calamares-nixos
calamares-nixos-autostart
calamares-nixos-extensions
+1 -1
View File
@@ -15,7 +15,7 @@ in
programs.partition-manager = {
enable = lib.mkEnableOption "KDE Partition Manager";
package = lib.mkPackageOption pkgs [ "libsForQt5" "partitionmanager" ] { };
package = lib.mkPackageOption pkgs [ "kdePackages" "partitionmanager" ] { };
};
};
@@ -1,26 +1,25 @@
{
stdenv,
fetchFromGitHub,
lib,
glibcLocales,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "calamares-nixos-extensions";
version = "0.3.23";
src = fetchFromGitHub {
owner = "NixOS";
repo = "calamares-nixos-extensions";
rev = finalAttrs.version;
hash = "sha256-KNRztajU7sTLNDwCwP4WOdR2IRMqfbeapdko58LcrjM=";
};
src = ./src;
installPhase = ''
runHook preInstall
mkdir -p $out/{lib,share}/calamares
mkdir -p $out/{etc,lib,share}/calamares
cp -r modules $out/lib/calamares/
cp -r config/* $out/share/calamares/
cp -r config/* $out/etc/calamares/
cp -r branding $out/share/calamares/
substituteInPlace $out/etc/calamares/settings.conf --replace-fail @out@ $out
substituteInPlace $out/etc/calamares/modules/locale.conf --replace-fail @glibcLocales@ ${glibcLocales}
runHook postInstall
'';
@@ -28,11 +27,10 @@ stdenv.mkDerivation (finalAttrs: {
description = "Calamares modules for NixOS";
homepage = "https://github.com/NixOS/calamares-nixos-extensions";
license = with licenses; [
gpl3Plus
bsd2
mit
# assets
cc-by-40
cc-by-sa-40
cc0
];
maintainers = with maintainers; [ vlinkz ];
platforms = platforms.linux;
@@ -0,0 +1,233 @@
# SPDX-FileCopyrightText: no
# SPDX-License-Identifier: CC0-1.0
#
---
componentName: nixos
### WELCOME / OVERALL WORDING
#
# These settings affect some overall phrasing and looks,
# which are most visible in the welcome page.
# This selects between different welcome texts. When false, uses
# the traditional "Welcome to the %1 installer.", and when true,
# uses "Welcome to the Calamares installer for %1." This allows
# to distinguish this installer from other installers for the
# same distribution.
welcomeStyleCalamares: false
# Should the welcome image (productWelcome, below) be scaled
# up beyond its natural size? If false, the image does not grow
# with the window but remains the same size throughout (this
# may have surprising effects on HiDPI monitors).
welcomeExpandingLogo: true
### WINDOW CONFIGURATION
#
# The settings here affect the placement of the Calamares
# window through hints to the window manager and initial
# sizing of the Calamares window.
# Size and expansion policy for Calamares.
# - "normal" or unset, expand as needed, use *windowSize*
# - "fullscreen", start as large as possible, ignore *windowSize*
# - "noexpand", don't expand automatically, use *windowSize*
windowExpanding: normal
# Size of Calamares window, expressed as w,h. Both w and h
# may be either pixels (suffix px) or font-units (suffix em).
# e.g. "800px,600px"
# "60em,480px"
# This setting is ignored if "fullscreen" is selected for
# *windowExpanding*, above. If not set, use constants defined
# in CalamaresUtilsGui, 800x520.
windowSize: 800px,520px
# Placement of Calamares window. Either "center" or "free".
# Whether "center" actually works does depend on the window
# manager in use (and only makes sense if you're not using
# *windowExpanding* set to "fullscreen").
windowPlacement: center
### PANELS CONFIGURATION
#
# Calamares has a main content area, and two panels (navigation
# and progress / sidebar). The panels can be controlled individually,
# or switched off. If both panels are switched off, the layout of
# the main content area loses its margins, on the assumption that
# you're doing something special.
# Kind of sidebar (panel on the left, showing progress).
# - "widget" or unset, use traditional sidebar (logo, items)
# - "none", hide it entirely
# - "qml", use calamares-sidebar.qml from branding folder
# In addition, you **may** specify a side, separated by a comma,
# from the kind. Valid sides are:
# - "left" (if not specified, uses this)
# - "right"
# - "top"
# - "bottom"
# For instance, "widget,right" is valid; so is "qml", which defaults
# to putting the sidebar on the left. Also valid is "qml,top".
# While "widget,top" is valid, the widgets code is **not** flexible
# and results will be terrible.
sidebar: widget
# Kind of navigation (button panel on the bottom).
# - "widget" or unset, use traditional navigation
# - "none", hide it entirely
# - "qml", use calamares-navigation.qml from branding folder
# In addition, you **may** specify a side, separated by a comma,
# from the kind. The same sides are valid as for *sidebar*,
# except the default is *bottom*.
navigation: widget
### STRINGS, IMAGES AND COLORS
#
# This section contains the "branding proper" of names
# and images, rather than global-look settings.
# These are strings shown to the user in the user interface.
# There is no provision for translating them -- since they
# are names, the string is included as-is.
#
# The four Url strings are the Urls used by the buttons in
# the welcome screen, and are not shown to the user. Clicking
# on the "Support" button, for instance, opens the link supportUrl.
# If a Url is empty, the corresponding button is not shown.
#
# bootloaderEntryName is how this installation / distro is named
# in the boot loader (e.g. in the GRUB menu).
#
# These strings support substitution from /etc/os-release
# if KDE Frameworks 5.58 are available at build-time. When
# enabled, ${varname} is replaced by the equivalent value
# from os-release. All the supported var-names are in all-caps,
# and are listed on the FreeDesktop.org site,
# https://www.freedesktop.org/software/systemd/man/os-release.html
# Note that ANSI_COLOR and CPE_NAME don't make sense here, and
# are not supported (the rest are). Remember to quote the string
# if it contains substitutions, or you'll get YAML exceptions.
#
# The *Url* entries are used on the welcome page, and they
# are visible as buttons there if the corresponding *show* keys
# are set to "true" (they can also be overridden).
strings:
productName: "${NAME}"
shortProductName: NixOS
version:
shortVersion:
versionedName: NixOS
shortVersionedName: NixOS
bootloaderEntryName: NixOS
productUrl: https://nixos.org/
supportUrl: https://nixos.org/manual/nixos
knownIssuesUrl: https://github.com/NixOS/nixpkgs/issues
releaseNotesUrl: https://nixos.org/manual/nixos/stable/release-notes.html
donateUrl: https://nixos.org/donate.html
# These images are loaded from the branding module directory.
#
# productBanner is an optional image, which if present, will be shown
# on the welcome page of the application, above the welcome text.
# It is intended to have a width much greater than height.
# It is displayed at 64px height (also on HiDPI).
# Recommended size is 64px tall, and up to 460px wide.
# productIcon is used as the window icon, and will (usually) be used
# by the window manager to represent the application. This image
# should be square, and may be displayed by the window manager
# as small as 16x16 (but possibly larger).
# productLogo is used as the logo at the top of the left-hand column
# which shows the steps to be taken. The image should be square,
# and is displayed at 80x80 pixels (also on HiDPI).
# productWallpaper is an optional image, which if present, will replace
# the normal solid background on every page of the application.
# It can be any size and proportion,
# and will be tiled to fit the entire window.
# For a non-tiled wallpaper, the size should be the same as
# the overall window, see *windowSize* above (800x520).
# productWelcome is shown on the welcome page of the application in
# the middle of the window, below the welcome text. It can be
# any size and proportion, and will be scaled to fit inside
# the window. Use `welcomeExpandingLogo` to make it non-scaled.
# Recommended size is 320x150.
#
# These filenames can also use substitutions from os-release (see above).
images:
# productBanner: "banner.png"
productIcon: "nix-snowflake.svg"
productLogo: "white.png"
# productWallpaper: "wallpaper.png"
productWelcome: "nix-snowflake.svg"
# Colors for text and background components.
#
# - SidebarBackground is the background of the sidebar
# - SidebarText is the (foreground) text color
# - SidebarBackgroundCurrent sets the background of the current step.
# Optional, and defaults to the application palette.
# - SidebarTextCurrent is the text color of the current step.
#
# These colors can **also** be set through the stylesheet, if the
# branding component also ships a stylesheet.qss. Then they are
# the corresponding CSS attributes of #sidebarApp.
style:
SidebarBackground: "#5277C3"
SidebarText: "#FFFFFF"
SidebarTextCurrent: "#292F34"
SidebarBackgroundCurrent: "#7EBAE4"
### SLIDESHOW
#
# The slideshow is displayed during execution steps (e.g. when the
# installer is actually writing to disk and doing other slow things).
# The slideshow can be a QML file (recommended) which can display
# arbitrary things -- text, images, animations, or even play a game --
# during the execution step. The QML **is** abruptly stopped when the
# execution step is done, though, so maybe a game isn't a great idea.
#
# The slideshow can also be a sequence of images (not recommended unless
# you don't want QML at all in your Calamares). The images are displayed
# at a rate of 1 every 2 seconds during the execution step.
#
# To configure a QML file, list a single filename:
# slideshow: "show.qml"
# To configure images, like the filenames (here, as an inline list):
# slideshow: [ "/etc/calamares/slideshow/0.png", "/etc/logo.png" ]
slideshow: "show.qml"
# There are two available APIs for a QML slideshow:
# - 1 (the default) loads the entire slideshow when the installation-
# slideshow page is shown and starts the QML then. The QML
# is never stopped (after installation is done, times etc.
# continue to fire).
# - 2 loads the slideshow on startup and calls onActivate() and
# onLeave() in the root object. After the installation is done,
# the show is stopped (first by calling onLeave(), then destroying
# the QML components).
#
# An image slideshow does not need to have the API defined.
slideshowAPI: 2
# These options are to customize online uploading of logs to pastebins:
# - type : Defines the kind of pastebin service to be used. Currently
# it accepts two values:
# - none : disables the pastebin functionality
# - fiche : use fiche pastebin server
# - url : Defines the address of pastebin service to be used.
# Takes string as input. Important bits are the host and port,
# the scheme is not used.
# - sizeLimit : Defines maximum size limit (in KiB) of log file to be pasted.
# The option must be set, to have the log option work.
# Takes integer as input. If < 0, no limit will be forced,
# else only last (approximately) 'n' KiB of log file will be pasted.
# Please note that upload size may be slightly over the limit (due
# to last minute logging), so provide a suitable value.
uploadServer :
type : "fiche"
url : "http://termbin.com:9999"
sizeLimit : -1
Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 828 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 958 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

@@ -0,0 +1,513 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="141.5919mm"
height="122.80626mm"
viewBox="0 0 501.70361 435.14028"
id="svg2"
version="1.1"
inkscape:version="0.92.0 r15299"
sodipodi:docname="nix-snowflake.svg">
<defs
id="defs4">
<linearGradient
inkscape:collect="always"
id="linearGradient5562">
<stop
style="stop-color:#699ad7;stop-opacity:1"
offset="0"
id="stop5564" />
<stop
id="stop5566"
offset="0.24345198"
style="stop-color:#7eb1dd;stop-opacity:1" />
<stop
style="stop-color:#7ebae4;stop-opacity:1"
offset="1"
id="stop5568" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient5053">
<stop
style="stop-color:#415e9a;stop-opacity:1"
offset="0"
id="stop5055" />
<stop
id="stop5057"
offset="0.23168644"
style="stop-color:#4a6baf;stop-opacity:1" />
<stop
style="stop-color:#5277c3;stop-opacity:1"
offset="1"
id="stop5059" />
</linearGradient>
<linearGradient
id="linearGradient5960"
inkscape:collect="always">
<stop
id="stop5962"
offset="0"
style="stop-color:#637ddf;stop-opacity:1" />
<stop
style="stop-color:#649afa;stop-opacity:1"
offset="0.23168644"
id="stop5964" />
<stop
id="stop5966"
offset="1"
style="stop-color:#719efa;stop-opacity:1" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient5867">
<stop
style="stop-color:#7363df;stop-opacity:1"
offset="0"
id="stop5869" />
<stop
id="stop5871"
offset="0.23168644"
style="stop-color:#6478fa;stop-opacity:1" />
<stop
style="stop-color:#719efa;stop-opacity:1"
offset="1"
id="stop5873" />
</linearGradient>
<linearGradient
y2="515.97058"
x2="282.26105"
y1="338.62445"
x1="213.95642"
gradientTransform="translate(983.36076,601.38885)"
gradientUnits="userSpaceOnUse"
id="linearGradient5855"
xlink:href="#linearGradient5960"
inkscape:collect="always" />
<linearGradient
y2="515.97058"
x2="282.26105"
y1="338.62445"
x1="213.95642"
gradientTransform="translate(-197.75174,-337.1451)"
gradientUnits="userSpaceOnUse"
id="linearGradient5855-8"
xlink:href="#linearGradient5867"
inkscape:collect="always" />
<linearGradient
y2="247.58188"
x2="-702.75317"
y1="102.74675"
x1="-775.20807"
gradientTransform="translate(983.36076,601.38885)"
gradientUnits="userSpaceOnUse"
id="linearGradient4544"
xlink:href="#linearGradient5960"
inkscape:collect="always" />
<clipPath
id="clipPath4501"
clipPathUnits="userSpaceOnUse">
<circle
r="241.06563"
cy="686.09473"
cx="335.13995"
id="circle4503"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#adadad;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
</clipPath>
<clipPath
id="clipPath5410"
clipPathUnits="userSpaceOnUse">
<circle
r="241.13741"
cy="340.98975"
cx="335.98114"
id="circle5412"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
</clipPath>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5053"
id="linearGradient5137"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(864.55062,-2197.497)"
x1="-584.19934"
y1="782.33563"
x2="-496.29703"
y2="937.71399" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5053"
id="linearGradient5147"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(864.55062,-2197.497)"
x1="-584.19934"
y1="782.33563"
x2="-496.29703"
y2="937.71399" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5562"
id="linearGradient5162"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(70.505061,-1761.3076)"
x1="200.59668"
y1="351.41116"
x2="290.08701"
y2="506.18814" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5562"
id="linearGradient5172"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(70.505061,-1761.3076)"
x1="200.59668"
y1="351.41116"
x2="290.08701"
y2="506.18814" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5562"
id="linearGradient5182"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(70.505061,-1761.3076)"
x1="200.59668"
y1="351.41116"
x2="290.08701"
y2="506.18814" />
<linearGradient
y2="506.18814"
x2="290.08701"
y1="351.41116"
x1="200.59668"
gradientTransform="translate(70.505061,-1761.3076)"
gradientUnits="userSpaceOnUse"
id="linearGradient5201"
xlink:href="#linearGradient5562"
inkscape:collect="always" />
<linearGradient
y2="937.71399"
x2="-496.29703"
y1="782.33563"
x1="-584.19934"
gradientTransform="translate(864.55062,-2197.497)"
gradientUnits="userSpaceOnUse"
id="linearGradient5205"
xlink:href="#linearGradient5053"
inkscape:collect="always" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5562"
id="linearGradient4328"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(70.650339,-1055.1511)"
x1="200.59668"
y1="351.41116"
x2="290.08701"
y2="506.18814" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5053"
id="linearGradient4330"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(864.69589,-1491.3405)"
x1="-584.19934"
y1="782.33563"
x2="-496.29703"
y2="937.71399" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.98318225"
inkscape:cx="113.58176"
inkscape:cy="-45.193301"
inkscape:document-units="px"
inkscape:current-layer="layer3"
showgrid="false"
inkscape:window-width="2560"
inkscape:window-height="1577"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:snap-global="true"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer7"
inkscape:label="bg"
style="display:none"
transform="translate(-23.75651,-24.84972)">
<rect
transform="translate(-132.5822,958.04022)"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect5389"
width="1543.4283"
height="483.7439"
x="132.5822"
y="-957.77832" />
</g>
<g
inkscape:groupmode="layer"
id="layer6"
inkscape:label="logo-guide"
style="display:none"
transform="translate(-156.33871,933.1905)">
<rect
y="-958.02759"
x="132.65129"
height="484.30399"
width="550.41602"
id="rect5379"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5c201e;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
inkscape:export-filename="/home/tim/dev/nix/homepage/logo/nix-wiki.png"
inkscape:export-xdpi="22.07"
inkscape:export-ydpi="22.07" />
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#c24a46;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect5372"
width="501.94415"
height="434.30405"
x="156.12303"
y="-933.02759"
inkscape:export-filename="/home/tim/dev/nix/homepage/logo/nixos-logo-only-hires-print.png"
inkscape:export-xdpi="212.2"
inkscape:export-ydpi="212.2" />
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#d98d8a;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect5381"
width="24.939611"
height="24.939611"
x="658.02826"
y="-958.04022" />
</g>
<g
inkscape:label="print-logo"
inkscape:groupmode="layer"
id="layer1"
style="display:inline"
transform="translate(-156.33871,933.1905)"
sodipodi:insensitive="true">
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5277c3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 309.40365,-710.2521 122.19683,211.6751 -56.15706,0.5268 -32.6236,-56.8692 -32.85645,56.5653 -27.90237,-0.011 -14.29086,-24.6896 46.81047,-80.4902 -33.22946,-57.8256 z"
id="path4861"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccc" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#7ebae4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 353.50926,-797.4433 -122.21756,211.6631 -28.53477,-48.37 32.93839,-56.6875 -65.41521,-0.1719 -13.9414,-24.1698 14.23637,-24.721 93.11177,0.2939 33.46371,-57.6903 z"
id="use4863"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccc" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#7ebae4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 362.88537,-628.243 244.41439,0.012 -27.62229,48.8968 -65.56199,-0.1817 32.55876,56.7371 -13.96098,24.1585 -28.52722,0.032 -46.3013,-80.7841 -66.69317,-0.1353 z"
id="use4865"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccc" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#7ebae4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 505.14318,-720.9886 -122.19683,-211.6751 56.15706,-0.5268 32.6236,56.8692 32.85645,-56.5653 27.90237,0.011 14.29086,24.6896 -46.81047,80.4902 33.22946,57.8256 z"
id="use4867"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccc" />
<path
sodipodi:nodetypes="cccccccccc"
inkscape:connector-curvature="0"
id="path4873"
d="m 309.40365,-710.2521 122.19683,211.6751 -56.15706,0.5268 -32.6236,-56.8692 -32.85645,56.5653 -27.90237,-0.011 -14.29086,-24.6896 46.81047,-80.4902 -33.22946,-57.8256 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5277c3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<path
sodipodi:nodetypes="cccccccccc"
inkscape:connector-curvature="0"
id="use4875"
d="m 451.3364,-803.53264 -244.4144,-0.012 27.62229,-48.89685 65.56199,0.18175 -32.55875,-56.73717 13.96097,-24.15851 28.52722,-0.0315 46.3013,80.78414 66.69317,0.13524 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5277c3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<path
sodipodi:nodetypes="cccccccccc"
inkscape:connector-curvature="0"
id="use4877"
d="m 460.87178,-633.8425 122.21757,-211.66304 28.53477,48.37003 -32.93839,56.68751 65.4152,0.1718 13.9414,24.1698 -14.23636,24.7211 -93.11177,-0.294 -33.46371,57.6904 z"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5277c3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<g
id="layer2"
inkscape:label="guides"
style="display:none"
transform="translate(72.039038,-1799.4476)">
<path
d="M 460.60629,594.72881 209.74183,594.7288 84.309616,377.4738 209.74185,160.21882 l 250.86446,1e-5 125.43222,217.255 z"
inkscape:randomized="0"
inkscape:rounded="0"
inkscape:flatsided="true"
sodipodi:arg2="1.5707963"
sodipodi:arg1="1.0471976"
sodipodi:r2="217.25499"
sodipodi:r1="250.86446"
sodipodi:cy="377.47382"
sodipodi:cx="335.17407"
sodipodi:sides="6"
id="path6032"
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.23600003;fill:#4e4d52;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
sodipodi:type="star" />
<path
transform="translate(0,-308.26772)"
sodipodi:type="star"
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#4e4d52;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
id="path5875"
sodipodi:sides="6"
sodipodi:cx="335.17407"
sodipodi:cy="685.74158"
sodipodi:r1="100.83495"
sodipodi:r2="87.32563"
sodipodi:arg1="1.0471976"
sodipodi:arg2="1.5707963"
inkscape:flatsided="true"
inkscape:rounded="0"
inkscape:randomized="0"
d="m 385.59154,773.06721 -100.83495,0 -50.41747,-87.32564 50.41748,-87.32563 100.83495,10e-6 50.41748,87.32563 z" />
<path
transform="translate(0,-308.26772)"
sodipodi:nodetypes="ccccccccc"
inkscape:connector-curvature="0"
id="path5851"
d="m 1216.5591,938.53395 123.0545,228.14035 -42.6807,-1.2616 -43.4823,-79.7725 -39.6506,80.3267 -32.6875,-19.7984 53.4737,-100.2848 -37.1157,-73.88955 z"
style="fill:url(#linearGradient5855);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.41499999;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#c53a3a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect5884"
width="48.834862"
height="226.22897"
x="-34.74221"
y="446.17056"
transform="rotate(-30)" />
<path
transform="translate(0,-308.26772)"
sodipodi:type="star"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:0.50899999;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="path3428"
sodipodi:sides="6"
sodipodi:cx="223.93674"
sodipodi:cy="878.63831"
sodipodi:r1="28.048939"
sodipodi:r2="24.291094"
sodipodi:arg1="0"
sodipodi:arg2="0.52359878"
inkscape:flatsided="true"
inkscape:rounded="0"
inkscape:randomized="0"
d="m 251.98568,878.63831 -14.02447,24.29109 h -28.04894 l -14.02447,-24.29109 14.02447,-24.2911 h 28.04894 z" />
<use
x="0"
y="0"
xlink:href="#rect5884"
id="use4252"
transform="rotate(60,268.29786,489.4515)"
width="100%"
height="100%" />
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:0.6507937;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect4254"
width="5.3947482"
height="115.12564"
x="545.71014"
y="467.07007"
transform="rotate(30,575.23539,-154.13386)" />
</g>
</g>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="gradient-logo"
style="display:inline;opacity:1"
sodipodi:insensitive="true"
transform="translate(-156.33871,933.1905)">
<path
sodipodi:nodetypes="cccccccccc"
inkscape:connector-curvature="0"
id="path3336-6"
d="m 309.54892,-710.38827 122.19683,211.67512 -56.15706,0.5268 -32.6236,-56.8692 -32.85645,56.5653 -27.90237,-0.011 -14.29086,-24.6896 46.81047,-80.4901 -33.22946,-57.8257 z"
style="opacity:1;fill:url(#linearGradient4328);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<use
height="100%"
width="100%"
transform="rotate(60,407.11155,-715.78724)"
id="use3439-6"
inkscape:transform-center-y="151.59082"
inkscape:transform-center-x="124.43045"
xlink:href="#path3336-6"
y="0"
x="0" />
<use
height="100%"
width="100%"
transform="rotate(-60,407.31177,-715.70016)"
id="use3445-0"
inkscape:transform-center-y="75.573958"
inkscape:transform-center-x="-168.20651"
xlink:href="#path3336-6"
y="0"
x="0" />
<use
height="100%"
width="100%"
transform="rotate(180,407.41868,-715.7565)"
id="use3449-5"
inkscape:transform-center-y="-139.94592"
inkscape:transform-center-x="59.669705"
xlink:href="#path3336-6"
y="0"
x="0" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#linearGradient4330);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 309.54892,-710.38827 122.19683,211.67512 -56.15706,0.5268 -32.6236,-56.8692 -32.85645,56.5653 -27.90237,-0.011 -14.29086,-24.6896 46.81047,-80.4901 -33.22946,-57.8256 z"
id="path4260-0"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccc" />
<use
height="100%"
width="100%"
transform="rotate(120,407.33916,-716.08356)"
id="use4354-5"
xlink:href="#path4260-0"
y="0"
x="0"
style="display:inline" />
<use
height="100%"
width="100%"
transform="rotate(-120,407.28823,-715.86995)"
id="use4362-2"
xlink:href="#path4260-0"
y="0"
x="0"
style="display:inline" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 26 KiB

@@ -0,0 +1,34 @@
import io.calamares.core
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import org.kde.kirigami as Kirigami
Page {
width: parent.width
height: parent.height
ColumnLayout {
width: parent.width
spacing: Kirigami.Units.smallSpacing
Column {
Layout.fillWidth: true
Text {
text: qsTr("NixOS is fully open source, but it also provides optional software packages that do not respect users' freedom to run, copy, distribute, study, change and improve the software, and are commonly not open source. By default such \"unfree\" packages are not allowed, but you can enable it here. If you check this box, you agree that unfree software may be installed which might have additional End User License Agreements (EULAs) that you need to agree to. If not enabled, some hardware (notably Nvidia GPUs and some WiFi chips) might not work or not work optimally.<br/>")
width: parent.width
wrapMode: Text.WordWrap
}
CheckBox {
text: qsTr("Allow unfree software")
onCheckedChanged: {
Global.insert("nixos_allow_unfree", checked)
}
}
}
}
}
@@ -0,0 +1,122 @@
import QtQuick 2.0;
import calamares.slideshow 1.0;
Presentation
{
id: presentation
function nextSlide() {
presentation.goToNextSlide();
}
Timer {
id: advanceTimer
interval: 20000
running: presentation.activatedInCalamares
repeat: true
onTriggered: nextSlide()
}
Slide {
Text {
id: text1
anchors.centerIn: parent
text: "Reproducible"
font.pixelSize: 30
wrapMode: Text.WordWrap
width: presentation.width
horizontalAlignment: Text.Center
color: "#6586C8"
}
Image {
id: background1
source: "gfx-landing-reproducible.png"
width: 200; height: 200
fillMode: Image.PreserveAspectFit
anchors.bottom: text1.top
anchors.horizontalCenter: parent.horizontalCenter
}
Text {
anchors.horizontalCenter: background1.horizontalCenter
anchors.top: text1.bottom
text: "Nix builds packages in isolation from each other.<br/>"+
"This ensures that they are reproducible and don't<br/>"+
"have undeclared dependencies, so <b>if a package<br/>"+
"works on one machine, it will also work on another.</b>"
wrapMode: Text.WordWrap
width: presentation.width
horizontalAlignment: Text.Center
}
}
Slide {
Text {
id: text2
anchors.centerIn: parent
text: "Declarative"
font.pixelSize: 30
wrapMode: Text.WordWrap
width: presentation.width
horizontalAlignment: Text.Center
color: "#6586C8"
}
Image {
id: background2
source: "gfx-landing-declarative.png"
width: 200; height: 200
fillMode: Image.PreserveAspectFit
anchors.bottom: text2.top
anchors.horizontalCenter: parent.horizontalCenter
}
Text {
anchors.horizontalCenter: background2.horizontalCenter
anchors.top: text2.bottom
text: "Nix makes it <b>trivial to share development and build<br/>"+
"environments</b> for your projects, regardless of what<br/>"+
"programming languages and tools youre using."
wrapMode: Text.WordWrap
width: presentation.width
horizontalAlignment: Text.Center
}
}
Slide {
Text {
id: text3
anchors.centerIn: parent
text: "Reliable"
font.pixelSize: 30
wrapMode: Text.WordWrap
width: presentation.width
horizontalAlignment: Text.Center
color: "#6586C8"
}
Image {
id: background3
source: "gfx-landing-reliable.png"
width: 200; height: 200
fillMode: Image.PreserveAspectFit
anchors.bottom: text3.top
anchors.horizontalCenter: parent.horizontalCenter
}
Text {
anchors.horizontalCenter: background3.horizontalCenter
anchors.top: text3.bottom
text: "Nix ensures that installing or upgrading one package<br/>"+
"<b>cannot break other packages.</b> It allows you to <b>roll<br/>"+
"back to previous versions,</b> and ensures that no<br/>"+
"package is in an inconsistent state during an<br/>"+
"upgrade."
wrapMode: Text.WordWrap
width: presentation.width
horizontalAlignment: Text.Center
}
}
function onActivate() {
presentation.currentSlide = 0;
}
function onLeave() {
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

@@ -0,0 +1,4 @@
# https://codeberg.org/Calamares/calamares/src/branch/calamares/src/modules/finished/finished.conf
restartNowMode: user-unchecked
restartNowCommand: "systemctl -i reboot"
notifyOnFinished: true
@@ -0,0 +1,7 @@
# https://codeberg.org/Calamares/calamares/src/branch/calamares/src/modules/keyboard/keyboard.conf
xOrgConfFileName: "/etc/X11/xorg.conf.d/00-keyboard.conf"
writeEtcDefaultKeyboard: false
# Use special code path to configure GNOME keyboard settings
configure:
gnome: true
@@ -0,0 +1,11 @@
# https://codeberg.org/Calamares/calamares/src/branch/calamares/src/modules/locale/locale.conf
useSystemTimezone: true
# Isn't supported on NixOS
adjustLiveTimezone: false
localeGenPath: @glibcLocales@/share/i18n/SUPPORTED
geoip:
style: "json"
url: "https://geoip.kde.org/v1/calamares"
@@ -0,0 +1,27 @@
# https://codeberg.org/Calamares/calamares/src/branch/calamares/src/modules/mount/mount.conf
extraMounts:
- device: proc
fs: proc
mountPoint: /proc
- device: sys
fs: sysfs
mountPoint: /sys
- device: /dev
mountPoint: /dev
options: [ bind ]
- device: tmpfs
fs: tmpfs
mountPoint: /run
- device: /run/udev
mountPoint: /run/udev
options: [ bind ]
- device: efivarfs
fs: efivarfs
mountPoint: /sys/firmware/efi/efivars
efi: true
# Ensure the right fmask/dmask is set on the ESP, as it will be
# picked up by nixos-generate-config later
mountOptions:
- filesystem: efi
options: [ fmask=0077, dmask=0077 ]
@@ -0,0 +1,105 @@
# https://codeberg.org/Calamares/calamares/src/branch/calamares/src/modules/packagechooser/packagechooser.conf
mode: required
# FIXME: what's the correct way of doing this now?
method: legacy
labels:
step: "Desktop"
default: gnome
items:
- id: gnome
packages: [ gnome ]
name: GNOME
description: "<html>Every part of GNOME has been designed to make it simple and easy to use. It provides a focused working environment that helps you get things done. GNOME is a popular choice and well tested on NixOS.<br/>
<br/>
Learn more at <a href=\"https://www.gnome.org/\">gnome.org</a></html>"
screenshot: "images/gnome.png"
- id: plasma6
packages: [ plasma6 ]
name: Plasma
description: "<html>Plasma is made to stay out of the way as it helps you get things done. But under its light and intuitive surface, it's a highly customizable. So you're free to choose ways of usage right as you need them and when you need them. Plasma is a popular choice and well tested on NixOS.<br/>
<br/>
Learn more at <a href=\"https://kde.org/plasma-desktop/\">kde.org/plasma-desktop</a></html>"
screenshot: "images/plasma6.png"
- id: xfce
packages: [ xfce ]
name: Xfce
description: "<html>Xfce is a lightweight desktop environment. It aims to be fast and low on system resources, while still being visually appealing and user friendly.<br/>
<br/>
Learn more at <a href=\"https://www.xfce.org/\">xfce.org</a></html>"
screenshot: "images/xfce.png"
- id: pantheon
packages: [ pantheon ]
name: Pantheon
description: "<html>Pantheon is the default desktop of Elementary OS. It provides a productive and intuitive user experience while also being visually appealing.<br/>
<br/>
Learn more at <a href=\"https://elementary.io/docs/learning-the-basics\">elementary.io/docs/learning-the-basics</a></html>"
screenshot: "images/pantheon.png"
- id: cinnamon
packages: [ cinnamon ]
name: Cinnamon
description: "<html>Cinnamon is a desktop which provides advanced innovative features and a traditional user experience. The emphasis is put on making users feel at home and providing them with an easy to use and comfortable desktop experience.<br/>
<br/>
Learn more at <a href=\"https://projects.linuxmint.com/cinnamon/\">projects.linuxmint.com/cinnamon</a></html>"
screenshot: "images/cinnamon.png"
- id: mate
packages: [ mate ]
name: MATE
description: "<html>The MATE Desktop Environment is the continuation of GNOME 2. It provides an intuitive and attractive desktop environment.<br/>
<br/>
Learn more at <a href=\"https://mate-desktop.org/\">mate-desktop.org</a></html>"
screenshot: "images/mate.png"
- id: enlightenment
packages: [ enlightenment ]
name: Enlightenment
description: "<html>Enlightenment is a Window Manager, Compositor and Minimal Desktop. Enlightenment is classed as a desktop shell as it provides everything you need to operate your desktop or laptop, but it is not a full application suite.<br/>
<br/>
Learn more at <a href=\"https://www.enlightenment.org/\">enlightenment.org</a></html>"
screenshot: "images/enlightenment.png"
- id: lxqt
packages: [ lxqt ]
name: LXQt
description: "<html>LXQt is a lightweight Qt desktop environment. It will not get in your way. It will not hang or slow down your system. It is focused on being a classic desktop with a modern look and feel.<br/>
<br/>
Learn more at <a href=\"https://lxqt-project.org/\">lxqt-project.org</a></html>"
screenshot: "images/lxqt.png"
# Lumina is not yet stable enough, once it is, simply uncommenting the lines below is all that's needed to enable it as an option
#- id: lumina
# packages: [ lumina ]
# name: Lumina
# description: "<html>Lumina is designed to have a small footprint, giving your system the best performance possible. It is built to flow seamlessly between computer tasks and offers several integrated utilities in one convenient package.<br/>
# - Learn more at <a href=\"https://lumina-desktop.org/\">lumina-desktop.org</a></html>"
# screenshot: "images/lumina.png"
- id: budgie
packages: [ budgie ]
name: Budgie
description: "<html>The Budgie Desktop is a feature-rich, modern desktop designed to keep out the way of the user.<br/>
<br/>
Learn more at <a href=\"https://docs.buddiesofbudgie.org/\">buddiesofbudgie.org</a></html>"
screenshot: "images/budgie.png"
- id: deepin
packages: [ deepin ]
name: Deepin
description: "<html>The Deepin Desktop Environment is an elegant, easy to use and reliable desktop environment.<br/>
<br/>
Learn more at <a href=\"https://www.deepin.org/\">deepin.org</a></html>"
screenshot: "images/deepin.png"
- id: ""
packages: []
name: "No desktop"
screenshot: "images/nodesktop.png"
description: "A minimal system without a graphical user interface will be installed. This is great for servers or custom setups with window managers. The configuration can be changed after installation."
@@ -0,0 +1,22 @@
# https://codeberg.org/Calamares/calamares/src/branch/calamares/src/modules/partition/partition.conf
efi:
mountPoint: "/boot"
recommendedSize: 1GiB
minimumSize: 32MiB
label: "EFI"
userSwapChoices:
- none
- small
- suspend
luksGeneration: luks2
showNotEncryptedBootMessage: false
partitionLayout:
- name: "root"
filesystem: "ext4"
noEncrypt: false
mountPoint: "/"
size: 100%
@@ -0,0 +1,5 @@
---
qmlSearch: branding
qmlLabel:
notes: "Unfree software"
@@ -0,0 +1,32 @@
# https://codeberg.org/Calamares/calamares/src/branch/calamares/src/modules/users/users.conf
defaultGroups:
- users
- networkmanager
- wheel
setRootPassword: true
doReusePassword: false
doAutologin: false
# Recommended libpwquality settings from upstream
passwordRequirements:
minLength: 8
maxLength: 64
libpwquality:
- minlen=8
- maxrepeat=3
- maxsequence=3
- usersubstr=4
- badwords=linux
allowWeakPasswords: true
allowWeakPasswordsDefault: false
user:
shell: /run/current-system/sw/bin/bash
forbidden_names: [ root ]
hostname:
location: None
writeHostsFile: false
forbidden_names: [ localhost ]
@@ -0,0 +1,20 @@
# https://codeberg.org/Calamares/calamares/src/branch/calamares/src/modules/welcome/welcome.conf
showReleaseNotesUrl: true
requirements:
requiredStorage: 10
requiredRam: 3.0
internetCheckUrl: [ https://geoip.kde.org/v1/calamares, https://cache.nixos.org/ ]
check:
- storage
- ram
- power
- internet
- screen
required:
- storage
- ram
- internet
@@ -0,0 +1,208 @@
# Configuration file for Calamares
#
# This is the top-level configuration file for Calamares.
# It specifies what modules will be used, as well as some
# overall characteristics -- is this a setup program, or
# an installer. More specific configuration is devolved
# to the branding file (for the UI) and the individual
# module configuration files (for functionality).
---
# Modules can be job modules (with different interfaces) and QtWidgets view
# modules. They could all be placed in a number of different paths.
# "modules-search" is a list of strings, each of these can either be a full
# path to a directory or the keyword "local".
#
# "local" means:
# - modules in $LIBDIR/calamares/modules, with
# - settings in SHARE/calamares/modules or /etc/calamares/modules.
# In debug-mode (e.g. calamares -d) "local" also adds some paths
# that make sense from inside the build-directory, so that you
# can build-and-run with the latest modules immediately.
#
# Strings other than "local" are taken as paths and interpreted
# relative to wherever Calamares is started. It is therefore **strongly**
# recommended to use only absolute paths here. This is mostly useful
# if your distro has forks of standard Calamares modules, but also
# uses some form of upstream packaging which might overwrite those
# forked modules -- then you can keep modules somewhere outside of
# the "regular" module tree.
#
#
# YAML: list of strings.
modules-search: [ local, @out@/lib/calamares/modules ]
# Instances section. This section is optional, and it defines custom instances
# for modules of any kind. An instance entry has these keys:
# - *module* name, which matches the module name from the module descriptor
# (usually the name of the directory under `src/modules/`, but third-
# party modules may diverge.
# - *id* (optional) an identifier to distinguish this instance from
# all the others. If none is given, the name of the module is used.
# Together, the module and id form an instance key (see below).
# - *config* (optional) a filename for the configuration. If none is
# given, *module*`.conf` is used (e.g. `welcome.conf` for the welcome
# module)
# - *weight* (optional) In the *exec* phase of the sequence, progress
# is reported as jobs are completed. The jobs from a single module
# together contribute the full weight of that module. The overall
# progress (0 .. 100%) is divided up according to the weight of each
# module. Give modules that take a lot of time to complete, a larger
# weight to keep the overall progress moving along steadily. This
# weight overrides a weight given in the module descriptor. If no weight
# is given, uses the value from the module descriptor, or 1 if there
# isn't one there either.
#
# The primary goal of this mechanism is to allow loading multiple instances
# of the same module, with different configuration. If you don't need this,
# the instances section can safely be left empty.
#
# Module name plus instance name makes an instance key, e.g.
# "webview@owncloud", where "webview" is the module name (for the webview
# viewmodule) and "owncloud" is the instance name. In the *sequence*
# section below, use instance-keys to name instances (instead of just
# a module name, for modules which have only a single instance).
#
# Every module implicitly has an instance with the instance name equal
# to its module name, e.g. "welcome@welcome". In the *sequence* section,
# mentioning a module without a full instance key (e.g. "welcome")
# means that implicit module.
#
# An instance may specify its configuration file (e.g. `webview-home.conf`).
# The implicit instances all have configuration files named `<module>.conf`.
# This (implict) way matches the source examples, where the welcome
# module contains an example `welcome.conf`. Specify a *config* for
# any module (also implicit instances) to change which file is used.
#
# For more information on running module instances, run Calamares in debug
# mode and check the Modules page in the Debug information interface.
#
# A module that is often used with instances is shellprocess, which will
# run shell commands specified in the configuration file. By configuring
# more than one instance of the module, multiple shell sessions can be run
# during install.
#
# YAML: list of maps of string:string key-value pairs.
instances:
- id: unfree
module: notesqml
config: unfree.conf
# Sequence section. This section describes the sequence of modules, both
# viewmodules and jobmodules, as they should appear and/or run.
#
# A jobmodule instance key (or name) can only appear in an exec phase, whereas
# a viewmodule instance key (or name) can appear in both exec and show phases.
# There is no limit to the number of show or exec phases. However, the same
# module instance key should not appear more than once per phase, and
# deployers should take notice that the global storage structure is persistent
# throughout the application lifetime, possibly influencing behavior across
# phases. A show phase defines a sequence of viewmodules (and therefore
# pages). These viewmodules can offer up jobs for the execution queue.
#
# An exec phase displays a progress page (with brandable slideshow). This
# progress page iterates over the modules listed in the *immediately
# preceding* show phase, and enqueues their jobs, as well as any other jobs
# from jobmodules, in the order defined in the current exec phase.
#
# It then executes the job queue and clears it. If a viewmodule offers up a
# job for execution, but the module name (or instance key) isn't listed in the
# immediately following exec phase, this job will not be executed.
#
# YAML: list of lists of strings.
sequence:
- show:
- welcome
- locale
- keyboard
- users
- packagechooser
- notesqml@unfree
- partition
- summary
- exec:
- partition
- mount
- nixos
- users
- umount
- show:
- finished
# A branding component is a directory, either in SHARE/calamares/branding or
# in /etc/calamares/branding (the latter takes precedence). The directory must
# contain a YAML file branding.desc which may reference additional resources
# (such as images) as paths relative to the current directory.
#
# A branding component can also ship a QML slideshow for execution pages,
# along with translation files.
#
# Only the name of the branding component (directory) should be specified
# here, Calamares then takes care of finding it and loading the contents.
#
# YAML: string.
branding: nixos
# If this is set to true, Calamares will show an "Are you sure?" prompt right
# before each execution phase, i.e. at points of no return. If this is set to
# false, no prompt is shown. Default is false, but Calamares will complain if
# this is not explicitly set.
#
# YAML: boolean.
prompt-install: false
# If this is set to true, Calamares will execute all target environment
# commands in the current environment, without chroot. This setting should
# only be used when setting up Calamares as a post-install configuration tool,
# as opposed to a full operating system installer.
#
# Some official Calamares modules are not expected to function with this
# setting. (e.g. partitioning seems like a bad idea, since that is expected to
# have been done already)
#
# Default is false (for a normal installer), but Calamares will complain if
# this is not explicitly set.
#
# YAML: boolean.
dont-chroot: false
# If this is set to true, Calamares refers to itself as a "setup program"
# rather than an "installer". Defaults to the value of dont-chroot, but
# Calamares will complain if this is not explicitly set.
oem-setup: false
# If this is set to true, the "Cancel" button will be disabled entirely.
# The button is also hidden from view.
#
# This can be useful if when e.g. Calamares is used as a post-install
# configuration tool and you require the user to go through all the
# configuration steps.
#
# Default is false, but Calamares will complain if this is not explicitly set.
#
# YAML: boolean.
disable-cancel: false
# If this is set to true, the "Cancel" button will be disabled once
# you start the 'Installation', meaning there won't be a way to cancel
# the Installation until it has finished or installation has failed.
#
# Default is false, but Calamares will complain if this is not explicitly set.
#
# YAML: boolean.
disable-cancel-during-exec: false
# If this is set to true, the "Next" and "Back" button will be hidden once
# you start the 'Installation'.
#
# Default is false, but Calamares will complain if this is not explicitly set.
#
# YAML: boolean.
hide-back-and-next-during-exec: false
# If this is set to true, then once the end of the sequence has
# been reached, the quit (done) button is clicked automatically
# and Calamares will close. Default is false: the user will see
# that the end of installation has been reached, and that things are ok.
#
#
quit-at-end: false
@@ -0,0 +1,835 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import configparser
import libcalamares
import os
import subprocess
import re
import gettext
_ = gettext.translation(
"calamares-python",
localedir=libcalamares.utils.gettext_path(),
languages=libcalamares.utils.gettext_languages(),
fallback=True,
).gettext
# The following strings contain pieces of a nix-configuration file.
# They are adapted from the default config generated from the nixos-generate-config command.
cfghead = """# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
"""
cfgbootefi = """ # Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
"""
cfgbootbios = """ # Bootloader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "@@bootdev@@";
boot.loader.grub.useOSProber = true;
"""
cfgbootnone = """ # Disable bootloader.
boot.loader.grub.enable = false;
"""
cfgbootgrubcrypt = """ # Setup keyfile
boot.initrd.secrets = {
"/boot/crypto_keyfile.bin" = null;
};
boot.loader.grub.enableCryptodisk = true;
"""
cfgnetwork = """ networking.hostName = "@@hostname@@"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
"""
cfgnetworkmanager = """ # Enable networking
networking.networkmanager.enable = true;
"""
cfgconnman = """ # Enable networking
services.connman.enable = true;
"""
cfgnmapplet = """ # Enable network manager applet
programs.nm-applet.enable = true;
"""
cfgtime = """ # Set your time zone.
time.timeZone = "@@timezone@@";
"""
cfglocale = """ # Select internationalisation properties.
i18n.defaultLocale = "@@LANG@@";
"""
cfglocaleextra = """ i18n.extraLocaleSettings = {
LC_ADDRESS = "@@LC_ADDRESS@@";
LC_IDENTIFICATION = "@@LC_IDENTIFICATION@@";
LC_MEASUREMENT = "@@LC_MEASUREMENT@@";
LC_MONETARY = "@@LC_MONETARY@@";
LC_NAME = "@@LC_NAME@@";
LC_NUMERIC = "@@LC_NUMERIC@@";
LC_PAPER = "@@LC_PAPER@@";
LC_TELEPHONE = "@@LC_TELEPHONE@@";
LC_TIME = "@@LC_TIME@@";
};
"""
cfggnome = """ # Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
"""
cfgplasma6 = """ # Enable the X11 windowing system.
# You can disable this if you're only using the Wayland session.
services.xserver.enable = true;
# Enable the KDE Plasma Desktop Environment.
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;
"""
cfgxfce = """ # Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the XFCE Desktop Environment.
services.xserver.displayManager.lightdm.enable = true;
services.xserver.desktopManager.xfce.enable = true;
"""
cfgpantheon = """ # Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the Pantheon Desktop Environment.
services.xserver.displayManager.lightdm.enable = true;
services.xserver.desktopManager.pantheon.enable = true;
"""
cfgcinnamon = """ # Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the Cinnamon Desktop Environment.
services.xserver.displayManager.lightdm.enable = true;
services.xserver.desktopManager.cinnamon.enable = true;
"""
cfgmate = """ # Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the MATE Desktop Environment.
services.xserver.displayManager.lightdm.enable = true;
services.xserver.desktopManager.mate.enable = true;
"""
cfgenlightenment = """ # Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the Enlightenment Desktop Environment.
services.xserver.displayManager.lightdm.enable = true;
services.xserver.desktopManager.enlightenment.enable = true;
# Enable acpid
services.acpid.enable = true;
"""
cfglxqt = """ # Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the LXQT Desktop Environment.
services.xserver.displayManager.lightdm.enable = true;
services.xserver.desktopManager.lxqt.enable = true;
"""
cfglumina = """ # Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the Lumina Desktop Environment.
services.xserver.displayManager.lightdm.enable = true;
services.xserver.desktopManager.lumina.enable = true;
"""
cfgbudgie = """ # Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the Budgie Desktop environment.
services.xserver.displayManager.lightdm.enable = true;
services.xserver.desktopManager.budgie.enable = true;
"""
cfgdeepin = """ # Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the Deepin Desktop Environment.
services.xserver.displayManager.lightdm.enable = true;
services.xserver.desktopManager.deepin.enable = true;
"""
cfgkeymap = """ # Configure keymap in X11
services.xserver.xkb = {
layout = "@@kblayout@@";
variant = "@@kbvariant@@";
};
"""
cfgconsole = """ # Configure console keymap
console.keyMap = "@@vconsole@@";
"""
cfgmisc = """ # Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
"""
cfgusers = """ # Define a user account. Don't forget to set a password with passwd.
users.users.@@username@@ = {
isNormalUser = true;
description = "@@fullname@@";
extraGroups = [ @@groups@@ ];
packages = with pkgs; [@@pkgs@@];
};
"""
cfgfirefox = """ # Install firefox.
programs.firefox.enable = true;
"""
cfgautologin = """ # Enable automatic login for the user.
services.displayManager.autoLogin.enable = true;
services.displayManager.autoLogin.user = "@@username@@";
"""
cfgautologingdm = """ # Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
systemd.services."getty@tty1".enable = false;
systemd.services."autovt@tty1".enable = false;
"""
cfgautologintty = """ # Enable automatic login for the user.
services.getty.autologinUser = "@@username@@";
"""
cfgunfree = """ # Allow unfree packages
nixpkgs.config.allowUnfree = true;
"""
cfgpkgs = """ # List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
];
"""
cfgtail = """ # Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "@@nixosversion@@"; # Did you read the comment?
}
"""
cfglatestkernel = """ # Use latest kernel.
boot.kernelPackages = pkgs.linuxPackages_latest;
"""
def env_is_set(name):
envValue = os.environ.get(name)
return not (envValue is None or envValue == "")
def generateProxyStrings():
proxyEnv = []
if env_is_set('http_proxy'):
proxyEnv.append('http_proxy={}'.format(os.environ.get('http_proxy')))
if env_is_set('https_proxy'):
proxyEnv.append('https_proxy={}'.format(os.environ.get('https_proxy')))
if env_is_set('HTTP_PROXY'):
proxyEnv.append('HTTP_PROXY={}'.format(os.environ.get('HTTP_PROXY')))
if env_is_set('HTTPS_PROXY'):
proxyEnv.append('HTTPS_PROXY={}'.format(os.environ.get('HTTPS_PROXY')))
if len(proxyEnv) > 0:
proxyEnv.insert(0, "env")
return proxyEnv
def pretty_name():
return _("Installing NixOS.")
status = pretty_name()
def pretty_status_message():
return status
def catenate(d, key, *values):
"""
Sets @p d[key] to the string-concatenation of @p values
if none of the values are None.
This can be used to set keys conditionally based on
the values being found.
"""
if [v for v in values if v is None]:
return
d[key] = "".join(values)
def run():
"""NixOS Configuration."""
global status
status = _("Configuring NixOS")
libcalamares.job.setprogress(0.1)
ngc_cfg = configparser.ConfigParser()
ngc_cfg["Defaults"] = { "Kernel": "lts" }
ngc_cfg.read("/etc/nixos-generate-config.conf")
# Create initial config file
cfg = cfghead
gs = libcalamares.globalstorage
variables = dict()
# Setup variables
root_mount_point = gs.value("rootMountPoint")
config = os.path.join(root_mount_point, "etc/nixos/configuration.nix")
fw_type = gs.value("firmwareType")
bootdev = (
"nodev"
if gs.value("bootLoader") is None
else gs.value("bootLoader")["installPath"]
)
# Pick config parts and prepare substitution
# Check bootloader
if fw_type == "efi":
cfg += cfgbootefi
elif bootdev != "nodev":
cfg += cfgbootbios
catenate(variables, "bootdev", bootdev)
else:
cfg += cfgbootnone
if ngc_cfg["Defaults"]["Kernel"] == "latest":
cfg += cfglatestkernel
# Setup encrypted swap devices. nixos-generate-config doesn't seem to notice them.
for part in gs.value("partitions"):
if (
part["claimed"] is True
and (part["fsName"] == "luks" or part["fsName"] == "luks2")
and part["device"] is not None
and part["fs"] == "linuxswap"
):
cfg += """ boot.initrd.luks.devices."{}".device = "/dev/disk/by-uuid/{}";\n""".format(
part["luksMapperName"], part["uuid"]
)
# Check partitions
root_is_encrypted = False
boot_is_encrypted = False
boot_is_partition = False
for part in gs.value("partitions"):
if part["mountPoint"] == "/":
root_is_encrypted = part["fsName"] in ["luks", "luks2"]
elif part["mountPoint"] == "/boot":
boot_is_partition = True
boot_is_encrypted = part["fsName"] in ["luks", "luks2"]
# Setup keys in /boot/crypto_keyfile if using BIOS and Grub cryptodisk
if fw_type != "efi" and (
(boot_is_partition and boot_is_encrypted)
or (root_is_encrypted and not boot_is_partition)
):
cfg += cfgbootgrubcrypt
status = _("Setting up LUKS")
libcalamares.job.setprogress(0.15)
try:
libcalamares.utils.host_env_process_output(
["mkdir", "-p", root_mount_point + "/boot"], None
)
libcalamares.utils.host_env_process_output(
["chmod", "0700", root_mount_point + "/boot"], None
)
# Create /boot/crypto_keyfile.bin
libcalamares.utils.host_env_process_output(
[
"dd",
"bs=512",
"count=4",
"if=/dev/random",
"of=" + root_mount_point + "/boot/crypto_keyfile.bin",
"iflag=fullblock",
],
None,
)
libcalamares.utils.host_env_process_output(
["chmod", "600", root_mount_point + "/boot/crypto_keyfile.bin"], None
)
except subprocess.CalledProcessError:
libcalamares.utils.error("Failed to create /boot/crypto_keyfile.bin")
return (
_("Failed to create /boot/crypto_keyfile.bin"),
_("Check if you have enough free space on your partition."),
)
for part in gs.value("partitions"):
if (
part["claimed"] is True
and (part["fsName"] == "luks" or part["fsName"] == "luks2")
and part["device"] is not None
):
cfg += """ boot.initrd.luks.devices."{}".keyFile = "/boot/crypto_keyfile.bin";\n""".format(
part["luksMapperName"]
)
try:
# Grub currently only supports pbkdf2 for luks2
libcalamares.utils.host_env_process_output(
[
"cryptsetup",
"luksConvertKey",
"--hash",
"sha256",
"--pbkdf",
"pbkdf2",
part["device"],
],
None,
part["luksPassphrase"],
)
# Add luks drives to /boot/crypto_keyfile.bin
libcalamares.utils.host_env_process_output(
[
"cryptsetup",
"luksAddKey",
"--hash",
"sha256",
"--pbkdf",
"pbkdf2",
part["device"],
root_mount_point + "/boot/crypto_keyfile.bin",
],
None,
part["luksPassphrase"],
)
except subprocess.CalledProcessError:
libcalamares.utils.error(
"Failed to add {} to /boot/crypto_keyfile.bin".format(
part["luksMapperName"]
)
)
return (
_("cryptsetup failed"),
_(
"Failed to add {} to /boot/crypto_keyfile.bin".format(
part["luksMapperName"]
)
),
)
status = _("Configuring NixOS")
libcalamares.job.setprogress(0.18)
cfg += cfgnetwork
if gs.value("packagechooser_packagechooser") == "enlightenment":
cfg += cfgconnman
else:
cfg += cfgnetworkmanager
if (
(gs.value("packagechooser_packagechooser") == "mate")
| (gs.value("packagechooser_packagechooser") == "lxqt")
| (gs.value("packagechooser_packagechooser") == "lumina")
):
cfg += cfgnmapplet
if gs.value("hostname") is None:
catenate(variables, "hostname", "nixos")
else:
catenate(variables, "hostname", gs.value("hostname"))
if gs.value("locationRegion") is not None and gs.value("locationZone") is not None:
cfg += cfgtime
catenate(
variables,
"timezone",
gs.value("locationRegion"),
"/",
gs.value("locationZone"),
)
if gs.value("localeConf") is not None:
localeconf = gs.value("localeConf")
locale = localeconf.pop("LANG").split("/")[0]
cfg += cfglocale
catenate(variables, "LANG", locale)
if (
len(set(localeconf.values())) != 1
or list(set(localeconf.values()))[0] != locale
):
cfg += cfglocaleextra
for conf in localeconf:
catenate(variables, conf, localeconf.get(conf).split("/")[0])
# Choose desktop environment
if gs.value("packagechooser_packagechooser") == "gnome":
cfg += cfggnome
elif gs.value("packagechooser_packagechooser") == "plasma6":
cfg += cfgplasma6
elif gs.value("packagechooser_packagechooser") == "xfce":
cfg += cfgxfce
elif gs.value("packagechooser_packagechooser") == "pantheon":
cfg += cfgpantheon
elif gs.value("packagechooser_packagechooser") == "cinnamon":
cfg += cfgcinnamon
elif gs.value("packagechooser_packagechooser") == "mate":
cfg += cfgmate
elif gs.value("packagechooser_packagechooser") == "enlightenment":
cfg += cfgenlightenment
elif gs.value("packagechooser_packagechooser") == "lxqt":
cfg += cfglxqt
elif gs.value("packagechooser_packagechooser") == "lumina":
cfg += cfglumina
elif gs.value("packagechooser_packagechooser") == "budgie":
cfg += cfgbudgie
elif gs.value("packagechooser_packagechooser") == "deepin":
cfg += cfgdeepin
if (
gs.value("keyboardLayout") is not None
and gs.value("keyboardVariant") is not None
):
cfg += cfgkeymap
catenate(variables, "kblayout", gs.value("keyboardLayout"))
catenate(variables, "kbvariant", gs.value("keyboardVariant"))
if gs.value("keyboardVConsoleKeymap") is not None:
try:
subprocess.check_output(
["pkexec", "loadkeys", gs.value("keyboardVConsoleKeymap").strip()],
stderr=subprocess.STDOUT,
)
cfg += cfgconsole
catenate(
variables, "vconsole", gs.value("keyboardVConsoleKeymap").strip()
)
except subprocess.CalledProcessError as e:
libcalamares.utils.error("loadkeys: {}".format(e.output))
libcalamares.utils.error(
"Setting vconsole keymap to {} will fail, using default".format(
gs.value("keyboardVConsoleKeymap").strip()
)
)
else:
kbdmodelmap = open(
"/run/current-system/sw/share/systemd/kbd-model-map", "r"
)
kbd = kbdmodelmap.readlines()
out = []
for line in kbd:
if line.startswith("#"):
continue
out.append(line.split())
# Find rows with same layout
find = []
for row in out:
if gs.value("keyboardLayout") == row[1]:
find.append(row)
if find != []:
vconsole = find[0][0]
else:
vconsole = ""
if gs.value("keyboardVariant") is not None:
variant = gs.value("keyboardVariant")
else:
variant = "-"
# Find rows with same variant
for row in find:
if variant in row[3]:
vconsole = row[0]
break
# If none found set to "us"
if vconsole != "" and vconsole != "us" and vconsole is not None:
try:
subprocess.check_output(
["pkexec", "loadkeys", vconsole], stderr=subprocess.STDOUT
)
cfg += cfgconsole
catenate(variables, "vconsole", vconsole)
except subprocess.CalledProcessError as e:
libcalamares.utils.error("loadkeys: {}".format(e.output))
libcalamares.utils.error("vconsole value: {}".format(vconsole))
libcalamares.utils.error(
"Setting vconsole keymap to {} will fail, using default".format(
gs.value("keyboardVConsoleKeymap")
)
)
if (
gs.value("packagechooser_packagechooser") is not None
and gs.value("packagechooser_packagechooser") != ""
):
cfg += cfgmisc
if gs.value("username") is not None:
fullname = gs.value("fullname")
groups = ["networkmanager", "wheel"]
cfg += cfgusers
catenate(variables, "username", gs.value("username"))
catenate(variables, "fullname", fullname)
catenate(variables, "groups", (" ").join(['"' + s + '"' for s in groups]))
if (
gs.value("autoLoginUser") is not None
and gs.value("packagechooser_packagechooser") is not None
and gs.value("packagechooser_packagechooser") != ""
):
cfg += cfgautologin
if gs.value("packagechooser_packagechooser") == "gnome":
cfg += cfgautologingdm
elif gs.value("autoLoginUser") is not None:
cfg += cfgautologintty
if gs.value("packagechooser_packagechooser") != "":
cfg += cfgfirefox
# Check if unfree packages are allowed
free = True
if gs.value("nixos_allow_unfree"):
free = False
cfg += cfgunfree
cfg += cfgpkgs
# Use firefox as default as a graphical web browser, and add kate to plasma desktop
if gs.value("packagechooser_packagechooser") == "plasma6":
catenate(
variables, "pkgs", "\n kdePackages.kate\n # thunderbird\n "
)
elif gs.value("packagechooser_packagechooser") != "":
catenate(variables, "pkgs", "\n # thunderbird\n ")
else:
catenate(variables, "pkgs", "")
cfg += cfgtail
version = ".".join(subprocess.getoutput(["nixos-version"]).split(".")[:2])[:5]
catenate(variables, "nixosversion", version)
# Check that all variables are used
for key in variables.keys():
pattern = "@@{key}@@".format(key=key)
if pattern not in cfg:
libcalamares.utils.warning("Variable '{key}' is not used.".format(key=key))
# Check that all patterns exist
variable_pattern = re.compile(r"@@\w+@@")
for match in variable_pattern.finditer(cfg):
variable_name = cfg[match.start() + 2 : match.end() - 2]
if variable_name not in variables:
libcalamares.utils.warning(
"Variable '{key}' is used but not defined.".format(key=variable_name)
)
# Do the substitutions
for key in variables.keys():
pattern = "@@{key}@@".format(key=key)
cfg = cfg.replace(pattern, str(variables[key]))
status = _("Generating NixOS configuration")
libcalamares.job.setprogress(0.25)
try:
# Generate hardware.nix with mounted swap device
subprocess.check_output(
["pkexec", "nixos-generate-config", "--root", root_mount_point],
stderr=subprocess.STDOUT,
)
except subprocess.CalledProcessError as e:
if e.output is not None:
libcalamares.utils.error(e.output.decode("utf8"))
return (_("nixos-generate-config failed"), _(e.output.decode("utf8")))
# Check for unfree stuff in hardware-configuration.nix
hf = open(root_mount_point + "/etc/nixos/hardware-configuration.nix", "r")
htxt = hf.read()
search = re.search(r"boot\.extraModulePackages = \[ (.*) \];", htxt)
# Check if any extraModulePackages are defined, and remove if only free packages are allowed
if search is not None and free:
expkgs = search.group(1).split(" ")
for pkg in expkgs:
p = ".".join(pkg.split(".")[3:])
# Check package p is unfree
isunfree = subprocess.check_output(
[
"nix-instantiate",
"--eval",
"--strict",
"-E",
"with import <nixpkgs> {{}}; pkgs.linuxKernel.packageAliases.linux_default.{}.meta.unfree".format(
p
),
"--json",
],
stderr=subprocess.STDOUT,
)
if isunfree == b"true":
libcalamares.utils.warning(
"{} is marked as unfree, removing from hardware-configuration.nix".format(
p
)
)
expkgs.remove(pkg)
hardwareout = re.sub(
r"boot\.extraModulePackages = \[ (.*) \];",
"boot.extraModulePackages = [ {}];".format(
"".join(map(lambda x: x + " ", expkgs))
),
htxt,
)
# Write the hardware-configuration.nix file
libcalamares.utils.host_env_process_output(
[
"cp",
"/dev/stdin",
root_mount_point + "/etc/nixos/hardware-configuration.nix",
],
None,
hardwareout,
)
# Write the configuration.nix file
libcalamares.utils.host_env_process_output(["cp", "/dev/stdin", config], None, cfg)
status = _("Installing NixOS")
libcalamares.job.setprogress(0.3)
# build nixos-install command
nixosInstallCmd = [ "pkexec" ]
nixosInstallCmd.extend(generateProxyStrings())
nixosInstallCmd.extend(
[
"nixos-install",
"--no-root-passwd",
"--root",
root_mount_point
]
)
# Install customizations
try:
output = ""
proc = subprocess.Popen(
nixosInstallCmd,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT
)
while True:
line = proc.stdout.readline().decode("utf-8")
output += line
libcalamares.utils.debug("nixos-install: {}".format(line.strip()))
if not line:
break
exit = proc.wait()
if exit != 0:
return (_("nixos-install failed"), _(output))
except:
return (_("nixos-install failed"), _("Installation failed to complete"))
return None
@@ -0,0 +1,5 @@
---
type: "job"
name: "nixos"
interface: "python"
script: "main.py"
@@ -0,0 +1,30 @@
{
lib,
runCommand,
makeWrapper,
calamares,
calamares-nixos-extensions,
}:
runCommand "calamares-wrapped"
{
inherit (calamares) version meta;
nativeBuildInputs = [ makeWrapper ];
}
''
mkdir -p $out/bin
cd ${calamares}
for i in *; do
if [ "$i" == "bin" ]; then
continue
fi
ln -s ${calamares}/$i $out/$i
done
makeWrapper ${lib.getExe calamares} $out/bin/calamares \
--prefix XDG_DATA_DIRS : ${calamares-nixos-extensions}/share \
--prefix XDG_CONFIG_DIRS : ${calamares-nixos-extensions}/etc \
--add-flag --xdg-config
''
@@ -1,20 +1,8 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Victor Fuentes <vmfuentes64@gmail.com>
Date: Thu, 1 Aug 2024 15:53:16 -0400
Subject: [PATCH] Modifies the users module to only set passwords of user and
root
as the users will have already been created in the configuration.nix
file
---
src/modules/users/Config.cpp | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/src/modules/users/Config.cpp b/src/modules/users/Config.cpp
index cd56bc3e2..9b09b36cd 100644
index be754774b..4b0513df0 100644
--- a/src/modules/users/Config.cpp
+++ b/src/modules/users/Config.cpp
@@ -1028,12 +1028,6 @@ Config::createJobs() const
@@ -1069,12 +1069,6 @@ Config::createJobs() const
Calamares::Job* j;
@@ -27,7 +15,7 @@ index cd56bc3e2..9b09b36cd 100644
if ( getActiveDirectoryUsed() )
{
j = new ActiveDirectoryJob( m_activeDirectoryAdminUsername,
@@ -1043,20 +1037,11 @@ Config::createJobs() const
@@ -1084,20 +1078,11 @@ Config::createJobs() const
jobs.append( Calamares::job_ptr( j ) );
}
@@ -0,0 +1,33 @@
diff --git a/src/libcalamares/GlobalStorage.h b/src/libcalamares/GlobalStorage.h
index 37ea332d2..b9e629350 100644
--- a/src/libcalamares/GlobalStorage.h
+++ b/src/libcalamares/GlobalStorage.h
@@ -56,13 +56,6 @@ public:
*/
explicit GlobalStorage( QObject* parent = nullptr );
- /** @brief Insert a key and value into the store
- *
- * The @p value is added to the store with key @p key. If @p key
- * already exists in the store, its existing value is overwritten.
- * The changed() signal is emitted regardless.
- */
- void insert( const QString& key, const QVariant& value );
/** @brief Removes a key and its value
*
* The @p key is removed from the store. If the @p key does not
@@ -123,6 +116,14 @@ public:
QVariantMap data() const { return m; }
public Q_SLOTS:
+ /** @brief Insert a key and value into the store
+ *
+ * The @p value is added to the store with key @p key. If @p key
+ * already exists in the store, its existing value is overwritten.
+ * The changed() signal is emitted regardless.
+ */
+ void insert( const QString& key, const QVariant& value );
+
/** @brief Does the store contain the given key?
*
* This can distinguish an explicitly-inserted QVariant() from
+135
View File
@@ -0,0 +1,135 @@
{
lib,
stdenv,
writeShellScriptBin,
xdg-utils,
fetchFromGitea,
cmake,
ninja,
kdePackages,
qt6,
libpwquality,
libxcrypt,
parted,
yaml-cpp,
tzdata,
ckbcomp,
util-linux,
os-prober,
xkeyboard_config,
# passthru.tests
calamares-nixos,
}:
let
# drop privileges so we can launch browsers, etc;
# force going through the portal so we get the right environment
xdg-open-nixos = writeShellScriptBin "xdg-open" ''
sudo --user $(id -nu $PKEXEC_UID) env NIXOS_XDG_OPEN_USE_PORTAL=1 ${xdg-utils}/bin/xdg-open "$@"
'';
in
stdenv.mkDerivation (finalAttrs: {
pname = "calamares";
version = "3.4.0";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "Calamares";
repo = "calamares";
tag = "v${finalAttrs.version}";
hash = "sha256-Qk+GnonuEWK3hXjmwxf9awgxr6dGunShJgwmkT78qKM=";
};
patches = [
# Don't allow LUKS in manual partitioning
# FIXME: this really needs to be fixed on the module end
./dont-allow-manual-luks.patch
# Don't create users - they're already created by the installer
# FIXME: upstream this?
./dont-create-users.patch
# Allow QML to write to GlobalStorage
# FIXME: upstream this
./let-qml-write-to-global-storage.patch
];
nativeBuildInputs = [
cmake
ninja
kdePackages.extra-cmake-modules
qt6.wrapQtAppsHook
];
buildInputs = [
kdePackages.kcoreaddons
kdePackages.kcrash
kdePackages.kpackage
kdePackages.kparts
kdePackages.kpmcore
kdePackages.kservice
kdePackages.libplasma
libpwquality
libxcrypt
parted
kdePackages.polkit-qt-1
qt6.qtbase
qt6.qttools
yaml-cpp
];
postPatch = ''
# this is called via pkexec, which does not resolve symlinks, so the policy
# needs to point at the symlinked path
substituteInPlace io.calamares.calamares.policy \
--replace-fail /usr/bin/calamares /run/current-system/sw/bin/calamares
substituteInPlace src/modules/locale/SetTimezoneJob.cpp src/libcalamares/locale/TimeZone.cpp \
--replace-fail /usr/share/zoneinfo ${tzdata}/share/zoneinfo
substituteInPlace src/modules/keyboard/keyboardwidget/keyboardglobal.cpp \
--replace-fail /usr/share/X11/xkb/rules/base.lst ${xkeyboard_config}/share/X11/xkb/rules/base.lst
substituteInPlace CMakeLists.txt \
--replace-fail "\''${POLKITQT-1_POLICY_FILES_INSTALL_DIR}" "$out/share/polkit-1/actions"
'';
separateDebugInfo = true;
qtWrapperArgs = [
"--prefix PATH : ${
lib.makeBinPath [
ckbcomp
os-prober
util-linux
xdg-open-nixos
]
}"
];
passthru.tests = {
inherit calamares-nixos;
};
meta = with lib; {
description = "Distribution-independent installer framework";
homepage = "https://calamares.io/";
license = with licenses; [
gpl3Plus
bsd2
cc0
];
maintainers = with maintainers; [
manveru
vlinkz
];
platforms = platforms.linux;
mainProgram = "calamares";
};
})
@@ -1,60 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Victor Fuentes <vmfuentes64@gmail.com>
Date: Thu, 1 Aug 2024 15:57:55 -0400
Subject: [PATCH] Makes calamares search
/run/current-system/sw/share/calamares/ for extra configuration files as by
default it only searches /usr/share/calamares/ and
/nix/store/<hash>-calamares-<version>/share/calamares/ but
calamares-nixos-extensions is not in either of these locations
---
src/calamares/main.cpp | 1 +
src/libcalamares/utils/Dirs.cpp | 8 ++++++++
src/libcalamares/utils/Dirs.h | 3 +++
3 files changed, 12 insertions(+)
diff --git a/src/calamares/main.cpp b/src/calamares/main.cpp
index e0491e5f9..faf272016 100644
--- a/src/calamares/main.cpp
+++ b/src/calamares/main.cpp
@@ -132,6 +132,7 @@ main( int argc, char* argv[] )
#endif
std::unique_ptr< KDSingleApplication > possiblyUnique;
+ Calamares::setNixosDirs();
const bool is_debug = handle_args( a );
if ( !is_debug )
{
diff --git a/src/libcalamares/utils/Dirs.cpp b/src/libcalamares/utils/Dirs.cpp
index c42768a08..dfce7eb5d 100644
--- a/src/libcalamares/utils/Dirs.cpp
+++ b/src/libcalamares/utils/Dirs.cpp
@@ -114,6 +114,14 @@ setXdgDirs()
s_haveExtraDirs = !( s_extraConfigDirs.isEmpty() && s_extraDataDirs.isEmpty() );
}
+void
+setNixosDirs()
+{
+ s_extraConfigDirs << "/run/current-system/sw/share/calamares/";
+ s_extraDataDirs << "/run/current-system/sw/share/calamares/";
+ s_haveExtraDirs = !( s_extraConfigDirs.isEmpty() && s_extraDataDirs.isEmpty() );
+}
+
QStringList
extraConfigDirs()
{
diff --git a/src/libcalamares/utils/Dirs.h b/src/libcalamares/utils/Dirs.h
index d0edd7a4f..26bd16b4e 100644
--- a/src/libcalamares/utils/Dirs.h
+++ b/src/libcalamares/utils/Dirs.h
@@ -50,6 +50,9 @@ DLLEXPORT bool isAppDataDirOverridden();
/** @brief Setup extra config and data dirs from the XDG variables.
*/
DLLEXPORT void setXdgDirs();
+/** @brief Setup extra config and data dirs fir NixOS.
+ */
+DLLEXPORT void setNixosDirs();
/** @brief Are any extra directories configured? */
DLLEXPORT bool haveExtraDirs();
/** @brief XDG_CONFIG_DIRS, each guaranteed to end with / */
@@ -1,119 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Victor Fuentes <vmfuentes64@gmail.com>
Date: Thu, 1 Aug 2024 15:59:54 -0400
Subject: [PATCH] Uses pkexec within modules in order to run calamares without
root permissions as a whole.
Also fixes storage check in the welcome module
---
src/libcalamares/utils/Runner.cpp | 8 +++---
src/modules/mount/main.py | 8 +++---
.../welcome/checker/GeneralRequirements.cpp | 27 ++++++++++++++++++-
.../welcome/checker/GeneralRequirements.h | 1 +
4 files changed, 35 insertions(+), 9 deletions(-)
diff --git a/src/libcalamares/utils/Runner.cpp b/src/libcalamares/utils/Runner.cpp
index f7872a7d0..a246ca110 100644
--- a/src/libcalamares/utils/Runner.cpp
+++ b/src/libcalamares/utils/Runner.cpp
@@ -145,13 +145,13 @@ Calamares::Utils::Runner::run()
}
if ( m_location == RunLocation::RunInTarget )
{
- process.setProgram( "chroot" );
- process.setArguments( QStringList { workingDirectory.absolutePath() } << m_command );
+ process.setProgram( "pkexec" );
+ process.setArguments( QStringList { "chroot" } + QStringList { workingDirectory.absolutePath() } << m_command );
}
else
{
- process.setProgram( "env" );
- process.setArguments( m_command );
+ process.setProgram( "pkexec" );
+ process.setArguments( QStringList { "env" } + m_command );
}
if ( m_output )
diff --git a/src/modules/mount/main.py b/src/modules/mount/main.py
index 4a16f8872..6d32916a5 100644
--- a/src/modules/mount/main.py
+++ b/src/modules/mount/main.py
@@ -244,7 +244,7 @@ def mount_partition(root_mount_point, partition, partitions, mount_options, moun
# Ensure that the created directory has the correct SELinux context on
# SELinux-enabled systems.
- os.makedirs(mount_point, exist_ok=True)
+ subprocess.check_call(["pkexec", "mkdir", "-p", mount_point])
try:
subprocess.call(['chcon', '--reference=' + raw_mount_point, mount_point])
@@ -288,13 +288,13 @@ def mount_partition(root_mount_point, partition, partitions, mount_options, moun
for s in btrfs_subvolumes:
if not s["subvolume"]:
continue
- os.makedirs(root_mount_point + os.path.dirname(s["subvolume"]), exist_ok=True)
- subprocess.check_call(["btrfs", "subvolume", "create",
+ subprocess.check_call(["pkexec", "mkdir", "-p", root_mount_point + os.path.dirname(s["subvolume"])])
+ subprocess.check_call(["pkexec", "btrfs", "subvolume", "create",
root_mount_point + s["subvolume"]])
if s["mountPoint"] == "/":
# insert the root subvolume into global storage
libcalamares.globalstorage.insert("btrfsRootSubvolume", s["subvolume"])
- subprocess.check_call(["umount", "-v", root_mount_point])
+ subprocess.check_call(["pkexec", "umount", "-v", root_mount_point])
device = partition["device"]
diff --git a/src/modules/welcome/checker/GeneralRequirements.cpp b/src/modules/welcome/checker/GeneralRequirements.cpp
index a58f3df83..b66576b09 100644
--- a/src/modules/welcome/checker/GeneralRequirements.cpp
+++ b/src/modules/welcome/checker/GeneralRequirements.cpp
@@ -431,10 +431,35 @@ GeneralRequirements::checkEnoughStorage( qint64 requiredSpace )
cWarning() << "GeneralRequirements is configured without libparted.";
return false;
#else
- return check_big_enough( requiredSpace );
+ return big_enough( requiredSpace );
#endif
}
+bool
+GeneralRequirements::big_enough( qint64 requiredSpace )
+{
+ FILE *fpipe;
+ char command[128];
+ snprintf(command, sizeof(command), "lsblk --bytes -no SIZE,TYPE | grep disk | awk '$1 > %llu {print $1}'", requiredSpace);
+ char c = 0;
+
+ if (0 == (fpipe = (FILE*)popen(command, "r")))
+ {
+ cWarning() << "Failed to check storage size.";
+ return false;
+ }
+
+ while (fread(&c, sizeof c, 1, fpipe))
+ {
+ pclose(fpipe);
+ return true;
+ }
+
+ pclose(fpipe);
+
+ return false;
+}
+
bool
GeneralRequirements::checkEnoughRam( qint64 requiredRam )
{
diff --git a/src/modules/welcome/checker/GeneralRequirements.h b/src/modules/welcome/checker/GeneralRequirements.h
index b6646da11..ea27324fa 100644
--- a/src/modules/welcome/checker/GeneralRequirements.h
+++ b/src/modules/welcome/checker/GeneralRequirements.h
@@ -36,6 +36,7 @@ private:
bool checkHasPower();
bool checkHasInternet();
bool checkIsRoot();
+ bool big_enough( qint64 requiredSpace );
qreal m_requiredStorageGiB;
qreal m_requiredRamGiB;
@@ -1,122 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Victor Fuentes <vmfuentes64@gmail.com>
Date: Thu, 1 Aug 2024 16:00:43 -0400
Subject: [PATCH] Adds unfree qml to packagechooserq
---
.../packagechooserq/packagechooserq.qrc | 1 +
.../packagechooserq@unfree.qml | 75 +++++++++++++++++++
src/modules/packagechooserq/unfree.conf | 11 +++
3 files changed, 87 insertions(+)
create mode 100644 src/modules/packagechooserq/packagechooserq@unfree.qml
create mode 100644 src/modules/packagechooserq/unfree.conf
diff --git a/src/modules/packagechooserq/packagechooserq.qrc b/src/modules/packagechooserq/packagechooserq.qrc
index 1b892dce1..ee80a934b 100644
--- a/src/modules/packagechooserq/packagechooserq.qrc
+++ b/src/modules/packagechooserq/packagechooserq.qrc
@@ -4,5 +4,6 @@
<file>images/libreoffice.jpg</file>
<file>images/no-selection.png</file>
<file>images/plasma.png</file>
+ <file>packagechooserq@unfree.qml</file>
</qresource>
</RCC>
diff --git a/src/modules/packagechooserq/packagechooserq@unfree.qml b/src/modules/packagechooserq/packagechooserq@unfree.qml
new file mode 100644
index 000000000..5e36d77d9
--- /dev/null
+++ b/src/modules/packagechooserq/packagechooserq@unfree.qml
@@ -0,0 +1,75 @@
+/* === This file is part of Calamares - <https://calamares.io> ===
+ *
+ * SPDX-FileCopyrightText: 2021 Anke Boersma <demm@kaosx.us>
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ * Calamares is Free Software: see the License-Identifier above.
+ *
+ */
+
+import io.calamares.core 1.0
+import io.calamares.ui 1.0
+
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Layouts 1.3
+
+Item {
+
+ SystemPalette {
+ id: palette
+ colorGroup: SystemPalette.Active
+ }
+
+ width: parent.width
+ height: parent.height
+
+ Rectangle {
+ anchors.fill: parent
+ color: palette.window
+
+ ButtonGroup {
+ id: switchGroup
+ }
+
+ Column {
+ id: column
+ anchors.centerIn: parent
+ spacing: 5
+
+ Rectangle {
+ width: 700
+ height: 250
+ color: palette.base
+ radius: 10
+ border.width: 0
+ Text {
+ color: palette.text
+ width: 600
+ height: 200
+ anchors.centerIn: parent
+ text: qsTr("NixOS is fully open source, but it also provides optional software packages that do not respect users' freedom to run, copy, distribute, study, change and improve the software, and are commonly not open source. By default such \"unfree\" packages are not allowed, but you can enable it here. If you check this box, you agree that unfree software may be installed which might have additional End User License Agreements (EULAs) that you need to agree to. If not enabled, some hardware (notably Nvidia GPUs and some WiFi chips) might not work or not work optimally.<br/>")
+ font.pointSize: 12
+ wrapMode: Text.WordWrap
+ }
+
+ CheckBox {
+ id: element2
+ anchors.horizontalCenter: parent.horizontalCenter
+ y: 190
+ text: qsTr("Allow unfree software")
+ checked: false
+
+ onCheckedChanged: {
+ if ( checked ) {
+ config.packageChoice = "unfree"
+ } else {
+ config.packageChoice = "free"
+ }
+ }
+ }
+ }
+ }
+ }
+
+}
diff --git a/src/modules/packagechooserq/unfree.conf b/src/modules/packagechooserq/unfree.conf
new file mode 100644
index 000000000..da79a8eac
--- /dev/null
+++ b/src/modules/packagechooserq/unfree.conf
@@ -0,0 +1,11 @@
+# SPDX-FileCopyrightText: no
+# SPDX-License-Identifier: CC0-1.0
+#
+---
+qmlLabel:
+ label: "Unfree Software"
+method: legacy
+mode: required
+labels:
+ step: "Unfree Software"
+packageChoice: free
@@ -1,100 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Victor Fuentes <vmfuentes64@gmail.com>
Date: Thu, 1 Aug 2024 16:01:53 -0400
Subject: [PATCH] Modifies finished module to add some NixOS resources.
Modifies packagechooser module to change the UI.
---
src/modules/finished/FinishedPage.cpp | 12 +++++---
.../packagechooser/PackageChooserPage.cpp | 1 +
src/modules/packagechooser/page_package.ui | 28 +++++++++----------
3 files changed, 23 insertions(+), 18 deletions(-)
diff --git a/src/modules/finished/FinishedPage.cpp b/src/modules/finished/FinishedPage.cpp
index 51be52678..307607232 100644
--- a/src/modules/finished/FinishedPage.cpp
+++ b/src/modules/finished/FinishedPage.cpp
@@ -74,8 +74,10 @@ FinishedPage::retranslate()
{
ui->mainText->setText( tr( "<h1>All done.</h1><br/>"
"%1 has been set up on your computer.<br/>"
- "You may now start using your new system.",
- "@info" )
+ "You may now start using your new system.<br/>"
+ "You can change every setting later except the bootloader.<br/>"
+ "Check the <a href=\"https://nixos.org/manual/nixos/stable/\">manual</a> for instructions on how to install software, upgrade the system or enable services.<br/>"
+ "You can find ways to get in touch with the <a href=\"https://nixos.org/community/\">community on the website!</a>", "@info" )
.arg( branding->versionedName() ) );
ui->restartCheckBox->setToolTip( tr( "<html><head/><body>"
"<p>When this box is checked, your system will "
@@ -89,8 +91,10 @@ FinishedPage::retranslate()
ui->mainText->setText( tr( "<h1>All done.</h1><br/>"
"%1 has been installed on your computer.<br/>"
"You may now restart into your new system, or continue "
- "using the %2 Live environment.",
- "@info" )
+ "using the %2 Live environment.<br/>"
+ "You can change every setting later except the bootloader.<br/>"
+ "Check the <a href=\"https://nixos.org/manual/nixos/stable/\">manual</a> for instructions on how to install software, upgrade the system or enable services.<br/>"
+ "You can find ways to get in touch with the <a href=\"https://nixos.org/community/\">community on the website!</a>", "@info" )
.arg( branding->versionedName(), branding->productName() ) );
ui->restartCheckBox->setToolTip( tr( "<html><head/><body>"
"<p>When this box is checked, your system will "
diff --git a/src/modules/packagechooser/PackageChooserPage.cpp b/src/modules/packagechooser/PackageChooserPage.cpp
index 44a570d2f..4dc931bf3 100644
--- a/src/modules/packagechooser/PackageChooserPage.cpp
+++ b/src/modules/packagechooser/PackageChooserPage.cpp
@@ -52,6 +52,7 @@ PackageChooserPage::currentChanged( const QModelIndex& index )
if ( !index.isValid() || !ui->products->selectionModel()->hasSelection() )
{
ui->productName->setText( m_introduction.name.get() );
+ ui->productName->setStyleSheet("font-weight: bold");
ui->productScreenshot->setPixmap( m_introduction.screenshot );
ui->productDescription->setText( m_introduction.description.get() );
}
diff --git a/src/modules/packagechooser/page_package.ui b/src/modules/packagechooser/page_package.ui
index 2ab5b7f13..bed462069 100644
--- a/src/modules/packagechooser/page_package.ui
+++ b/src/modules/packagechooser/page_package.ui
@@ -37,20 +37,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
</widget>
</item>
<item>
- <layout class="QVBoxLayout" name="verticalLayout" stretch="1,30,1">
- <item>
- <widget class="QLabel" name="productName">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Product Name</string>
- </property>
- </widget>
- </item>
+ <layout class="QVBoxLayout" name="verticalLayout" stretch="30,1,1">
<item>
<widget class="FixedAspectRatioLabel" name="productScreenshot">
<property name="sizePolicy">
@@ -67,6 +54,19 @@ SPDX-License-Identifier: GPL-3.0-or-later
</property>
</widget>
</item>
+ <item>
+ <widget class="QLabel" name="productName">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Product Name</string>
+ </property>
+ </widget>
+ </item>
<item>
<widget class="QLabel" name="productDescription">
<property name="sizePolicy">
@@ -1,35 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Victor Fuentes <vmfuentes64@gmail.com>
Date: Thu, 31 Oct 2024 10:34:25 -0700
Subject: [PATCH] Fix setting the kayboard layout on GNOME wayland.
By default the module uses the setxkbmap, which will not change the
keyboard
---
src/modules/keyboard/Config.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp
index 54ee7649c..60fe2d7d0 100644
--- a/src/modules/keyboard/Config.cpp
+++ b/src/modules/keyboard/Config.cpp
@@ -306,6 +306,10 @@ Config::applyXkb()
m_additionalLayoutInfo.groupSwitcher ) );
QProcess::execute( "setxkbmap", basicArguments );
+ QString xkbmap = QString( "[('xkb','%1\%2'),('xkb','%3\%4')]").arg(
+ m_selectedLayout, ((!m_selectedVariant.isEmpty()) ? "+" + m_selectedVariant : ""),
+ m_additionalLayoutInfo.additionalLayout, ((!m_additionalLayoutInfo.additionalVariant.isEmpty()) ? "+" + m_additionalLayoutInfo.additionalVariant : ""));
+ QProcess::execute( "sh", { "-c", "if command -v gsettings; then gsettings set org.gnome.desktop.input-sources sources \"$0\"; fi", xkbmap });
cDebug() << "xkbmap selection changed to: " << m_selectedLayout << '-' << m_selectedVariant << "(added "
<< m_additionalLayoutInfo.additionalLayout << "-" << m_additionalLayoutInfo.additionalVariant
<< " since current layout is not ASCII-capable)";
@@ -314,6 +318,8 @@ Config::applyXkb()
{
basicArguments.append( xkbmap_layout_args( m_selectedLayout, m_selectedVariant ) );
QProcess::execute( "setxkbmap", basicArguments );
+ QString xkbmap = QString( "[('xkb','%1\%2')]").arg( m_selectedLayout, ((!m_selectedVariant.isEmpty()) ? "+" + m_selectedVariant : "") );
+ QProcess::execute( "sh", { "-c", "if command -v gsettings; then gsettings set org.gnome.desktop.input-sources sources \"$0\"; fi", xkbmap });
cDebug() << "xkbmap selection changed to: " << m_selectedLayout << '-' << m_selectedVariant;
}
m_applyTimer.stop();
@@ -1,22 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Victor Fuentes <vmfuentes64@gmail.com>
Date: Thu, 1 Aug 2024 16:03:53 -0400
Subject: [PATCH] Change default location where calamares searches for locales
---
src/modules/locale/Config.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/modules/locale/Config.cpp b/src/modules/locale/Config.cpp
index 8fa17a768..79b5419b6 100644
--- a/src/modules/locale/Config.cpp
+++ b/src/modules/locale/Config.cpp
@@ -48,7 +48,7 @@ loadLocales( const QString& localeGenPath )
// supported locales. We first try that one, and if it doesn't exist, we fall back
// to parsing the lines from locale.gen
localeGenLines.clear();
- QFile supported( "/usr/share/i18n/SUPPORTED" );
+ QFile supported( "/run/current-system/sw/share/i18n/SUPPORTED" );
QByteArray ba;
if ( supported.exists() && supported.open( QIODevice::ReadOnly | QIODevice::Text ) )
-144
View File
@@ -1,144 +0,0 @@
{
lib,
fetchurl,
boost,
cmake,
extra-cmake-modules,
kparts,
kpmcore,
kirigami2,
kservice,
libatasmart,
libxcb,
yaml-cpp,
libpwquality,
parted,
polkit-qt,
python3,
qtbase,
qtquickcontrols,
qtsvg,
qttools,
qtwebengine,
util-linux,
tzdata,
ckbcomp,
xkeyboard_config,
mkDerivation,
nixos-extensions ? false,
# passthru.tests
calamares-nixos,
}:
mkDerivation rec {
pname = "calamares";
version = "3.3.13";
# release including submodule
src = fetchurl {
url = "https://github.com/calamares/calamares/releases/download/v${version}/calamares-${version}.tar.gz";
sha256 = "sha256-5Jz32JTgK6BImM0HcMtXi04k39CAirdmC/lbskVmSNQ=";
};
# On major changes, or when otherwise required, you *must* :
# 1. reformat the patches,
# 2. `git am path/to/00*.patch` them into a calamares worktree,
# 3. rebase to the more recent calamares version,
# 4. and export the patches again via
# `git -c format.signoff=false format-patch v${version} --no-numbered --zero-commit --no-signature`.
patches = lib.optionals nixos-extensions [
./0001-Modifies-the-users-module-to-only-set-passwords-of-u.patch
./0002-Makes-calamares-search-run-current-system-sw-share-c.patch
./0003-Uses-pkexec-within-modules-in-order-to-run-calamares.patch
./0004-Adds-unfree-qml-to-packagechooserq.patch
./0005-Modifies-finished-module-to-add-some-NixOS-resources.patch
./0006-Remove-options-for-unsupported-partition-types.patch
./0007-Fix-setting-the-kayboard-layout-on-GNOME-wayland.patch
./0008-Change-default-location-where-calamares-searches-for.patch
];
nativeBuildInputs = [
cmake
extra-cmake-modules
];
buildInputs = [
boost
kparts.dev
kpmcore.out
kservice.dev
kirigami2
libatasmart
libxcb
yaml-cpp
libpwquality
parted
polkit-qt
python3
qtbase
qtquickcontrols
qtsvg
qttools
qtwebengine.dev
util-linux
];
cmakeFlags = [
"-DPYTHON_LIBRARY=${python3}/lib/lib${python3.libPrefix}.so"
"-DPYTHON_INCLUDE_DIR=${python3}/include/${python3.libPrefix}"
"-DCMAKE_VERBOSE_MAKEFILE=True"
"-DWITH_PYTHONQT:BOOL=ON"
];
POLKITQT-1_POLICY_FILES_INSTALL_DIR = "$(out)/share/polkit-1/actions";
postPatch = ''
# Run calamares without root. Other patches make it functional as a normal user
sed -e "s,pkexec calamares,calamares -D6," \
-i calamares.desktop
sed -e "s,X-AppStream-Ignore=true,&\nStartupWMClass=calamares," \
-i calamares.desktop
# Fix desktop reference with wayland
mv calamares.desktop io.calamares.calamares.desktop
sed -e "s,calamares.desktop,io.calamares.calamares.desktop," \
-i CMakeLists.txt
sed -e "s,/usr/bin/calamares,$out/bin/calamares," \
-i com.github.calamares.calamares.policy
sed -e 's,/usr/share/zoneinfo,${tzdata}/share/zoneinfo,' \
-i src/modules/locale/SetTimezoneJob.cpp \
-i src/libcalamares/locale/TimeZone.cpp
sed -e 's,/usr/share/X11/xkb/rules/base.lst,${xkeyboard_config}/share/X11/xkb/rules/base.lst,' \
-i src/modules/keyboard/keyboardwidget/keyboardglobal.cpp
sed -e 's,"ckbcomp","${ckbcomp}/bin/ckbcomp",' \
-i src/modules/keyboard/keyboardwidget/keyboardpreview.cpp
sed "s,\''${POLKITQT-1_POLICY_FILES_INSTALL_DIR},''${out}/share/polkit-1/actions," \
-i CMakeLists.txt
'';
passthru.tests = {
inherit calamares-nixos;
};
meta = with lib; {
description = "Distribution-independent installer framework";
homepage = "https://calamares.io/";
license = with licenses; [
gpl3Plus
bsd2
cc0
];
maintainers = with maintainers; [
manveru
vlinkz
];
platforms = platforms.linux;
mainProgram = "calamares";
};
}
-7
View File
@@ -1904,13 +1904,6 @@ with pkgs;
'';
});
calamares = libsForQt5.callPackage ../tools/misc/calamares {
boost = boost.override {
enablePython = true;
python = python3;
};
};
calamares-nixos = lowPrio (calamares.override { nixos-extensions = true; });
candle = libsForQt5.callPackage ../applications/misc/candle { };
capstone = callPackage ../development/libraries/capstone { };