-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
calamares: fix calamares modules, add nixos modules, and add new iso #161788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
7481fa9
calamares-nixos-extensions: init at 0.3.8
vlinkz d8eaef4
maintainer-list: add vlinkz
vlinkz 3ec2fd8
calamares: fix modules functionality and add nixos support
vlinkz 67b5b4c
installation-cd: add calamares-gnome cd
vlinkz 89096bc
installation-cd: add calamares-plasma5 cd
vlinkz c21720a
nixos/release: add calamares installer
vlinkz bcb4456
nixos/release-notes: add calamares installer to highlights
vlinkz 057f88b
kpmcore: 4.2.0 -> 22.04.0
vlinkz 607152a
partition-manager: 4.2.0 -> 22.04.0
vlinkz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-gnome.nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| # This module defines a NixOS installation CD that contains GNOME. | ||
|
|
||
| { pkgs, ... }: | ||
|
|
||
| { | ||
| imports = [ ./installation-cd-graphical-calamares.nix ]; | ||
|
|
||
| isoImage.edition = "gnome"; | ||
|
|
||
| services.xserver.desktopManager.gnome = { | ||
| # 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' ] | ||
| ''; | ||
|
|
||
| # Override GNOME defaults to disable GNOME tour and disable suspend | ||
| extraGSettingsOverrides = '' | ||
| [org.gnome.shell] | ||
| welcome-dialog-last-shown-version='9999999999' | ||
|
|
||
| [org.gnome.settings-daemon.plugins.power] | ||
| sleep-inactive-ac-type='nothing' | ||
| sleep-inactive-battery-type='nothing' | ||
| ''; | ||
|
|
||
| extraGSettingsOverridePackages = [ pkgs.gnome.gnome-settings-daemon ]; | ||
|
|
||
| enable = true; | ||
| }; | ||
|
|
||
| # Theme calamares with GNOME theme | ||
| qt5 = { | ||
| enable = true; | ||
| platformTheme = "gnome"; | ||
| }; | ||
|
|
||
| # Fix scaling for calamares on wayland | ||
| environment.variables = { | ||
| QT_QPA_PLATFORM = "$([[ $XDG_SESSION_TYPE = \"wayland\" ]] && echo \"wayland\")"; | ||
| }; | ||
|
|
||
| services.xserver.displayManager = { | ||
| gdm = { | ||
| enable = true; | ||
| # autoSuspend makes the machine automatically suspend after inactivity. | ||
| # It's possible someone could/try to ssh'd into the machine and obviously | ||
| # have issues because it's inactive. | ||
| # See: | ||
| # * https://github.com/NixOS/nixpkgs/pull/63790 | ||
| # * https://gitlab.gnome.org/GNOME/gnome-control-center/issues/22 | ||
| autoSuspend = false; | ||
| }; | ||
| autoLogin = { | ||
| enable = true; | ||
| user = "nixos"; | ||
| }; | ||
| }; | ||
| } |
49 changes: 49 additions & 0 deletions
49
nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma5.nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # This module defines a NixOS installation CD that contains X11 and | ||
| # Plasma 5. | ||
|
|
||
| { pkgs, ... }: | ||
|
|
||
| { | ||
| imports = [ ./installation-cd-graphical-calamares.nix ]; | ||
|
|
||
| isoImage.edition = "plasma5"; | ||
|
|
||
| services.xserver = { | ||
| desktopManager.plasma5 = { | ||
| enable = true; | ||
| }; | ||
|
|
||
| # Automatically login as nixos. | ||
| displayManager = { | ||
| sddm.enable = true; | ||
| autoLogin = { | ||
| enable = true; | ||
| user = "nixos"; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| environment.systemPackages = with pkgs; [ | ||
| # Graphical text editor | ||
| kate | ||
| ]; | ||
|
|
||
| system.activationScripts.installerDesktop = let | ||
|
|
||
| # Comes from documentation.nix when xserver and nixos.enable are true. | ||
| manualDesktopFile = "/run/current-system/sw/share/applications/nixos-manual.desktop"; | ||
|
|
||
| homeDir = "/home/nixos/"; | ||
| desktopDir = homeDir + "Desktop/"; | ||
|
|
||
| in '' | ||
| mkdir -p ${desktopDir} | ||
| chown nixos ${homeDir} ${desktopDir} | ||
|
|
||
| ln -sfT ${manualDesktopFile} ${desktopDir + "nixos-manual.desktop"} | ||
| ln -sfT ${pkgs.gparted}/share/applications/gparted.desktop ${desktopDir + "gparted.desktop"} | ||
| ln -sfT ${pkgs.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"} | ||
| ''; | ||
|
|
||
| } |
20 changes: 20 additions & 0 deletions
20
nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares.nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # This module adds the calamares installer to the basic graphical NixOS | ||
| # installation CD. | ||
|
|
||
| { pkgs, ... }: | ||
| let | ||
| calamares-nixos-autostart = pkgs.makeAutostartItem { name = "io.calamares.calamares"; package = pkgs.calamares-nixos; }; | ||
| in | ||
| { | ||
| imports = [ ./installation-cd-graphical-base.nix ]; | ||
|
|
||
| environment.systemPackages = with pkgs; [ | ||
| # Calamares for graphical installation | ||
| libsForQt5.kpmcore | ||
| calamares-nixos | ||
| calamares-nixos-autostart | ||
| calamares-nixos-extensions | ||
| # Needed for calamares QML module packagechooserq | ||
| libsForQt5.full | ||
| ]; | ||
| } |
4 changes: 1 addition & 3 deletions
4
nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5.nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| { stdenv, fetchFromGitHub, lib }: | ||
|
|
||
| stdenv.mkDerivation rec { | ||
| pname = "calamares-nixos-extensions"; | ||
| version = "0.3.8"; | ||
|
|
||
| src = fetchFromGitHub { | ||
| owner = "NixOS"; | ||
| repo = "calamares-nixos-extensions"; | ||
| rev = version; | ||
| sha256 = "MtqAOwlY5euVNAGRl2pRkbg/OolJPNOSQcR4DS5gFz4="; | ||
| }; | ||
|
|
||
| installPhase = '' | ||
| runHook preInstall | ||
| mkdir -p $out/{lib,share}/calamares | ||
| cp -r modules $out/lib/calamares/ | ||
| cp -r config/* $out/share/calamares/ | ||
| cp -r branding $out/share/calamares/ | ||
| runHook postInstall | ||
| ''; | ||
|
|
||
| meta = with lib; { | ||
| description = "Calamares modules for NixOS"; | ||
| homepage = "https://github.com/NixOS/calamares-nixos-extensions"; | ||
| license = with licenses; [ gpl3Plus bsd2 cc-by-40 cc-by-sa-40 cc0 ]; | ||
| maintainers = with maintainers; [ vlinkz ]; | ||
| platforms = platforms.linux; | ||
vlinkz marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }; | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.