diff --git a/modules/installer/default.nix b/modules/installer/default.nix index 63addbb..04f256f 100644 --- a/modules/installer/default.nix +++ b/modules/installer/default.nix @@ -4,6 +4,7 @@ with lib; let calamares-nixos-autostart = pkgs.makeAutostartItem { name = "io.calamares.calamares"; package = pkgs.calamares-nixos; }; + calamares-extensions-desk-os = pkgs.callPackage ../../packages/calamares-extensions {}; in { imports = [ @@ -18,6 +19,9 @@ in # Adds terminus_font for people with HiDPI displays console.packages = options.console.packages.default ++ [ pkgs.terminus_font ]; + # FIXME(m): Disable squashfs compression during development + isoImage.squashfsCompression = null; + # ISO naming. isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.iso"; @@ -103,9 +107,10 @@ in libsForQt5.kpmcore calamares-nixos calamares-nixos-autostart - calamares-nixos-extensions + calamares-extensions-desk-os # Get list of locales glibcLocales + gnomeExtensions.no-overview ]; # Support choosing from any locale @@ -117,6 +122,7 @@ in favoriteAppsOverride = '' [org.gnome.shell] favorite-apps=[ 'io.calamares.calamares.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Console.desktop' ] + enabled-extensions=[ '${pkgs.gnomeExtensions.no-overview.extensionUuid}' ] ''; # Override GNOME defaults to disable GNOME tour and disable suspend @@ -142,12 +148,6 @@ in 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; }; diff --git a/packages/calamares-extensions/LICENSES/BSD-2-Clause.txt b/packages/calamares-extensions/LICENSES/BSD-2-Clause.txt new file mode 100644 index 0000000..919d22d --- /dev/null +++ b/packages/calamares-extensions/LICENSES/BSD-2-Clause.txt @@ -0,0 +1,24 @@ + + Copyright 2019 Adriaan de Groot + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. diff --git a/packages/calamares-extensions/LICENSES/CC-BY-4.0.txt b/packages/calamares-extensions/LICENSES/CC-BY-4.0.txt new file mode 100644 index 0000000..4ea99c2 --- /dev/null +++ b/packages/calamares-extensions/LICENSES/CC-BY-4.0.txt @@ -0,0 +1,395 @@ +Attribution 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution 4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution 4.0 International Public License ("Public License"). To the +extent this Public License may be interpreted as a contract, You are +granted the Licensed Rights in consideration of Your acceptance of +these terms and conditions, and the Licensor grants You such rights in +consideration of benefits the Licensor receives from making the +Licensed Material available under these terms and conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + d. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + e. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + f. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + g. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + h. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + i. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + j. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + k. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part; and + + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + 4. If You Share Adapted Material You produce, the Adapter's + License You apply must not prevent recipients of the Adapted + Material from complying with this Public License. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material; and + + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + + +======================================================================= + +Creative Commons is not a party to its public +licenses. Notwithstanding, Creative Commons may elect to apply one of +its public licenses to material it publishes and in those instances +will be considered the “Licensor.” The text of the Creative Commons +public licenses is dedicated to the public domain under the CC0 Public +Domain Dedication. Except for the limited purpose of indicating that +material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the +public licenses. + +Creative Commons may be contacted at creativecommons.org. diff --git a/packages/calamares-extensions/LICENSES/CC-BY-SA-4.0.txt b/packages/calamares-extensions/LICENSES/CC-BY-SA-4.0.txt new file mode 100644 index 0000000..f11f4c3 --- /dev/null +++ b/packages/calamares-extensions/LICENSES/CC-BY-SA-4.0.txt @@ -0,0 +1,430 @@ +Valid-License-Identifier: CC-BY-SA-4.0 +License-Text: + +Attribution-ShareAlike 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More_considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution-ShareAlike 4.0 International Public +License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution-ShareAlike 4.0 International Public License ("Public +License"). To the extent this Public License may be interpreted as a +contract, You are granted the Licensed Rights in consideration of Your +acceptance of these terms and conditions, and the Licensor grants You +such rights in consideration of benefits the Licensor receives from +making the Licensed Material available under these terms and +conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. BY-SA Compatible License means a license listed at + creativecommons.org/compatiblelicenses, approved by Creative + Commons as essentially the equivalent of this Public License. + + d. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + e. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + f. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + g. License Elements means the license attributes listed in the name + of a Creative Commons Public License. The License Elements of this + Public License are Attribution and ShareAlike. + + h. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + i. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + j. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + k. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + l. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + m. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part; and + + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. Additional offer from the Licensor -- Adapted Material. + Every recipient of Adapted Material from You + automatically receives an offer from the Licensor to + exercise the Licensed Rights in the Adapted Material + under the conditions of the Adapter's License You apply. + + c. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + b. ShareAlike. + + In addition to the conditions in Section 3(a), if You Share + Adapted Material You produce, the following conditions also apply. + + 1. The Adapter's License You apply must be a Creative Commons + license with the same License Elements, this version or + later, or a BY-SA Compatible License. + + 2. You must include the text of, or the URI or hyperlink to, the + Adapter's License You apply. You may satisfy this condition + in any reasonable manner based on the medium, means, and + context in which You Share Adapted Material. + + 3. You may not offer or impose any additional or different terms + or conditions on, or apply any Effective Technological + Measures to, Adapted Material that restrict exercise of the + rights granted under the Adapter's License You apply. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material, + + including for purposes of Section 3(b); and + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + + +======================================================================= + +Creative Commons is not a party to its public +licenses. Notwithstanding, Creative Commons may elect to apply one of +its public licenses to material it publishes and in those instances +will be considered the “Licensor.” The text of the Creative Commons +public licenses is dedicated to the public domain under the CC0 Public +Domain Dedication. Except for the limited purpose of indicating that +material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the +public licenses. + +Creative Commons may be contacted at creativecommons.org. \ No newline at end of file diff --git a/packages/calamares-extensions/LICENSES/CC0-1.0.txt b/packages/calamares-extensions/LICENSES/CC0-1.0.txt new file mode 100644 index 0000000..a343ccd --- /dev/null +++ b/packages/calamares-extensions/LICENSES/CC0-1.0.txt @@ -0,0 +1,119 @@ +Creative Commons Legal Code + +CC0 1.0 Universal CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES +NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE +AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION +ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE +OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS +LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION +OR WORKS PROVIDED HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer exclusive +Copyright and Related Rights (defined below) upon the creator and subsequent +owner(s) (each and all, an "owner") of an original work of authorship and/or +a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for the +purpose of contributing to a commons of creative, cultural and scientific +works ("Commons") that the public can reliably and without fear of later claims +of infringement build upon, modify, incorporate in other works, reuse and +redistribute as freely as possible in any form whatsoever and for any purposes, +including without limitation commercial purposes. These owners may contribute +to the Commons to promote the ideal of a free culture and the further production +of creative, cultural and scientific works, or to gain reputation or greater +distribution for their Work in part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any expectation +of additional consideration or compensation, the person associating CC0 with +a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright +and Related Rights in the Work, voluntarily elects to apply CC0 to the Work +and publicly distribute the Work under its terms, with knowledge of his or +her Copyright and Related Rights in the Work and the meaning and intended +legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be protected +by copyright and related or neighboring rights ("Copyright and Related Rights"). +Copyright and Related Rights include, but are not limited to, the following: + +i. the right to reproduce, adapt, distribute, perform, display, communicate, +and translate a Work; + + ii. moral rights retained by the original author(s) and/or performer(s); + +iii. publicity and privacy rights pertaining to a person's image or likeness +depicted in a Work; + +iv. rights protecting against unfair competition in regards to a Work, subject +to the limitations in paragraph 4(a), below; + +v. rights protecting the extraction, dissemination, use and reuse of data +in a Work; + +vi. database rights (such as those arising under Directive 96/9/EC of the +European Parliament and of the Council of 11 March 1996 on the legal protection +of databases, and under any national implementation thereof, including any +amended or successor version of such directive); and + +vii. other similar, equivalent or corresponding rights throughout the world +based on applicable law or treaty, and any national implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention of, +applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and +unconditionally waives, abandons, and surrenders all of Affirmer's Copyright +and Related Rights and associated claims and causes of action, whether now +known or unknown (including existing as well as future claims and causes of +action), in the Work (i) in all territories worldwide, (ii) for the maximum +duration provided by applicable law or treaty (including future time extensions), +(iii) in any current or future medium and for any number of copies, and (iv) +for any purpose whatsoever, including without limitation commercial, advertising +or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the +benefit of each member of the public at large and to the detriment of Affirmer's +heirs and successors, fully intending that such Waiver shall not be subject +to revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason be +judged legally invalid or ineffective under applicable law, then the Waiver +shall be preserved to the maximum extent permitted taking into account Affirmer's +express Statement of Purpose. In addition, to the extent the Waiver is so +judged Affirmer hereby grants to each affected person a royalty-free, non +transferable, non sublicensable, non exclusive, irrevocable and unconditional +license to exercise Affirmer's Copyright and Related Rights in the Work (i) +in all territories worldwide, (ii) for the maximum duration provided by applicable +law or treaty (including future time extensions), (iii) in any current or +future medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional purposes +(the "License"). The License shall be deemed effective as of the date CC0 +was applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder of +the License, and in such case Affirmer hereby affirms that he or she will +not (i) exercise any of his or her remaining Copyright and Related Rights +in the Work or (ii) assert any associated claims and causes of action with +respect to the Work, in either case contrary to Affirmer's express Statement +of Purpose. + + 4. Limitations and Disclaimers. + +a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, +licensed or otherwise affected by this document. + +b. Affirmer offers the Work as-is and makes no representations or warranties +of any kind concerning the Work, express, implied, statutory or otherwise, +including without limitation warranties of title, merchantability, fitness +for a particular purpose, non infringement, or the absence of latent or other +defects, accuracy, or the present or absence of errors, whether or not discoverable, +all to the greatest extent permissible under applicable law. + +c. Affirmer disclaims responsibility for clearing rights of other persons +that may apply to the Work or any use thereof, including without limitation +any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims +responsibility for obtaining any necessary consents, permissions or other +rights required for any use of the Work. + +d. Affirmer understands and acknowledges that Creative Commons is not a party +to this document and has no duty or obligation with respect to this CC0 or +use of the Work. diff --git a/packages/calamares-extensions/LICENSES/GPL-3.0-or-later.txt b/packages/calamares-extensions/LICENSES/GPL-3.0-or-later.txt new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/packages/calamares-extensions/LICENSES/GPL-3.0-or-later.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/packages/calamares-extensions/README.md b/packages/calamares-extensions/README.md new file mode 100644 index 0000000..b1d7bb2 --- /dev/null +++ b/packages/calamares-extensions/README.md @@ -0,0 +1,32 @@ + + +# Calamares Branding and Modules for NixOS + +## Modules + +- [nixos](modules/nixos) is a Python **job** module + that creates a new configuration file based on the values given by the following base calamares modules: + - [locale](https://github.com/calamares/calamares/tree/calamares/src/modules/locale) + - [keyboard](https://github.com/calamares/calamares/tree/calamares/src/modules/keyboard) + - [users](https://github.com/calamares/calamares/tree/calamares/src/modules/users) + - [partition](https://github.com/calamares/calamares/tree/calamares/src/modules/partition) + - [packagechooser](https://github.com/calamares/calamares/tree/calamares/src/modules/packagechooser) + +## Branding + +- [nixos](branding/nixos) generic NixOS branding based on the [nixos homepage](https://github.com/NixOS/nixos-homepage) + + +## Licenses + +Most code (.py, .cpp, etc) files are licensed under GPL-3.0-or-later, but see specific files for details. + +Configuration files in [config](config) are licensed under [CC0-1.0](LICENSES/CC0-1.0.txt) + +Images stored in [config/images](config/images) are licensed under [CC-BY-SA-4.0](LICENSES/CC-BY-SA-4.0.txt) + +Images [gfx-landing-declarative.png](branding/nixos/gfx-landing-declarative.png), [gfx-landing-reliable.png](branding/nixos/gfx-landing-reliable.png), and [gfx-landing-reproducible.png](branding/nixos/gfx-landing-reproducible.png) are licensed under [CC-BY-SA-4.0](LICENSES/CC-BY-SA-4.0.txt) + +Images [nix-snowflake.svg](branding/nixos/nix-snowflake.svg) and [white.png](branding/nixos/white.png) are licensed under [CC-BY-4.0](LICENSES/CC-BY-4.0.txt) \ No newline at end of file diff --git a/packages/calamares-extensions/branding/desk_os/branding.desc b/packages/calamares-extensions/branding/desk_os/branding.desc new file mode 100644 index 0000000..5e19327 --- /dev/null +++ b/packages/calamares-extensions/branding/desk_os/branding.desc @@ -0,0 +1,233 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +--- +componentName: desk_os + + +### 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: Desk OS + shortProductName: Desk OS + version: + shortVersion: + versionedName: Desk OS + shortVersionedName: Desk OS + bootloaderEntryName: Desk OS + productUrl: https://nixup.io/ + supportUrl: https://nixup.io + knownIssuesUrl: https://github.com/nixup-io/desk-os/issues + releaseNotesUrl: https://nixup.io + donateUrl: https://nixup.io + +# 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: "desk-os-logo.png" + productLogo: "desk-os-logo.png" + # productWallpaper: "wallpaper.png" + # productWelcome: "desk-os-logo.png" + +# 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 diff --git a/packages/calamares-extensions/branding/desk_os/desk-os-logo.png b/packages/calamares-extensions/branding/desk_os/desk-os-logo.png new file mode 100644 index 0000000..e16ef8f Binary files /dev/null and b/packages/calamares-extensions/branding/desk_os/desk-os-logo.png differ diff --git a/packages/calamares-extensions/branding/desk_os/gfx-landing-1.png b/packages/calamares-extensions/branding/desk_os/gfx-landing-1.png new file mode 100644 index 0000000..ca1d3c1 Binary files /dev/null and b/packages/calamares-extensions/branding/desk_os/gfx-landing-1.png differ diff --git a/packages/calamares-extensions/branding/desk_os/gfx-landing-2.png b/packages/calamares-extensions/branding/desk_os/gfx-landing-2.png new file mode 100644 index 0000000..0eced2d Binary files /dev/null and b/packages/calamares-extensions/branding/desk_os/gfx-landing-2.png differ diff --git a/packages/calamares-extensions/branding/desk_os/gfx-landing-3.png b/packages/calamares-extensions/branding/desk_os/gfx-landing-3.png new file mode 100644 index 0000000..7b32fde Binary files /dev/null and b/packages/calamares-extensions/branding/desk_os/gfx-landing-3.png differ diff --git a/packages/calamares-extensions/branding/desk_os/show.qml b/packages/calamares-extensions/branding/desk_os/show.qml new file mode 100644 index 0000000..0e694dc --- /dev/null +++ b/packages/calamares-extensions/branding/desk_os/show.qml @@ -0,0 +1,143 @@ +/* + * + * SPDX-FileCopyrightText: 2015 Teo Mrnjavac + * SPDX-FileCopyrightText: 2018 Adriaan de Groot + * SPDX-FileCopyrightText: 2022 Victor Fuentes + * SPDX-License-Identifier: GPL-3.0-or-later + * + * Calamares is Free Software: see the License-Identifier above. + * + */ + +import QtQuick 2.0; +import calamares.slideshow 1.0; + +Presentation +{ + id: presentation + + function nextSlide() { + console.log("QML Component (default slideshow) Next slide"); + presentation.goToNextSlide(); + } + + Timer { + id: advanceTimer + interval: 20000 + running: presentation.activatedInCalamares + repeat: true + onTriggered: nextSlide() + } + + Slide { + Text { + id: text1 + anchors.centerIn: parent + text: "Text 1" + font.pixelSize: 30 + wrapMode: Text.WordWrap + width: presentation.width + horizontalAlignment: Text.Center + color: "#6586C8" + } + Image { + id: background1 + source: "gfx-landing-1.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: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
"+ + "tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
"+ + "quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
"+ + "consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse.
" + wrapMode: Text.WordWrap + width: presentation.width + horizontalAlignment: Text.Center + } + } + + Slide { + Text { + id: text2 + anchors.centerIn: parent + text: "Text 2" + font.pixelSize: 30 + wrapMode: Text.WordWrap + width: presentation.width + horizontalAlignment: Text.Center + color: "#6586C8" + } + Image { + id: background2 + source: "gfx-landing-2.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: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
"+ + "quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
"+ + "consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse.
" + wrapMode: Text.WordWrap + width: presentation.width + horizontalAlignment: Text.Center + } + } + + Slide { + Text { + id: text3 + anchors.centerIn: parent + text: "Text 3" + font.pixelSize: 30 + wrapMode: Text.WordWrap + width: presentation.width + horizontalAlignment: Text.Center + color: "#6586C8" + } + Image { + id: background3 + source: "gfx-landing-3.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: "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
"+ + "tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
"+ + "tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
"+ + "quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
"+ + "consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse.
" + wrapMode: Text.WordWrap + width: presentation.width + horizontalAlignment: Text.Center + } + } + + // When this slideshow is loaded as a V1 slideshow, only + // activatedInCalamares is set, which starts the timer (see above). + // + // In V2, also the onActivate() and onLeave() methods are called. + // These example functions log a message (and re-start the slides + // from the first). + function onActivate() { + console.log("QML Component (default slideshow) activated"); + presentation.currentSlide = 0; + } + + function onLeave() { + console.log("QML Component (default slideshow) deactivated"); + } + +} diff --git a/packages/calamares-extensions/branding/desk_os/white.png b/packages/calamares-extensions/branding/desk_os/white.png new file mode 100644 index 0000000..086544a Binary files /dev/null and b/packages/calamares-extensions/branding/desk_os/white.png differ diff --git a/packages/calamares-extensions/config/images/budgie.png b/packages/calamares-extensions/config/images/budgie.png new file mode 100644 index 0000000..8812907 Binary files /dev/null and b/packages/calamares-extensions/config/images/budgie.png differ diff --git a/packages/calamares-extensions/config/images/cinnamon.png b/packages/calamares-extensions/config/images/cinnamon.png new file mode 100644 index 0000000..f85074d Binary files /dev/null and b/packages/calamares-extensions/config/images/cinnamon.png differ diff --git a/packages/calamares-extensions/config/images/deepin.png b/packages/calamares-extensions/config/images/deepin.png new file mode 100644 index 0000000..2ebb07d Binary files /dev/null and b/packages/calamares-extensions/config/images/deepin.png differ diff --git a/packages/calamares-extensions/config/images/enlightenment.png b/packages/calamares-extensions/config/images/enlightenment.png new file mode 100644 index 0000000..7fabdd2 Binary files /dev/null and b/packages/calamares-extensions/config/images/enlightenment.png differ diff --git a/packages/calamares-extensions/config/images/gnome.png b/packages/calamares-extensions/config/images/gnome.png new file mode 100644 index 0000000..6e0478c Binary files /dev/null and b/packages/calamares-extensions/config/images/gnome.png differ diff --git a/packages/calamares-extensions/config/images/lumina.png b/packages/calamares-extensions/config/images/lumina.png new file mode 100644 index 0000000..09c8579 Binary files /dev/null and b/packages/calamares-extensions/config/images/lumina.png differ diff --git a/packages/calamares-extensions/config/images/lxqt.png b/packages/calamares-extensions/config/images/lxqt.png new file mode 100644 index 0000000..0e86e02 Binary files /dev/null and b/packages/calamares-extensions/config/images/lxqt.png differ diff --git a/packages/calamares-extensions/config/images/mate.png b/packages/calamares-extensions/config/images/mate.png new file mode 100644 index 0000000..0f3a2bb Binary files /dev/null and b/packages/calamares-extensions/config/images/mate.png differ diff --git a/packages/calamares-extensions/config/images/nodesktop.png b/packages/calamares-extensions/config/images/nodesktop.png new file mode 100644 index 0000000..28dfaf2 Binary files /dev/null and b/packages/calamares-extensions/config/images/nodesktop.png differ diff --git a/packages/calamares-extensions/config/images/pantheon.png b/packages/calamares-extensions/config/images/pantheon.png new file mode 100644 index 0000000..5e17ee4 Binary files /dev/null and b/packages/calamares-extensions/config/images/pantheon.png differ diff --git a/packages/calamares-extensions/config/images/plasma5.png b/packages/calamares-extensions/config/images/plasma5.png new file mode 100644 index 0000000..cde56d5 Binary files /dev/null and b/packages/calamares-extensions/config/images/plasma5.png differ diff --git a/packages/calamares-extensions/config/images/plasma6.png b/packages/calamares-extensions/config/images/plasma6.png new file mode 100644 index 0000000..627f876 Binary files /dev/null and b/packages/calamares-extensions/config/images/plasma6.png differ diff --git a/packages/calamares-extensions/config/images/xfce.png b/packages/calamares-extensions/config/images/xfce.png new file mode 100644 index 0000000..32720d4 Binary files /dev/null and b/packages/calamares-extensions/config/images/xfce.png differ diff --git a/packages/calamares-extensions/config/modules/finished.conf b/packages/calamares-extensions/config/modules/finished.conf new file mode 100644 index 0000000..6ee23cb --- /dev/null +++ b/packages/calamares-extensions/config/modules/finished.conf @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Configuration for the "finished" page, which is usually shown only at +# the end of the installation (successful or not). +--- +# DEPRECATED +# +# The finished page can hold a "restart system now" checkbox. +# If this is false, no checkbox is shown and the system is not restarted +# when Calamares exits. +# restartNowEnabled: true + +# DEPRECATED +# +# Initial state of the checkbox "restart now". Only relevant when the +# checkbox is shown by restartNowEnabled. +# restartNowChecked: false + +# Behavior of the "restart system now" button. +# +# There are four usable values: +# - never +# Does not show the button and does not restart. +# This matches the old behavior with restartNowEnabled=false. +# - user-unchecked +# Shows the button, defaults to unchecked, restarts if it is checked. +# This matches the old behavior with restartNowEnabled=true and restartNowChecked=false. +# - user-checked +# Shows the button, defaults to checked, restarts if it is checked. +# This matches the old behavior with restartNowEnabled=true and restartNowChecked=true. +# - always +# Shows the button, checked, but the user cannot change it. +# This is new behavior. +# +# The three combinations of legacy values are still supported. +restartNowMode: user-unchecked + +# If the checkbox is shown, and the checkbox is checked, then when +# Calamares exits from the finished-page it will run this command. +# If not set, falls back to "shutdown -r now". +restartNowCommand: "systemctl -i reboot" + +# When the last page is (successfully) reached, send a DBus notification +# to the desktop that the installation is done. This works only if the +# user as whom Calamares is run, can reach the regular desktop session bus. +notifyOnFinished: true diff --git a/packages/calamares-extensions/config/modules/keyboard.conf b/packages/calamares-extensions/config/modules/keyboard.conf new file mode 100644 index 0000000..32e7cda --- /dev/null +++ b/packages/calamares-extensions/config/modules/keyboard.conf @@ -0,0 +1,19 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# NOTE: you must have ckbcomp installed and runnable +# on the live system, for keyboard layout previews. +--- +# The name of the file to write X11 keyboard settings to +# The default value is the name used by upstream systemd-localed. +# Relative paths are assumed to be relative to /etc/X11/xorg.conf.d +xOrgConfFileName: "/etc/X11/xorg.conf.d/00-keyboard.conf" + +# The path to search for keymaps converted from X11 to kbd format +# Leave this empty if the setting does not make sense on your distribution. +#convertedKeymapPath: "/lib/kbd/keymaps/xkb" + +# Write keymap configuration to /etc/default/keyboard, usually +# found on Debian-related systems. +# Defaults to true if nothing is set. +writeEtcDefaultKeyboard: false diff --git a/packages/calamares-extensions/config/modules/locale.conf b/packages/calamares-extensions/config/modules/locale.conf new file mode 100644 index 0000000..bb2a7e8 --- /dev/null +++ b/packages/calamares-extensions/config/modules/locale.conf @@ -0,0 +1,100 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +--- +# This settings are used to set your default system time zone. +# Time zones are usually located under /usr/share/zoneinfo and +# provided by the 'tzdata' package of your Distribution. +# +# Distributions using systemd can list available +# time zones by using the timedatectl command. +# timedatectl list-timezones +# +# The starting timezone (e.g. the pin-on-the-map) when entering +# the locale page can be set through keys *region* and *zone*. +# If either is not set, defaults to America/New_York. +# +region: "America" +zone: "New_York" + + +# System locales are detected in the following order: +# +# - /usr/share/i18n/SUPPORTED +# - localeGenPath (defaults to /etc/locale.gen if not set) +# - 'locale -a' output +# +# Enable only when your Distribution is using an +# custom path for locale.gen +# +#localeGenPath: "PATH_TO/locale.gen" + +# GeoIP based Language settings: Leave commented out to disable GeoIP. +# +# GeoIP needs a working Internet connection. +# This can be managed from `welcome.conf` by adding +# internet to the list of required conditions. +# +# The configuration +# is in three parts: a *style*, which can be "json" or "xml" +# depending on the kind of data returned by the service, and +# a *url* where the data is retrieved, and an optional *selector* +# to pick the right field out of the returned data (e.g. field +# name in JSON or element name in XML). +# +# The default selector (when the setting is blank) is picked to +# work with existing JSON providers (which use "time_zone") and +# Ubiquity's XML providers (which use "TimeZone"). +# +# If the service configured via *url* uses +# a different attribute name (e.g. "timezone") in JSON or a +# different element tag (e.g. "") in XML, set this +# string to the name or tag to be used. +# +# In JSON: +# - if the string contains "." characters, this is used as a +# multi-level selector, e.g. "a.b" will select the timezone +# from data "{a: {b: "Europe/Amsterdam" } }". +# - each part of the string split by "." characters is used as +# a key into the JSON data. +# In XML: +# - all elements with the named tag (e.g. all TimeZone) elements +# from the document are checked; the first one with non-empty +# text value is used. +# +# +# An HTTP(S) request is made to *url*. The request should return +# valid data in a suitable format, depending on *style*; +# generally this includes a string value with the timezone +# in / format. For services that return data which +# does not follow the conventions of "suitable data" described +# below, *selector* may be used to pick different data. +# +# Note that this example URL works, but the service is shutting +# down in June 2018. +# +# Suitable JSON data looks like +# ``` +# {"time_zone":"America/New_York"} +# ``` +# Suitable XML data looks like +# ``` +# Europe/Brussels +# ``` +# +# To accommodate providers of GeoIP timezone data with peculiar timezone +# naming conventions, the following cleanups are performed automatically: +# - backslashes are removed +# - spaces are replaced with _ +# +# Legacy settings "geoipStyle", "geoipUrl" and "geoipSelector" +# in the top-level are still supported, but I'd advise against. +# +# To disable GeoIP checking, either comment-out the entire geoip section, +# or set the *style* key to an unsupported format (e.g. `none`). +# Also, note the analogous feature in src/modules/welcome/welcome.conf. +# +geoip: + style: "json" + url: "https://geoip.kde.org/v1/calamares" + selector: "" # leave blank for the default diff --git a/packages/calamares-extensions/config/modules/mount.conf b/packages/calamares-extensions/config/modules/mount.conf new file mode 100644 index 0000000..52f7741 --- /dev/null +++ b/packages/calamares-extensions/config/modules/mount.conf @@ -0,0 +1,62 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Mount filesystems in the target (generally, before treating the +# target as a usable chroot / "live" system). Filesystems are +# automatically mounted from the partitioning module. Filesystems +# listed here are **extra**. The filesystems listed in *extraMounts* +# are mounted in all target systems. +--- +# Extra filesystems to mount. The key's value is a list of entries; each +# entry has five keys: +# - device The device node to mount +# - fs (optional) The filesystem type to use +# - mountPoint Where to mount the filesystem +# - options (optional) An array of options to pass to mount +# - efi (optional) A boolean that when true is only mounted for UEFI installs +# +# The device is not mounted if the mountPoint is unset or if the fs is +# set to unformatted. +# +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 + +# The mount options used to mount each filesystem. +# +# filesystem contains the name of the filesystem or on of three special +# values, "default", efi" and "btrfs_swap". The logic is applied in this manner: +# - If the partition is the EFI partition, the "efi" entry will be used +# - If the fs is btrfs and the subvolume is for the swapfile, +# the "btrfs_swap" entry is used +# - If the filesystem is an exact match for filesystem, that entry is used +# - If no match is found in the above, the default entry is used +# - If there is no match and no default entry, "defaults" is used +# - If the mountOptions key is not present, "defaults" is used +# +# Each filesystem entry contains 3 keys, all of which are optional +# options - An array of mount options that is used on all disk types +# ssdOptions - An array of mount options combined with options for ssds +# hddOptions - An array of mount options combined with options for hdds +# If combining these options results in an empty array, "defaults" is used +# +mountOptions: + - filesystem: efi + options: [ fmask=0077, dmask=0077 ] diff --git a/packages/calamares-extensions/config/modules/packagechooser.conf b/packages/calamares-extensions/config/modules/packagechooser.conf new file mode 100644 index 0000000..509dd5c --- /dev/null +++ b/packages/calamares-extensions/config/modules/packagechooser.conf @@ -0,0 +1,251 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Configuration for the low-density software chooser +--- +# Software selection mode, to set whether the software packages +# can be chosen singly, or multiply. +# +# Possible modes are "optional", "required" (for zero-or-one or exactly-one) +# or "optionalmultiple", "requiredmultiple" (for zero-or-more +# or one-or-more). +mode: required + +# Software installation method: +# +# - "legacy" or "custom" or "contextualprocess" +# When set to "legacy", writes a GlobalStorage value for the choice that +# has been made. The key is *packagechooser_*. The module's +# instance name is used; see the *instances* section of `settings.conf`. +# If there is just one packagechooser module, and no special instance is set, +# resulting GS key is probably *packagechooser_packagechooser*. +# +# The GS value is a comma-separated list of the IDs of the selected +# packages, or an empty string if none is selected. +# +# With "legacy" installation, you should have a contextualprocess or similar +# module somewhere in the `exec` phase to process the GlobalStorage key +# and actually **do** something for the packages. +# +# - "packages" +# When set to "packages", writes GlobalStorage values suitable for +# consumption by the *packages* module (which should appear later +# in the `exec` section. These package settings will then be handed +# off to whatever package manager is configured there. +# +# - "netinstall-select" +# When this is set, the id(s) selected are passed to the netinstall module. +# Any id that matches a group name in that module is set to checked +# +# - "netinstall-add" +# With this method, the packagechooser module is used to add groups to the +# netinstall module. For this to hav=e any effect. You must set netinstall, +# which is described below. +# +# There is no need to put this module in the `exec` section. There +# are no jobs that this module provides. You should put **other** +# modules, either *contextualprocess* or *packages* or some custom +# module, in the `exec` section to do the actual work. +method: legacy + + +# Human-visible strings in this module. These are all optional. +# The following translated keys are used: +# - *step*, used in the overall progress view (left-hand pane) +# +# Each key can have a [locale] added to it, which is used as +# the translated string for that locale. For the strings +# associated with the "no-selection" item, see *items*, below +# with the explicit item-*id* "". +# +labels: + step: "Desktop" + +# (Optional) item-*id* of pre-selected list-view item. +# Pre-selects one of the items below. +default: gnome + +# Items to display in the chooser. In general, this should be a +# pretty short list to avoid overwhelming the UI. This is a list +# of objects, and the items are displayed in list order. +# +# Either provide the data for an item in the list (using the keys +# below), or use existing AppData XML files, or use AppStream cache +# as a source for the data. +# +# For data provided by the list: the item has an id, which is used in +# setting the value of *packagechooser_*. The following field +# is mandatory: +# +# - *id* +# ID for the product. The ID "" is special, and is used for +# "no package selected". Only include this if the mode allows +# selecting none. The name and description given for the "no package +# selected" item are displayed when the module starts. +# +# Each item must adhere to one of three "styles" of item. Which styles +# are supported depends on compile-time dependencies of Calamares. +# Both AppData and AppStream may **optionally** be available. +# +# # Generic Items # +# +# These items are always supported. They require the most configuration +# **in this file** and duplicate information that may be available elsewhere +# (e.g. in AppData or AppStream), but do not require any additional +# dependencies. These items have the following **mandatory** fields: +# +# - *name* +# Human-readable name of the product. To provide translations, +# add a *[lang]* decoration as part of the key name, e.g. `name[nl]` +# for Dutch. The list of usable languages can be found in +# `CMakeLists.txt` or as part of the debug output of Calamares. +# - *description* +# Human-readable description. These can be translated as well. +# - *screenshot* +# Path to a single screenshot of the product. May be a filesystem +# path or a QRC path, e.g. ":/images/no-selection.png". If the path +# is not found (e.g. is a non-existent absolute path, or is a relative +# path that does not exist in the current working directory) then +# an additional attempt is made to load the image from the **branding** +# directory. +# +# The following fields are **optional** for an item: +# +# - *packages* : +# List of package names for the product. If using the *method* +# "packages", consider this item mandatory (because otherwise +# selecting the item would install no packages). +# +# - *netinstall* : +# The data in this field should follow the format of a group +# from the netinstall module documented in +# src/modules/netinstall/netinstall.conf. This is only used +# when method is set to "netinstall-add" +# +# # AppData Items # +# +# For data provided by AppData XML: the item has an *appdata* +# key which points to an AppData XML file in the local filesystem. +# This file is parsed to provide the id (from AppData id), name +# (from AppData name), description (from AppData description paragraphs +# or the summary entries), and a screenshot (the default screenshot +# from AppData). No package is set (but that is unused anyway). +# +# AppData may contain IDs that are not useful inside Calamares, +# and the screenshot URL may be remote -- a remote URL will not +# be loaded and the screenshot will be missing. An item with *appdata* +# **may** specify an ID or screenshot path, as above. This will override +# the settings from AppData. +# +# # AppStream Items # +# +# For data provided by AppStream cache: the item has an *appstream* +# key which matches the AppStream identifier in the cache (e.g. +# *org.kde.kwrite.desktop*). Data is retrieved from the AppStream +# cache for that ID. The package name is set from the AppStream data. +# +# An item for AppStream may also contain an *id* and a *screenshot* +# key which will override the data from AppStream. +items: + + - id: gnome + packages: [ gnome ] + name: GNOME + description: "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.
+
+ Learn more at gnome.org" + screenshot: "/run/current-system/sw/share/calamares/images/gnome.png" + + - id: plasma6 + packages: [ plasma6 ] + name: Plasma + description: "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.
+
+ Learn more at kde.org/plasma-desktop" + screenshot: "/run/current-system/sw/share/calamares/images/plasma6.png" + + - id: plasma5 + packages: [ plasma5 ] + name: Plasma 5 + description: "A long term support version of Plasma. More mature than Plasma 6 currently, but less actively developed.
+
+ " + screenshot: "/run/current-system/sw/share/calamares/images/plasma5.png" + + - id: xfce + packages: [ xfce ] + name: Xfce + description: "Xfce is a lightweight desktop environment. It aims to be fast and low on system resources, while still being visually appealing and user friendly.
+
+ Learn more at xfce.org" + screenshot: "/run/current-system/sw/share/calamares/images/xfce.png" + + - id: pantheon + packages: [ pantheon ] + name: Pantheon + description: "Pantheon is the default desktop of Elementary OS. It provides a productive and intuitive user experience while also being visually appealing.
+
+ Learn more at elementary.io/docs/learning-the-basics" + screenshot: "/run/current-system/sw/share/calamares/images/pantheon.png" + + - id: cinnamon + packages: [ cinnamon ] + name: Cinnamon + description: "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.
+
+ Learn more at projects.linuxmint.com/cinnamon" + screenshot: "/run/current-system/sw/share/calamares/images/cinnamon.png" + + - id: mate + packages: [ mate ] + name: MATE + description: "The MATE Desktop Environment is the continuation of GNOME 2. It provides an intuitive and attractive desktop environment.
+
+ Learn more at mate-desktop.org" + screenshot: "/run/current-system/sw/share/calamares/images/mate.png" + + - id: enlightenment + packages: [ enlightenment ] + name: Enlightenment + description: "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.
+
+ Learn more at enlightenment.org" + screenshot: "/run/current-system/sw/share/calamares/images/enlightenment.png" + + - id: lxqt + packages: [ lxqt ] + name: LXQt + description: "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.
+
+ Learn more at lxqt-project.org" + screenshot: "/run/current-system/sw/share/calamares/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: "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.
+ # - Learn more at lumina-desktop.org" + # screenshot: "/run/current-system/sw/share/calamares/images/lumina.png" + + - id: budgie + packages: [ budgie ] + name: Budgie + description: "The Budgie Desktop is a feature-rich, modern desktop designed to keep out the way of the user.
+
+ Learn more at buddiesofbudgie.org" + screenshot: "/run/current-system/sw/share/calamares/images/budgie.png" + + - id: deepin + packages: [ deepin ] + name: Deepin + description: "The Deepin Desktop Environment is an elegant, easy to use and reliable desktop environment.
+
+ Learn more at deepin.org" + screenshot: "/run/current-system/sw/share/calamares/images/deepin.png" + + - id: "" + packages: [] + name: "No desktop" + screenshot: "/run/current-system/sw/share/calamares/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." diff --git a/packages/calamares-extensions/config/modules/partition.conf b/packages/calamares-extensions/config/modules/partition.conf new file mode 100644 index 0000000..bbdb3f2 --- /dev/null +++ b/packages/calamares-extensions/config/modules/partition.conf @@ -0,0 +1,300 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# + +# Options for EFI system partition. +# +# - *mountPoint* +# This setting specifies the mount point of the EFI system partition. Some +# distributions (Fedora, Debian, Manjaro, etc.) use /boot/efi, others (KaOS, +# etc.) use just /boot. +# +# Defaults to "/boot/efi", may be empty (but weird effects ensue) +# - *recommendedSize* +# This optional setting specifies the size of the EFI system partition. +# If nothing is specified, the default size of 300MiB will be used. +# When writing quantities here, M is treated as MiB, and if you really +# want one-million (10^6) bytes, use MB. +# - *minimumSize* +# This optional setting specifies the absolute minimum size of the EFI +# system partition. If nothing is specified, the *recommendedSize* +# is used instead. +# - *label* +# This optional setting specifies the name of the EFI system partition (see +# PARTLABEL; gpt only; requires KPMCore >= 4.2.0). +# If nothing is specified, the partition name is left unset. +# +# Going below the *recommended* size is allowed, but the user will +# get a warning that it might not work. Going below the *minimum* +# size is not allowed and the user will be told it will not work. +# +# Both quantities must be at least 32MiB, this is enforced by the EFI +# spec. If minimum is not specified, it defaults to the recommended +# size. Distro's that allow more user latitude can set the minimum lower. +efi: + mountPoint: "/boot" + recommendedSize: 512MiB + minimumSize: 32MiB + label: "EFI" + +# Deprecated alias of efi.mountPoint +# efiSystemPartition: "/boot/efi" + +# Deprecated alias of efi.recommendedSize +# efiSystemPartitionSize: 300MiB + +# Deprecated alias of efi.label +# efiSystemPartitionName: EFI + +# In autogenerated partitioning, allow the user to select a swap size? +# If there is exactly one choice, no UI is presented, and the user +# cannot make a choice -- this setting is used. If there is more than +# one choice, a UI is presented. +# +# Legacy settings *neverCreateSwap* and *ensureSuspendToDisk* correspond +# to values of *userSwapChoices* as follows: +# - *neverCreateSwap* is true, means [none] +# - *neverCreateSwap* is false, *ensureSuspendToDisk* is false, [small] +# - *neverCreateSwap* is false, *ensureSuspendToDisk* is true, [suspend] +# +# Autogenerated swap sizes are as follows: +# - *suspend*: Swap is always at least total memory size, +# and up to 4GiB RAM follows the rule-of-thumb 2 * memory; +# from 4GiB to 8 GiB it stays steady at 8GiB, and over 8 GiB memory +# swap is the size of main memory. +# - *small*: Follows the rules above, but Swap is at +# most 8GiB, and no more than 10% of available disk. +# In both cases, a fudge factor (usually 10% extra) is applied so that there +# is some space for administrative overhead (e.g. 8 GiB swap will allocate +# 8.8GiB on disk in the end). +# +# If *file* is enabled here, make sure to have the *fstab* module +# as well (later in the exec phase) so that the swap file is +# actually created. +userSwapChoices: + - none # Create no swap, use no swap + - small # Up to 4GB + - suspend # At least main memory size + # - reuse # Re-use existing swap, but don't create any (unsupported right now) + # - file # To swap file instead of partition + +# This optional setting specifies the name of the swap partition (see +# PARTLABEL; gpt only; requires KPMCore >= 4.2.0). +# If nothing is specified, the partition name is left unset. +# swapPartitionName: swap + +# LEGACY SETTINGS (these will generate a warning) +# ensureSuspendToDisk: true +# neverCreateSwap: false + +# This setting specifies the LUKS generation (i.e LUKS1, LUKS2) used internally by +# cryptsetup when creating an encrypted partition. +# +# This option is set to luks1 by default, as grub doesn't support LUKS2 + Argon2id +# currently. On the other hand grub does support LUKS2 with PBKDF2 and could therefore be +# also set to luks2. Also there are some patches for grub and Argon2. +# See: https://aur.archlinux.org/packages/grub-improved-luks2-git +# +# Choices: luks1, luks2 (in addition, "luks" means "luks1") +# +# The default is luks1 +# +luksGeneration: luks2 + +# This setting determines if encryption should be allowed when using zfs. This +# setting has no effect unless zfs support is provided. +# +# This setting is to handle the fact that some bootloaders(such as grub) do not +# support zfs encryption. +# +# The default is true +# +# allowZfsEncryption: true + +# Correctly draw nested (e.g. logical) partitions as such. +drawNestedPartitions: false + +# Show/hide partition labels on manual partitioning page. +alwaysShowPartitionLabels: true + +# Allow manual partitioning. +# +# When set to false, this option hides the "Manual partitioning" button, +# limiting the user's choice to "Erase", "Replace" or "Alongside". +# This can be useful when using a custom partition layout we don't want +# the user to modify. +# +# If nothing is specified, manual partitioning is enabled. +#allowManualPartitioning: true + +# Show not encrypted boot partition warning. +# +# When set to false, this option does not show the +# "Boot partition not encrypted" warning when encrypting the +# root partition but not /boot partition. +# +# If nothing is specified, the warning is shown. +showNotEncryptedBootMessage: false + +# Initial selection on the Choice page +# +# There are four radio buttons (in principle: erase, replace, alongside, manual), +# and you can pick which of them, if any, is initially selected. For most +# installers, "none" is the right choice: it makes the user pick something specific, +# rather than accidentally being able to click past an important choice (in particular, +# "erase" is a dangerous choice). +# +# The default is "none" +# +initialPartitioningChoice: none +# +# Similarly, some of the installation choices may offer a choice of swap; +# the available choices depend on *userSwapChoices*, above, and this +# setting can be used to pick a specific one. +# +# The default is "none" (no swap) if that is one of the enabled options, otherwise +# one of the items from the options. +initialSwapChoice: none + +# armInstall +# +# Leaves 16MB empty at the start of a drive when partitioning +# where usually the u-boot loader goes +# +# armInstall: false + +# Default partition table type, used when a "erase" disk is made. +# +# When erasing a disk, a new partition table is created on disk. +# In other cases, e.g. Replace and Alongside, as well as when using +# manual partitioning, this partition table exists already on disk +# and it is left unmodified. +# +# Suggested values: gpt, msdos +# If nothing is specified, Calamares defaults to "gpt" if system is +# efi or "msdos". +# +# Names are case-sensitive and defined by KPMCore. +# defaultPartitionTableType: msdos + +# Requirement for partition table type +# +# Restrict the installation on disks that match the type of partition +# tables that are specified. +# +# Possible values: msdos, gpt. Names are case-sensitive and defined by KPMCore. +# +# If nothing is specified, Calamares defaults to both "msdos" and "gpt". +# +# requiredPartitionTableType: gpt +# requiredPartitionTableType: +# - msdos +# - gpt + +# Default filesystem type, used when a "new" partition is made. +# +# When replacing a partition, the new filesystem type will be from the +# defaultFileSystemType value. In other cases, e.g. Erase and Alongside, +# as well as when using manual partitioning and creating a new +# partition, this filesystem type is pre-selected. Note that +# editing a partition in manual-creation mode will not automatically +# change the filesystem type to this default value -- it is not +# creating a new partition. +# +# Suggested values: ext2, ext3, ext4, reiser, xfs, jfs, btrfs +# If nothing is specified, Calamares defaults to "ext4". +# +# Names are case-sensitive and defined by KPMCore. +defaultFileSystemType: "ext4" + +# Selectable filesystem type, used when "erase" is done. +# +# When erasing the disk, the *defaultFileSystemType* is used (see +# above), but it is also possible to give users a choice: +# list suitable filesystems here. A drop-down is provided +# to pick which is the filesystems will be used. +# +# The value *defaultFileSystemType* is added to this list (with a warning) +# if not present; the default pick is the *defaultFileSystemType*. +# +# If not specified at all, uses *defaultFileSystemType* without a +# warning (this matches traditional no-choice-available behavior best). +# availableFileSystemTypes: ["ext4","f2fs"] + +# Show/hide LUKS related functionality in automated partitioning modes. +# Disable this if you choose not to deploy early unlocking support in GRUB2 +# and/or your distribution's initramfs solution. +# +# BIG FAT WARNING: +# +# This option is unsupported, as it cuts out a crucial security feature. +# Disabling LUKS and shipping Calamares without a correctly configured GRUB2 +# and initramfs is considered suboptimal use of the Calamares software. The +# Calamares team will not provide user support for any potential issue that +# may arise as a consequence of setting this option to false. +# It is strongly recommended that system integrators put in the work to support +# LUKS unlocking support in GRUB2 and initramfs/dracut/mkinitcpio/etc. +# For more information on setting up GRUB2 for Calamares with LUKS, see +# https://github.com/calamares/calamares/wiki/Deploy-LUKS +# +# If nothing is specified, LUKS is enabled in automated modes. +#enableLuksAutomatedPartitioning: true + +# Partition layout. +# +# This optional setting specifies a custom partition layout. +# +# If nothing is specified, the default partition layout is a single partition +# for root that uses 100% of the space and uses the filesystem defined by +# defaultFileSystemType. +# +# Note: the EFI system partition is prepend automatically to the layout if +# needed; the swap partition is appended to the layout if enabled (small of +# suspend). +# +# Otherwise, the partition layout is defined as follow: +# +partitionLayout: + - filesystem: "ext4" + noEncrypt: false + mountPoint: "/" + size: 100% + +# +# There can be any number of partitions, each entry having the following attributes: +# - name: filesystem label +# and +# partition name (gpt only; since KPMCore 4.2.0) +# - uuid: partition uuid (optional parameter; gpt only; requires KPMCore >= 4.2.0) +# - type: partition type (optional parameter; gpt only; requires KPMCore >= 4.2.0) +# - attributes: partition attributes (optional parameter; gpt only; requires KPMCore >= 4.2.0) +# - filesystem: filesystem type (optional parameter) +# - if not set at all, treat as "unformatted" +# - if "unformatted", no filesystem will be created +# - if "unknown" (or an unknown FS name, like "elephant") then the +# default filesystem type, or the user's choice, will be applied instead +# of "unknown" (e.g. the user might pick ext4, or xfs). +# - noEncrypt: whether this partition is exempt from encryption if enabled (optional parameter; default is false) +# - mountPoint: partition mount point (optional parameter; not mounted if unset) +# - size: partition size in bytes (append 'K', 'M' or 'G' for KiB, MiB or GiB) +# or +# % of the available drive space if a '%' is appended to the value +# - minSize: minimum partition size (optional parameter) +# - maxSize: maximum partition size (optional parameter) +# - features: filesystem features (optional parameter; requires KPMCore >= 4.2.0) +# name: boolean or integer or string + +# Checking for available storage +# +# This overlaps with the setting of the same name in the welcome module's +# requirements section. If nothing is set by the welcome module, this +# value is used instead. It is still a problem if there is no required +# size set at all, and the replace and resize options will not be offered +# if no required size is set. +# +# The value is in Gibibytes (GiB). +# +# BIG FAT WARNING: except for OEM-phase-0 use, you should be using +# the welcome module, **and** configure this value in +# `welcome.conf`, not here. +# requiredStorage: 3.5 diff --git a/packages/calamares-extensions/config/modules/umount.conf b/packages/calamares-extensions/config/modules/umount.conf new file mode 100644 index 0000000..fa4df9c --- /dev/null +++ b/packages/calamares-extensions/config/modules/umount.conf @@ -0,0 +1,45 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +### Umount Module +# +# This module represents the last part of the installation, the unmounting +# of partitions used for the install. It is also the last place where it +# is possible to copy files to the target system, thus the best place to +# copy an installation log. +# +# This module has two configuration keys: +# srcLog location in the live system where the log is +# destLog location in the target system to copy the log +# +# You can either use the default source path (which is +# `/root/.cache/calamares/session.log` ) to copy the regular log, +# or if you want to use the full output of `sudo calamares -d` you will need +# to redirect standard output, for instance in a launcher script or +# in the desktop file. +# +# Example launcher script: +# +# ``` +# #!/bin/sh +# sudo /usr/bin/calamares -d > installation.log +# ``` +# +# Example desktop line: +# +# ``` +# Exec=sudo /usr/bin/calamares -d > installation.log +# ``` +# +# If no source and destination are set, no copy is attempted. If the +# copy fails for some reason, a warning is printed but the installation +# does not fail. + +--- +# example when using the normal Calamares log: +srcLog: "/home/nixos/.cache/calamares/session.log" +destLog: "/var/log/Calamares.log" + +# example when using a log created by `sudo calamares -d`: +#srcLog: "/home/live/installation.log" +#destLog: "/var/log/installation.log" diff --git a/packages/calamares-extensions/config/modules/unfree.conf b/packages/calamares-extensions/config/modules/unfree.conf new file mode 100644 index 0000000..da79a8e --- /dev/null +++ b/packages/calamares-extensions/config/modules/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 diff --git a/packages/calamares-extensions/config/modules/users.conf b/packages/calamares-extensions/config/modules/users.conf new file mode 100644 index 0000000..3840d15 --- /dev/null +++ b/packages/calamares-extensions/config/modules/users.conf @@ -0,0 +1,265 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Configuration for the one-user-system user module. +# +# Besides these settings, the users module also places the following +# keys into the Global Storage area, based on user input in the view step. +# +# - hostname +# - username +# - password (obscured) +# - autologinUser (if enabled, set to username) +# +# These Global Storage keys are set when the configuration for this module +# is read and when they are modified in the UI. +--- +### GROUPS CONFIGURATION +# +# The system has groups of uses. Some special groups must be +# created during installation. Optionally, there are special +# groups for users who can use sudo and for supporting autologin. + +# Used as default groups for the created user. +# Adjust to your Distribution defaults. +# +# Each entry in the *defaultGroups* list is either: +# - a string, naming a group; this is a **non**-system group +# which does not need to exist in the target system; if it +# does not exist, it will be created. +# - an entry with subkeys *name*, *must_exist* and *system*; +# if the group *must_exist* and does not, an error is thrown +# and the installation fails. +# +# The group is created if it does not exist, and it is +# created as a system group (GID < 1000) or user group +# (GID >= 1000) depending on the value of *system*. +defaultGroups: + - users + - networkmanager + - wheel + +# When *sudoersGroup* is set to a non-empty string, Calamares creates a +# sudoers file for the user. This file is located at: +# `/etc/sudoers.d/10-installer` +# Remember to add the (value of) *sudoersGroup* to *defaultGroups*. +# +# If your Distribution already sets up a group of sudoers in its packaging, +# remove this setting (delete or comment out the line below). Otherwise, +# the setting will be duplicated in the `/etc/sudoers.d/10-installer` file, +# potentially confusing users. +# sudoersGroup: wheel + +# Some Distributions require a 'autologin' group for the user. +# Autologin causes a user to become automatically logged in to +# the desktop environment on boot. +# Disable when your Distribution does not require such a group. +# autologinGroup: autologin + + +### ROOT AND SUDO +# +# Some distributions have a root user enabled for login. Others +# rely entirely on sudo or similar mechanisms to raise privileges. + +# If set to `false` (the default), writes a sudoers file with `ALL=(ALL)` +# so that commands can be run as any user. If set to `true`, writes +# `ALL=(ALL:ALL)` so that any user and any group can be chosen. +# sudoersConfigureWithGroup: false + +# Setting this to false, causes the root account to be disabled. +# When disabled, hides the "Use the same password for administrator" +# checkbox. Also hides the "Choose a password" and associated text-inputs. +setRootPassword: true + +# You can control the initial state for the 'reuse password for root' +# checkbox here. Possible values are: +# - true to check or +# - false to uncheck +# +# When checked, the user password is used for the root account too. +# +# NOTE: *doReusePassword* requires *setRootPassword* to be enabled. +doReusePassword: false + + +### PASSWORDS AND LOGIN +# +# Autologin is convenient for single-user systems, but depends on +# the location of the machine if it is practical. "Password strength" +# measures measures might improve security by enforcing hard-to-guess +# passwords, or might encourage a post-it-under-the-keyboard approach. +# Distributions are free to steer their users to one kind of password +# or another. Weak(er) passwords may be allowed, may cause a warning, +# or may be forbidden entirely. + +# You can control the initial state for the 'autologin checkbox' here. +# Possible values are: +# - true to check or +# - false to uncheck +# These set the **initial** state of the checkbox. +doAutologin: false + +# These are optional password-requirements that a distro can enforce +# on the user. The values given in this sample file set only very weak +# validation settings. +# +# Calamares itself supports two checks: +# - minLength +# - maxLength +# In this sample file, the values are set to -1 which means "no +# minimum", "no maximum". This allows any password at all. +# No effort is done to ensure that the checks are consistent +# (e.g. specifying a maximum length less than the minimum length +# will annoy users). +# +# Calamares supports password checking through libpwquality. +# The libpwquality check relies on the (optional) libpwquality library. +# The value for libpwquality is a list of configuration statements like +# those found in pwquality.conf. The statements are handed off to the +# libpwquality parser for evaluation. The check is ignored if +# libpwquality is not available at build time (generates a warning in +# the log). The Calamares password check rejects passwords with a +# score of < 40 with the given libpwquality settings. +# +# (additional checks may be implemented in CheckPWQuality.cpp and +# wired into UsersPage.cpp) +# +# To disable all password validations: +# - comment out the relevant 'passwordRequirements' keys below, +# or set minLength and maxLength to -1. +# - disable libpwquality at build-time. +# To allow all passwords, but provide warnings: +# - set both 'allowWeakPasswords' and 'allowWeakPasswordsDefault' to true. +# (That will show the box *Allow weak passwords* in the user- +# interface, and check it by default). +# - configure password-checking however you wish. +# To require specific password characteristics: +# - set 'allowWeakPasswords' to false (the default) +# - configure password-checking, e.g. with NIST settings + + +# These are very weak -- actually, none at all -- requirements +passwordRequirements: + minLength: 1 # Password at least this many characters + maxLength: -1 # Password at most this many characters + libpwquality: + - minlen=0 + - minclass=0 + +# These are "you must have a password, any password" -- requirements +# +# passwordRequirements: +# minLength: 1 + +# These are requirements the try to follow the suggestions from +# https://pages.nist.gov/800-63-3/sp800-63b.html , "Digital Identity Guidelines". +# Note that requiring long and complex passwords has its own cost, +# because the user has to come up with one at install time. +# Setting 'allowWeakPasswords' to false and 'doAutologin' to false +# will require a strong password and prevent (graphical) login +# without the password. It is likely to be annoying for casual users. +# +# passwordRequirements: +# minLength: 8 +# maxLength: 64 +# libpwquality: +# - minlen=8 +# - maxrepeat=3 +# - maxsequence=3 +# - usersubstr=4 +# - badwords=linux + +# You can control the visibility of the 'strong passwords' checkbox here. +# Possible values are: +# - true to show or +# - false to hide (default) +# the checkbox. This checkbox allows the user to choose to disable +# password-strength-checks. By default the box is **hidden**, so +# that you have to pick a password that satisfies the checks. +allowWeakPasswords: true +# You can control the initial state for the 'strong passwords' checkbox here. +# Possible values are: +# - true to uncheck or +# - false to check (default) +# the checkbox by default. Since the box is labeled to enforce strong +# passwords, in order to **allow** weak ones by default, the box needs +# to be unchecked. +allowWeakPasswordsDefault: false + + +# User settings +# +# The user can enter a username, but there are some other +# hidden settings for the user which are configurable in Calamares. +# +# Key *user* has the following sub-keys: +# +# - *shell* Shell to be used for the regular user of the target system. +# There are three possible kinds of settings: +# - unset (i.e. commented out, the default), act as if set to /bin/bash +# - empty (explicit), don't pass shell information to useradd at all +# and rely on a correct configuration file in /etc/default/useradd +# - set, non-empty, use that path as shell. No validation is done +# that the shell actually exists or is executable. +# - *forbidden_names* Login names that may not be used. This list always +# contains "root" and "nobody", but may be extended to list other special +# names for a given distro (eg. "video", or "mysql" might not be a valid +# end-user login name). +user: + shell: /run/current-system/sw/bin/bash + forbidden_names: [ root ] + + +# Hostname settings +# +# The user can enter a hostname; this is configured into the system +# in some way. There are settings for how a hostname is guessed (as +# a default / suggestion) and where (or how) the hostname is set in +# the target system. +# +# Key *hostname* has the following sub-keys: +# +# - *location* How the hostname is set in the target system: +# - *None*, to not set the hostname at all +# - *EtcFile*, to write to `/etc/hostname` directly +# - *Etc*, identical to above +# - *Hostnamed*, to use systemd hostnamed(1) over DBus +# - *Transient*, to remove `/etc/hostname` from the target +# The default is *EtcFile*. Setting this to *None* or *Transient* will +# hide the hostname field. +# - *writeHostsFile* Should /etc/hosts be written with a hostname for +# this machine (also adds localhost and some ipv6 standard entries). +# Defaults to *true*. +# - *template* Is a simple template for making a suggestion for the +# hostname, based on user data. The default is "${first}-${product}". +# This is used only if the hostname field is shown. KMacroExpander is +# used; write `${key}` where `key` is one of the following: +# - *first* User's first name (whatever is first in the User Name field, +# which is first-in-order but not necessarily a "first name" as in +# "given name" or "name by which you call someone"; beware of western bias) +# - *name* All the text in the User Name field. +# - *login* The login name (which may be suggested based on User Name) +# - *product* The hardware product, based on DMI data +# - *product2* The product as described by Qt +# - *cpu* CPU name +# - *host* Current hostname (which may be a transient hostname) +# Literal text in the template is preserved. Calamares tries to map +# `${key}` values to something that will fit in a hostname, but does not +# apply the same to literal text in the template. Do not use invalid +# characters in the literal text, or no suggeston will be done. +# - *forbidden_names* lists hostnames that may not be used. This list +# always contains "localhost", but may list others that are unsuitable +# or broken in special ways. +hostname: + location: None + writeHostsFile: false + forbidden_names: [ localhost ] + +presets: + fullName: + # value: "OEM User" + editable: true + loginName: + # value: "oem" + editable: true diff --git a/packages/calamares-extensions/config/modules/welcome.conf b/packages/calamares-extensions/config/modules/welcome.conf new file mode 100644 index 0000000..ca5bd4d --- /dev/null +++ b/packages/calamares-extensions/config/modules/welcome.conf @@ -0,0 +1,133 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# Configuration for the welcome module. The welcome page +# displays some information from the branding file. +# Which parts it displays can be configured through +# the show* variables. +# +# In addition to displaying the welcome page, this module +# can check requirements for installation. +--- +# Display settings for various buttons on the welcome page. +# The URLs themselves come from `branding.desc`. Each button +# is show if the corresponding *show* setting +# here is "true". If the setting is "false", the button is hidden. +# Empty or not-set is interpreted as "false". +# +# TODO:3.3 Remove the URL fallback here; URLs only in `branding.desc` +# +# The setting can also be a full URL which will then be used +# instead of the one from the branding file. +showSupportUrl: true +showKnownIssuesUrl: true +showReleaseNotesUrl: true +# TODO:3.3 Move to branding, keep only a bool here +# showDonateUrl: https://kde.org/community/donations/ + +# Requirements checking. These are general, generic, things +# that are checked. They may not match with the actual requirements +# imposed by other modules in the system. +requirements: + # Amount of available disk, in GiB. Floating-point is allowed here. + # Note that this does not account for *usable* disk, so it is possible + # to satisfy this requirement, yet have no space to install to. + requiredStorage: 10 + + # Amount of available RAM, in GiB. Floating-point is allowed here. + requiredRam: 1.0 + + # To check for internet connectivity, Calamares does a HTTP GET + # on this URL; on success (e.g. HTTP code 200) internet is OK. + # Use a privacy-respecting URL here, preferably in your distro's domain. + # + # The URL is only used if "internet" is in the *check* list below. + internetCheckUrl: [ https://geoip.kde.org/v1/calamares, https://cache.nixos.org/ ] + # + # This may be a single URL, or a list or URLs, in which case the + # URLs will be checked one-by-one; if any of them returns data, + # internet is assumed to be OK. This can be used to check via + # a number of places, where some domains may be down or blocked. + # + # To use a list of URLs, just use YAML list syntax (e.g. + # + # internetCheckUrl: + # - http://www.kde.org + # - http://www.freebsd.org + # + # or short-form + # + # internetCheckUrl: [ http://www.kde.org, http://www.freebsd.org ] + + # List conditions to check. Each listed condition will be + # probed in some way, and yields true or false according to + # the host system satisfying the condition. + # + # This sample file lists all the conditions that are known. + # + # Note that the last three checks are for testing-purposes only, + # and shouldn't be used in production (they are only available + # when building Calamares in development mode). There are five + # special checks: + # - *false* is a check that is always false (unsatisfied) + # - *true* is a check that is always true (satisfied) + # - *slow-false* takes 3 seconds, and then is false; use this one to + # show off the waiting-spinner before the first results come in + # - *slow-true* takes 3 seconds, and then is true + # - *snark* is a check that is only satisfied once it has been checked + # at least three times ("what I tell you three times is true"). + # Keep in mind that "true" and "false" are YAML keywords for + # boolean values, so should be quoted. + check: + - storage + - ram + - power + - internet + - screen + # List conditions that **must** be satisfied (from the list + # of conditions, above) for installation to proceed. + # If any of these conditions are not met, the user cannot + # continue past the welcome page. + required: + - storage + - ram + - internet + +# GeoIP checking +# +# This can be used to pre-select a language based on the country +# the user is currently in. It *assumes* that there's internet +# connectivity, though. Configuration is like in the locale module, +# but remember to use a URL that returns full data **and** to +# use a selector that will pick the country, not the timezone. +# +# To disable GeoIP checking, either comment-out the entire geoip section, +# or set the *style* key to an unsupported format (e.g. `none`). +# Also, note the analogous feature in `src/modules/locale/locale.conf`, +# which is where you will find complete documentation. +# +# For testing, the *style* may be set to `fixed`, any URL that +# returns data (e.g. `http://example.com`) and then *selector* +# sets the data that is actually returned (e.g. "DE" to simulate +# the machine being in Germany). +# +# NOTE: the *selector* must pick the country code from the GeoIP +# data. Timezone, city, or other data will not be recognized. +# +# geoip: +# style: "none" +# url: "https://geoip.kde.org/v1/ubiquity" # extended XML format +# selector: "CountryCode" # blank uses default, which is wrong + +# User interface +# +# The "select language" icon is an international standard, but it +# might not theme very well with your desktop environment. +# Fill in an icon name (following FreeDesktop standards) to +# use that named icon instead of the usual one. +# +# Leave blank or unset to use the international standard. +# +# Known icons in this space are "set-language" and "config-language". +# +# languageIcon: set-language diff --git a/packages/calamares-extensions/config/settings.conf b/packages/calamares-extensions/config/settings.conf new file mode 100644 index 0000000..8fd11dc --- /dev/null +++ b/packages/calamares-extensions/config/settings.conf @@ -0,0 +1,211 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +# +# 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, /run/current-system/sw/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 `.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: packagechooserq + 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 + - packagechooserq@unfree + - partition + - summary +- exec: + - partition + - mount + - desk_os + - 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: desk_os + +# 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 diff --git a/packages/calamares-extensions/default.nix b/packages/calamares-extensions/default.nix new file mode 100644 index 0000000..1242846 --- /dev/null +++ b/packages/calamares-extensions/default.nix @@ -0,0 +1,17 @@ +{ stdenv }: + +stdenv.mkDerivation { + pname = "calamares-extensions-desk-os"; + version = "0.0.1"; + + src = ./.; + + 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 + ''; +} diff --git a/packages/calamares-extensions/modules/desk_os/main.py b/packages/calamares-extensions/modules/desk_os/main.py new file mode 100644 index 0000000..786a52c --- /dev/null +++ b/packages/calamares-extensions/modules/desk_os/main.py @@ -0,0 +1,682 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# SPDX-FileCopyrightText: 2022 Victor Fuentes +# SPDX-FileCopyrightText: 2019 Adriaan de Groot +# SPDX-License-Identifier: GPL-3.0-or-later +# +# Calamares is Free Software: see the License-Identifier above. +# + +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; + +""" + +cfgplasma5 = """ # Enable the X11 windowing system. + services.xserver.enable = true; + + # Enable the KDE Plasma Desktop Environment. + services.displayManager.sddm.enable = true; + services.xserver.desktopManager.plasma5.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. + hardware.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.xserver.displayManager.autoLogin.enable = true; + services.xserver.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. It‘s 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? + +} +""" + + +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) + + # 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 + + # Setup encrypted swap devices. nixos-generate-config doesn't seem to notice them. + for part in gs.value("partitions"): + if part["claimed"] == 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"] == 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") == "plasma5": + cfg += cfgplasma5 + 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("packagechooser_unfree") is not None: + if gs.value("packagechooser_unfree") == "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") == "plasma5": + catenate(variables, "pkgs", "\n kate\n # thunderbird\n ") + elif 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 not pattern in cfg: + libcalamares.utils.warning( + "Variable '{key}' is not used.".format(key=key)) + + # Check that all patterns exist + variable_pattern = re.compile("@@\w+@@") + for match in variable_pattern.finditer(cfg): + variable_name = cfg[match.start()+2:match.end()-2] + if not variable_name 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 != 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("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 {{}}; 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( + "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) + + # Install customizations + try: + output = "" + proc = subprocess.Popen(["pkexec", "nixos-install", "--no-root-passwd", "--root", root_mount_point], 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 diff --git a/packages/calamares-extensions/modules/desk_os/module.desc b/packages/calamares-extensions/modules/desk_os/module.desc new file mode 100644 index 0000000..aaba550 --- /dev/null +++ b/packages/calamares-extensions/modules/desk_os/module.desc @@ -0,0 +1,7 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +--- +type: "job" +name: "desk_os" +interface: "python" +script: "main.py"