diff --git a/LICENSE b/LICENSE deleted file mode 100644 index f288702..0000000 --- a/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - 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/LICENSE b/LICENSE new file mode 120000 index 0000000..9193119 --- /dev/null +++ b/LICENSE @@ -0,0 +1 @@ +LICENSE-GPL-3.0-or-later \ No newline at end of file diff --git a/LICENSE-GPL-3.0-or-later b/LICENSE-GPL-3.0-or-later new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/LICENSE-GPL-3.0-or-later @@ -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/_sources/generated.json b/_sources/generated.json index 9f19bbd..4d61696 100644 --- a/_sources/generated.json +++ b/_sources/generated.json @@ -22,7 +22,7 @@ }, "TrackersListCollection": { "cargoLocks": null, - "date": "2025-11-11", + "date": "2025-11-07", "extract": null, "name": "TrackersListCollection", "passthru": null, @@ -34,14 +34,14 @@ "name": null, "owner": "XIU2", "repo": "TrackersListCollection", - "rev": "732ee83a7f9fc03a527e2b3e6dbb05e94335a3de", - "sha256": "sha256-jijgOp6SLzoIB3Vt94brwF316HwqYU8JppwTpXF+Y+A=", + "rev": "8a2547cee4f92f12ec58923ce4ec065b73357f2b", + "sha256": "sha256-Y9o86dtvuu4ELF816ln4+jLXduUvBVhTJQcb5mB9ij8=", "sparseCheckout": [ "all.txt" ], "type": "github" }, - "version": "732ee83a7f9fc03a527e2b3e6dbb05e94335a3de" + "version": "8a2547cee4f92f12ec58923ce4ec065b73357f2b" }, "cliphist": { "cargoLocks": null, @@ -166,9 +166,29 @@ }, "version": "v3.10.0" }, + "spotifyd": { + "cargoLocks": null, + "date": "2025-09-04", + "extract": null, + "name": "spotifyd", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "rev": "f1acee9c6160db92dcd4214e96654cbbaed0e38a", + "sha256": "sha256-dcc+sklPJvV34U1A/eTD1kfIey4o5/kPq4yd72ey7LE=", + "sparseCheckout": [], + "type": "git", + "url": "https://github.com/ulic-youthlic/spotifyd.git" + }, + "version": "f1acee9c6160db92dcd4214e96654cbbaed0e38a" + }, "spotx": { "cargoLocks": null, - "date": "2025-11-07", + "date": "2025-10-22", "extract": null, "name": "spotx", "passthru": null, @@ -180,12 +200,12 @@ "name": null, "owner": "SpotX-Official", "repo": "SpotX-Bash", - "rev": "a2bd8479a2a80a068e749530aa5a78b2918358b8", - "sha256": "sha256-pQgXi6AU0OlJgOe3GB+m1fivchzbfTp6UWF54hx+QNU=", + "rev": "de9c99a1f2c74ee722b3216ca28c8f7f76ac206d", + "sha256": "sha256-p93UHSAZGskvt26vtDipXFBN/Biola1gK1QHS6EsYAE=", "sparseCheckout": [], "type": "github" }, - "version": "a2bd8479a2a80a068e749530aa5a78b2918358b8" + "version": "de9c99a1f2c74ee722b3216ca28c8f7f76ac206d" }, "tree-sitter-idris": { "cargoLocks": null, @@ -275,4 +295,4 @@ }, "version": "184f55dbc5320c34a56d02353410ad35a0f3e090" } -} +} \ No newline at end of file diff --git a/_sources/generated.nix b/_sources/generated.nix index fc916a1..d8de612 100644 --- a/_sources/generated.nix +++ b/_sources/generated.nix @@ -15,18 +15,18 @@ }; TrackersListCollection = { pname = "TrackersListCollection"; - version = "732ee83a7f9fc03a527e2b3e6dbb05e94335a3de"; + version = "8a2547cee4f92f12ec58923ce4ec065b73357f2b"; src = fetchFromGitHub { owner = "XIU2"; repo = "TrackersListCollection"; - rev = "732ee83a7f9fc03a527e2b3e6dbb05e94335a3de"; + rev = "8a2547cee4f92f12ec58923ce4ec065b73357f2b"; fetchSubmodules = false; deepClone = false; leaveDotGit = false; sparseCheckout = [ "all.txt" ]; - sha256 = "sha256-jijgOp6SLzoIB3Vt94brwF316HwqYU8JppwTpXF+Y+A="; + sha256 = "sha256-Y9o86dtvuu4ELF816ln4+jLXduUvBVhTJQcb5mB9ij8="; }; - date = "2025-11-11"; + date = "2025-11-07"; }; cliphist = { pname = "cliphist"; @@ -119,15 +119,15 @@ }; spotx = { pname = "spotx"; - version = "a2bd8479a2a80a068e749530aa5a78b2918358b8"; + version = "de9c99a1f2c74ee722b3216ca28c8f7f76ac206d"; src = fetchFromGitHub { owner = "SpotX-Official"; repo = "SpotX-Bash"; - rev = "a2bd8479a2a80a068e749530aa5a78b2918358b8"; + rev = "de9c99a1f2c74ee722b3216ca28c8f7f76ac206d"; fetchSubmodules = false; - sha256 = "sha256-pQgXi6AU0OlJgOe3GB+m1fivchzbfTp6UWF54hx+QNU="; + sha256 = "sha256-p93UHSAZGskvt26vtDipXFBN/Biola1gK1QHS6EsYAE="; }; - date = "2025-11-07"; + date = "2025-10-22"; }; tree-sitter-idris = { pname = "tree-sitter-idris"; diff --git a/flake.lock b/flake.lock index dab0030..d80729b 100644 --- a/flake.lock +++ b/flake.lock @@ -78,11 +78,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1762735459, - "narHash": "sha256-VZRCyMRSLFORBzH+pYzDSx/ooIBD5Ohrv28sWktSiqk=", + "lastModified": 1762174035, + "narHash": "sha256-I5AEdZ17rUUvOK9KDD7KgcPhiYvsZwt5UYcx4ZU/lhg=", "owner": "HeitorAugustoLN", "repo": "betterfox-nix", - "rev": "37ac3490a7e2825985ce5c0004489b2264ea1cd0", + "rev": "9505c7f12d01462782eeb46686677f11a4b998e5", "type": "github" }, "original": { @@ -100,11 +100,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1763246168, - "narHash": "sha256-gUDJZGSOg5syHtQvLImOKL6Eaw4e1ybz4o5pid66kQg=", + "lastModified": 1762233483, + "narHash": "sha256-7xrOMk264pHNe1EC55k+Q4KX+pebIepNIPAsqXCgnGk=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "6476fbdd52621b4a532309d982d468dc08204151", + "rev": "035a14f12abe016db315413480fb913196c4ed14", "type": "github" }, "original": { @@ -194,11 +194,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1763310170, - "narHash": "sha256-XFB1UvfWL9JgJqBKicGe2f8+cW7zh1yMcgKof8dGlvw=", + "lastModified": 1762359868, + "narHash": "sha256-FKn8KF2UNbxZIQJ09VitZ/16E8toZN4gM+qqljVf45E=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "d33a3fae28a7f2c8ab0b6bdfd929eb73692ce06a", + "rev": "e828183cf33679f67da737218bb7a3b5ab89a5dd", "type": "github" }, "original": { @@ -217,11 +217,11 @@ ] }, "locked": { - "lastModified": 1763281507, - "narHash": "sha256-cSwgQxlLUTkw2Sdtgh/extCGIAELJCZN+Vb+9G02MIM=", + "lastModified": 1762359868, + "narHash": "sha256-FKn8KF2UNbxZIQJ09VitZ/16E8toZN4gM+qqljVf45E=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "70fa92384ef398a4b4b5002c6caac08b1e01dd87", + "rev": "e828183cf33679f67da737218bb7a3b5ab89a5dd", "type": "github" }, "original": { @@ -286,11 +286,11 @@ ] }, "locked": { - "lastModified": 1762440070, - "narHash": "sha256-xxdepIcb39UJ94+YydGP221rjnpkDZUlykKuF54PsqI=", + "lastModified": 1762040540, + "narHash": "sha256-z5PlZ47j50VNF3R+IMS9LmzI5fYRGY/Z5O5tol1c9I4=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "26d05891e14c88eb4a5d5bee659c0db5afb609d8", + "rev": "0010412d62a25d959151790968765a70c436598b", "type": "github" }, "original": { @@ -304,11 +304,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1762980239, - "narHash": "sha256-8oNVE8TrD19ulHinjaqONf9QWCKK+w4url56cdStMpM=", + "lastModified": 1762440070, + "narHash": "sha256-xxdepIcb39UJ94+YydGP221rjnpkDZUlykKuF54PsqI=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "52a2caecc898d0b46b2b905f058ccc5081f842da", + "rev": "26d05891e14c88eb4a5d5bee659c0db5afb609d8", "type": "github" }, "original": { @@ -346,11 +346,11 @@ ] }, "locked": { - "lastModified": 1762980239, - "narHash": "sha256-8oNVE8TrD19ulHinjaqONf9QWCKK+w4url56cdStMpM=", + "lastModified": 1762440070, + "narHash": "sha256-xxdepIcb39UJ94+YydGP221rjnpkDZUlykKuF54PsqI=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "52a2caecc898d0b46b2b905f058ccc5081f842da", + "rev": "26d05891e14c88eb4a5d5bee659c0db5afb609d8", "type": "github" }, "original": { @@ -364,11 +364,11 @@ "nixpkgs-lib": "nixpkgs-lib_2" }, "locked": { - "lastModified": 1762980239, - "narHash": "sha256-8oNVE8TrD19ulHinjaqONf9QWCKK+w4url56cdStMpM=", + "lastModified": 1762040540, + "narHash": "sha256-z5PlZ47j50VNF3R+IMS9LmzI5fYRGY/Z5O5tol1c9I4=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "52a2caecc898d0b46b2b905f058ccc5081f842da", + "rev": "0010412d62a25d959151790968765a70c436598b", "type": "github" }, "original": { @@ -385,11 +385,11 @@ ] }, "locked": { - "lastModified": 1762980239, - "narHash": "sha256-8oNVE8TrD19ulHinjaqONf9QWCKK+w4url56cdStMpM=", + "lastModified": 1762040540, + "narHash": "sha256-z5PlZ47j50VNF3R+IMS9LmzI5fYRGY/Z5O5tol1c9I4=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "52a2caecc898d0b46b2b905f058ccc5081f842da", + "rev": "0010412d62a25d959151790968765a70c436598b", "type": "github" }, "original": { @@ -543,33 +543,33 @@ "gnome-shell": { "flake": false, "locked": { - "host": "gitlab.gnome.org", - "lastModified": 1762869044, - "narHash": "sha256-nwm/GJ2Syigf7VccLAZ66mFC8mZJFqpJmIxSGKl7+Ds=", + "lastModified": 1748186689, + "narHash": "sha256-UaD7Y9f8iuLBMGHXeJlRu6U1Ggw5B9JnkFs3enZlap0=", "owner": "GNOME", "repo": "gnome-shell", - "rev": "680e3d195a92203f28d4bf8c6e8bb537cc3ed4ad", - "type": "gitlab" + "rev": "8c88f917db0f1f0d80fa55206c863d3746fa18d0", + "type": "github" }, "original": { - "host": "gitlab.gnome.org", "owner": "GNOME", - "ref": "gnome-49", + "ref": "48.2", "repo": "gnome-shell", - "type": "gitlab" + "type": "github" } }, "helix": { "inputs": { - "nixpkgs": "nixpkgs_3", + "nixpkgs": [ + "nixpkgs" + ], "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1763309322, - "narHash": "sha256-2M6D/i0Poh529SovRSsM+m9sYqfl9GNMmDW4efKvh/4=", + "lastModified": 1762352939, + "narHash": "sha256-yYFrlLL3UCyWfZOMnoAtUzS3BB8gk2KpEnl0vHQvkfM=", "owner": "helix-editor", "repo": "helix", - "rev": "d966e12930d4ea0093708457bde0951aa77660ec", + "rev": "3f4a286c8dc586d3261bfba3cb2ec3fad5c36efe", "type": "github" }, "original": { @@ -587,11 +587,11 @@ ] }, "locked": { - "lastModified": 1762964643, - "narHash": "sha256-RYHN8O/Aja59XDji6WSJZPkJpYVUfpSkyH+PEupBJqM=", + "lastModified": 1762146130, + "narHash": "sha256-/XOEA0a61fZ45i/BpaSsyLNNbw/yKwjMbkB/IWSGLzU=", "owner": "nix-community", "repo": "home-manager", - "rev": "827f2a23373a774a8805f84ca5344654c31f354b", + "rev": "b5ed4afc2277339bdf0e9edf59befff7350cf075", "type": "github" }, "original": { @@ -607,11 +607,11 @@ ] }, "locked": { - "lastModified": 1763313531, - "narHash": "sha256-yvdCYUL85zEDp2NzPUBmaNBXP6KnWEOhAk3j7PTfsKw=", + "lastModified": 1762463325, + "narHash": "sha256-33YUsWpPyeBZEWrKQ2a1gkRZ7i0XCC/2MYpU6BVeQSU=", "owner": "nix-community", "repo": "home-manager", - "rev": "3670a78eee49deebe4825fc8ecc46b172d1a8391", + "rev": "0562fef070a1027325dd4ea10813d64d2c967b39", "type": "github" }, "original": { @@ -622,11 +622,11 @@ }, "import-tree": { "locked": { - "lastModified": 1762327901, - "narHash": "sha256-AJ96FNj50DU0bTyIzAPkPOjCZTHqjURVjok8qoXvmqM=", + "lastModified": 1761120675, + "narHash": "sha256-TEbh9zISiQcU82VwVoEbmXHnSGlUxTwvjJA9g9ErSDA=", "owner": "vic", "repo": "import-tree", - "rev": "90fa129798be99cde036b78658e89475710966a1", + "rev": "a037ed2a58fc0ebed9e93b9ef79b0646e648f719", "type": "github" }, "original": { @@ -672,11 +672,11 @@ ] }, "locked": { - "lastModified": 1762951919, - "narHash": "sha256-ma/xMEGf4J6n/RdZFdxXBJUQhP53HVEPQOC6Dp2TrkQ=", + "lastModified": 1761748321, + "narHash": "sha256-hD5mVzmUeyVppjArdy2uVdQe/CQUR9i3WgZB05onE7A=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "3d248f6e8f877218dd2573fef8925ac997889922", + "rev": "533db5857c9e00ca352558a928417116ee08a824", "type": "github" }, "original": { @@ -690,7 +690,7 @@ "crane": "crane", "flake-compat": "flake-compat_2", "flake-parts": "flake-parts_3", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_3", "pre-commit-hooks-nix": "pre-commit-hooks-nix", "rust-overlay": "rust-overlay_3" }, @@ -712,15 +712,15 @@ "lix": { "flake": false, "locked": { - "lastModified": 1759940703, - "narHash": "sha256-/dXDCzYnQbkqCsvUDIxgIH4BS/fyxIu73m2v4ftJLXQ=", - "rev": "75c03142049242a5687309e59e4f356fbc92789a", + "lastModified": 1761937274, + "narHash": "sha256-KlELhsSq3XbemrGyQhmGurFu7m8wOEBw+8M04L7hn7A=", + "rev": "91867941fa73afea7869b7c71ede82e5ef8927da", "type": "tarball", - "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/75c03142049242a5687309e59e4f356fbc92789a.tar.gz?rev=75c03142049242a5687309e59e4f356fbc92789a" + "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/91867941fa73afea7869b7c71ede82e5ef8927da.tar.gz?rev=91867941fa73afea7869b7c71ede82e5ef8927da" }, "original": { "type": "tarball", - "url": "https://git.lix.systems/lix-project/lix/archive/release-2.93.tar.gz" + "url": "https://git.lix.systems/lix-project/lix/archive/main.tar.gz" } }, "lix-module": { @@ -735,16 +735,15 @@ ] }, "locked": { - "lastModified": 1756125859, - "narHash": "sha256-6a+PWILmqHCs9B5eIBLg6HSZ8jYweZpgOWO8FlyVwYI=", - "ref": "release-2.93", - "rev": "d3292125035b04df00d01549a26e948631fabe1e", - "revCount": 156, + "lastModified": 1761960361, + "narHash": "sha256-FvuAw56NIVJpS3Kr8Wv9PpU4eehZMcdIVkxjStuYmqc=", + "ref": "refs/heads/main", + "rev": "c47f62187601ea2991b79a9bacdbfdf76cd29fbe", + "revCount": 167, "type": "git", "url": "https://git.lix.systems/lix-project/nixos-module" }, "original": { - "ref": "release-2.93", "type": "git", "url": "https://git.lix.systems/lix-project/nixos-module" } @@ -753,14 +752,14 @@ "inputs": { "flake-parts": "flake-parts_4", "neovim-src": "neovim-src", - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1763337828, - "narHash": "sha256-gBf/sNC/u0EztJybm7yP0OfbEKyN3WVi7J7FLbpswX0=", + "lastModified": 1762473887, + "narHash": "sha256-4VHnHYQGQ8K+i5slfTwnpyP12hi7mq0V4Wra6EB3k5A=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "227971b938a6d83e3b839e5f11991511374020b7", + "rev": "52fab1d59b4bc5a4d11a1c7f8cdfb47412ff8572", "type": "github" }, "original": { @@ -772,11 +771,11 @@ "neovim-src": { "flake": false, "locked": { - "lastModified": 1763328107, - "narHash": "sha256-N+Al++BfSq1/JZE3LY1DrefnO+kXm3y1OcqOnKrBGJQ=", + "lastModified": 1762421241, + "narHash": "sha256-sRgrLaZ1XOAxAKq0iENJVmVj/X7jhAd99x25+OKbxLc=", "owner": "neovim", "repo": "neovim", - "rev": "f0294418d65d005d885eabf80eecc7255358b95e", + "rev": "f2bfde9140ca646db3e2b67b97b1e54b70408703", "type": "github" }, "original": { @@ -797,11 +796,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1763325933, - "narHash": "sha256-9liktF34Fu8wT3V5wG736RuaAT6+W8jYkf32kbNSm8s=", + "lastModified": 1762492910, + "narHash": "sha256-XFsC9zakODOSU15VUvz61SI7EBR0WkMQJ+HU8OeVhdI=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "be1983b9b9359241a202eb3ec4f2c966f5bebe5b", + "rev": "ba50ee8656c5808cb945d08a3858cde049fa77f8", "type": "github" }, "original": { @@ -830,11 +829,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1763321761, - "narHash": "sha256-7M81UIShdVH2AtMonx7+Hh8EL5dpP9Pa/0YLZMNrd7A=", + "lastModified": 1762146685, + "narHash": "sha256-anRlNG6t7esBbF1+ALDeathVBSclA0PEL52Vo0WnN5g=", "owner": "YaLTeR", "repo": "niri", - "rev": "aecbd679e39a321495964995fa1e37d84bd91ddf", + "rev": "a2ca2b3c866bc781b12c334a9f949b3db6d7c943", "type": "github" }, "original": { @@ -853,11 +852,11 @@ "systems": "systems_3" }, "locked": { - "lastModified": 1763282415, - "narHash": "sha256-Blb9l3DjFXjhYOqR7RoA/TQUS7BnBN4VufpRvG4XSlo=", + "lastModified": 1762418669, + "narHash": "sha256-y80u5pGLXbhD72il0s/x9IwIzIlCoTyCmBKLROs8Rbw=", "owner": "marienz", "repo": "nix-doom-emacs-unstraightened", - "rev": "b04d4b93dc60bc586224b28564b116f0692ce05c", + "rev": "6a76389b304a33d05c28999cadfcb90c944b85c8", "type": "github" }, "original": { @@ -869,14 +868,14 @@ "nix-gaming": { "inputs": { "flake-parts": "flake-parts_5", - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1763313066, - "narHash": "sha256-i2s3jPiMRPLd1mcL0oNMSbrbmq9ba/Qo4YPVPehPmEs=", + "lastModified": 1762480511, + "narHash": "sha256-NIFQhQG7quJiysxPNP7k/3rRMaRKSL2x8qR8jjvk6yk=", "owner": "fufexan", "repo": "nix-gaming", - "rev": "dfa5f946fe41f085e34159a818790f69a19a0022", + "rev": "cf716e9b2f0fda1b1809156121037f646815eb26", "type": "github" }, "original": { @@ -919,11 +918,11 @@ ] }, "locked": { - "lastModified": 1763090138, - "narHash": "sha256-7h9pE4Sm/gk3KSa0N/kTSm3Jr3VSriKhCzWe94r9nRE=", + "lastModified": 1759653262, + "narHash": "sha256-uTiQXY/ZlplEq1j2jH0k6oDzldid0xHgnLsLQyRRbvk=", "owner": "nix-community", "repo": "nix4nvchad", - "rev": "856b909046ad6f07e8337736ecf3702460be2b0f", + "rev": "9d91858966b5d4e87ee52e16993988dfea9b0f94", "type": "github" }, "original": { @@ -934,11 +933,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1762847253, - "narHash": "sha256-BWWnUUT01lPwCWUvS0p6Px5UOBFeXJ8jR+ZdLX8IbrU=", + "lastModified": 1762463231, + "narHash": "sha256-hv1mG5j5PTbnWbtHHomzTus77pIxsc4x8VrMjc7+/YE=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "899dc449bc6428b9ee6b3b8f771ca2b0ef945ab9", + "rev": "52113c4f5cfd1e823001310e56d9c8d0699a6226", "type": "github" }, "original": { @@ -950,11 +949,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1762977756, - "narHash": "sha256-4PqRErxfe+2toFJFgcRKZ0UI9NSIOJa+7RXVtBhy4KE=", + "lastModified": 1762111121, + "narHash": "sha256-4vhDuZ7OZaZmKKrnDpxLZZpGIJvAeMtK6FKLJYUtAdw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c5ae371f1a6a7fd27823bc500d9390b38c05fa55", + "rev": "b3d51a0365f6695e7dd5cdf3e180604530ed33b4", "type": "github" }, "original": { @@ -964,6 +963,22 @@ "type": "github" } }, + "nixpkgs-455083": { + "locked": { + "lastModified": 1761759229, + "narHash": "sha256-8P72kOULqB36MKrNl5HToySTA6HbYnldR3CQohJxpxc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9b6d78b4d933aed3785362dccc0bb3440b779d00", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "pull/455083/head", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-lib": { "locked": { "lastModified": 1761765539, @@ -996,11 +1011,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1763049705, - "narHash": "sha256-A5LS0AJZ1yDPTa2fHxufZN++n8MCmtgrJDtxFxrH4S8=", + "lastModified": 1762233356, + "narHash": "sha256-cGS3lLTYusbEP/IJIWGgnkzIl+FA5xDvtiHyjalGr4k=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3acb677ea67d4c6218f33de0db0955f116b7588c", + "rev": "ca534a76c4afb2bdc07b681dbc11b453bab21af8", "type": "github" }, "original": { @@ -1012,11 +1027,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1763049705, - "narHash": "sha256-A5LS0AJZ1yDPTa2fHxufZN++n8MCmtgrJDtxFxrH4S8=", + "lastModified": 1762233356, + "narHash": "sha256-cGS3lLTYusbEP/IJIWGgnkzIl+FA5xDvtiHyjalGr4k=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3acb677ea67d4c6218f33de0db0955f116b7588c", + "rev": "ca534a76c4afb2bdc07b681dbc11b453bab21af8", "type": "github" }, "original": { @@ -1026,29 +1041,13 @@ "type": "github" } }, - "nixpkgs_10": { - "locked": { - "lastModified": 1761236834, - "narHash": "sha256-+pthv6hrL5VLW2UqPdISGuLiUZ6SnAXdd2DdUE+fV2Q=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "d5faa84122bc0a1fd5d378492efce4e289f8eac1", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_2": { "locked": { - "lastModified": 1762977756, - "narHash": "sha256-4PqRErxfe+2toFJFgcRKZ0UI9NSIOJa+7RXVtBhy4KE=", + "lastModified": 1762111121, + "narHash": "sha256-4vhDuZ7OZaZmKKrnDpxLZZpGIJvAeMtK6FKLJYUtAdw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c5ae371f1a6a7fd27823bc500d9390b38c05fa55", + "rev": "b3d51a0365f6695e7dd5cdf3e180604530ed33b4", "type": "github" }, "original": { @@ -1059,22 +1058,6 @@ } }, "nixpkgs_3": { - "locked": { - "lastModified": 1759381078, - "narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { "locked": { "lastModified": 1754243818, "narHash": "sha256-sEPw2W01UPf0xNGnMGNZIaE1XHkk7O+lLLetYEXVZHk=", @@ -1090,13 +1073,29 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_4": { "locked": { - "lastModified": 1763191728, - "narHash": "sha256-esRhOS0APE6k40Hs/jjReXg+rx+J5LkWw7cuWFKlwYA=", + "lastModified": 1762361079, + "narHash": "sha256-lz718rr1BDpZBYk7+G8cE6wee3PiBUpn8aomG/vLLiY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1d4c88323ac36805d09657d13a5273aea1b34f0c", + "rev": "ffcdcf99d65c61956d882df249a9be53e5902ea5", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1761880412, + "narHash": "sha256-QoJjGd4NstnyOG4mm4KXF+weBzA2AH/7gn1Pmpfcb0A=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a7fc11be66bdfb5cdde611ee5ce381c183da8386", "type": "github" }, "original": { @@ -1108,43 +1107,27 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1763191728, - "narHash": "sha256-esRhOS0APE6k40Hs/jjReXg+rx+J5LkWw7cuWFKlwYA=", + "lastModified": 1762363567, + "narHash": "sha256-YRqMDEtSMbitIMj+JLpheSz0pwEr0Rmy5mC7myl17xs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1d4c88323ac36805d09657d13a5273aea1b34f0c", + "rev": "ae814fd3904b621d8ab97418f1d0f2eb0d3716f4", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-unstable", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_7": { "locked": { - "lastModified": 1762977756, - "narHash": "sha256-4PqRErxfe+2toFJFgcRKZ0UI9NSIOJa+7RXVtBhy4KE=", + "lastModified": 1762156382, + "narHash": "sha256-Yg7Ag7ov5+36jEFC1DaZh/12SEXo6OO3/8rqADRxiqs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c5ae371f1a6a7fd27823bc500d9390b38c05fa55", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_8": { - "locked": { - "lastModified": 1763191728, - "narHash": "sha256-esRhOS0APE6k40Hs/jjReXg+rx+J5LkWw7cuWFKlwYA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1d4c88323ac36805d09657d13a5273aea1b34f0c", + "rev": "7241bcbb4f099a66aafca120d37c65e8dda32717", "type": "github" }, "original": { @@ -1154,13 +1137,13 @@ "type": "github" } }, - "nixpkgs_9": { + "nixpkgs_8": { "locked": { - "lastModified": 1762977756, - "narHash": "sha256-4PqRErxfe+2toFJFgcRKZ0UI9NSIOJa+7RXVtBhy4KE=", + "lastModified": 1762363567, + "narHash": "sha256-YRqMDEtSMbitIMj+JLpheSz0pwEr0Rmy5mC7myl17xs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c5ae371f1a6a7fd27823bc500d9390b38c05fa55", + "rev": "ae814fd3904b621d8ab97418f1d0f2eb0d3716f4", "type": "github" }, "original": { @@ -1170,19 +1153,35 @@ "type": "github" } }, + "nixpkgs_9": { + "locked": { + "lastModified": 1761236834, + "narHash": "sha256-+pthv6hrL5VLW2UqPdISGuLiUZ6SnAXdd2DdUE+fV2Q=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "d5faa84122bc0a1fd5d378492efce4e289f8eac1", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixvim": { "inputs": { "flake-parts": "flake-parts_6", - "nixpkgs": "nixpkgs_8", + "nixpkgs": "nixpkgs_7", "nuschtosSearch": "nuschtosSearch", "systems": "systems_6" }, "locked": { - "lastModified": 1763334942, - "narHash": "sha256-ORaewCyY3Fff+XaGrRjWi0XYzC22YTr/H3oL9c9k+9I=", + "lastModified": 1762473729, + "narHash": "sha256-0mKCvL4MUuraS3dVFgRETOM96t0n68J851gZ0HK8U1k=", "owner": "nix-community", "repo": "nixvim", - "rev": "59af09b1814538b826f30eac8024d126d8c36efc", + "rev": "f0dceb449af35c83a0e2bf23c71f50fc61aff42f", "type": "github" }, "original": { @@ -1191,41 +1190,17 @@ "type": "github" } }, - "noctalia": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ], - "quickshell": [ - "quickshell" - ], - "systems": "systems_7" - }, - "locked": { - "lastModified": 1763340051, - "narHash": "sha256-S/H0WShZXqxxZw2K6vtylHoxhGIz2+0bOJ6C+05151Q=", - "owner": "noctalia-dev", - "repo": "noctalia-shell", - "rev": "df3751108916054b61c450a46ee3310c4c2908a4", - "type": "github" - }, - "original": { - "owner": "noctalia-dev", - "repo": "noctalia-shell", - "type": "github" - } - }, "nur": { "inputs": { "flake-parts": "flake-parts_7", - "nixpkgs": "nixpkgs_9" + "nixpkgs": "nixpkgs_8" }, "locked": { - "lastModified": 1763342013, - "narHash": "sha256-MJZthRbFMeXMLXLVIekUo17G81G4rwIbsBLRotKaNAc=", + "lastModified": 1762490224, + "narHash": "sha256-2wsVxoPC2T3d7FMd0oPtdoxe5YM+KUdC28AswkwXAaI=", "owner": "nix-community", "repo": "NUR", - "rev": "293f62dfaaf6fc2861e73aafde9fdb7b83e5bd4a", + "rev": "4318ccbc77e8db38d8c81bbbb0215962091a4e0e", "type": "github" }, "original": { @@ -1324,26 +1299,6 @@ "type": "github" } }, - "quickshell": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1763257314, - "narHash": "sha256-R7HJSluErPrCQk+VXNWJrE2Pjq582VRNWDHAk6j6wQI=", - "owner": "outfoxxed", - "repo": "quickshell", - "rev": "fdbb86a06acd6d1af6049a319c87a5c0badc22dc", - "type": "github" - }, - "original": { - "owner": "outfoxxed", - "repo": "quickshell", - "type": "github" - } - }, "root": { "inputs": { "betterfox-nix": "betterfox-nix", @@ -1363,12 +1318,11 @@ "nix-gaming": "nix-gaming", "nix4nvchad": "nix4nvchad", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_7", + "nixpkgs": "nixpkgs_6", + "nixpkgs-455083": "nixpkgs-455083", "nixvim": "nixvim", - "noctalia": "noctalia", "nur": "nur", "nvchad-starter": "nvchad-starter", - "quickshell": "quickshell", "sops-nix": "sops-nix", "spacemacs": "spacemacs", "stylix": "stylix", @@ -1383,11 +1337,11 @@ ] }, "locked": { - "lastModified": 1763087910, - "narHash": "sha256-eB9Z1mWd1U6N61+F8qwDggX0ihM55s4E0CluwNukJRU=", + "lastModified": 1762137611, + "narHash": "sha256-sTqb10FR/YQCuGbw16qxliX0NFlYg6evSEjN8w+9IYE=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "cf4a68749733d45c0420726596367acd708eb2e8", + "rev": "3a0ebe5d2965692f990cb27e62f501ad35e3deeb", "type": "github" }, "original": { @@ -1445,11 +1399,11 @@ ] }, "locked": { - "lastModified": 1763264763, - "narHash": "sha256-N0BEoJIlJ+M6sWZJ8nnfAjGY9VLvM6MXMitRenmhBkY=", + "lastModified": 1760998189, + "narHash": "sha256-ee2e1/AeGL5X8oy/HXsZQvZnae6XfEVdstGopKucYLY=", "owner": "Mic92", "repo": "sops-nix", - "rev": "882e56c8293e44d57d882b800a82f8b2ee7a858f", + "rev": "5a7d18b5c55642df5c432aadb757140edfeb70b3", "type": "github" }, "original": { @@ -1461,11 +1415,11 @@ "spacemacs": { "flake": false, "locked": { - "lastModified": 1763284982, - "narHash": "sha256-VjgvKvCgO3wHutai2q+KUpXMTrGXQI+IPUU4ziMK3IM=", + "lastModified": 1762463183, + "narHash": "sha256-yX7Y447SV3ww5QciuUlaGFZEj5yEhZyOoYFa0rdKw3A=", "owner": "syl20bnr", "repo": "spacemacs", - "rev": "4db5cc732c4da5a65366fc2d585d315363a7a6da", + "rev": "3b82bf591e735d5ad31467fae55eb85585f6aba3", "type": "github" }, "original": { @@ -1489,7 +1443,7 @@ "nixpkgs" ], "nur": "nur_2", - "systems": "systems_8", + "systems": "systems_7", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", @@ -1497,11 +1451,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1763314990, - "narHash": "sha256-gs98KFE3X2HQ64gsIpQNsj1lKFTdkNdX+1KMQTDXEus=", + "lastModified": 1762264356, + "narHash": "sha256-QVfC53Ri+8n3e7Ujx9kq6all3+TLBRRPRnc6No5qY5w=", "owner": "nix-community", "repo": "stylix", - "rev": "b68e8220689a6f0393204b07be1bc14bb973a0ed", + "rev": "647bb8dd96a206a1b79c4fd714affc88b409e10b", "type": "github" }, "original": { @@ -1615,21 +1569,6 @@ "type": "github" } }, - "systems_8": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "tinted-foot": { "flake": false, "locked": { @@ -1713,14 +1652,14 @@ }, "treefmt-nix": { "inputs": { - "nixpkgs": "nixpkgs_10" + "nixpkgs": "nixpkgs_9" }, "locked": { - "lastModified": 1762938485, - "narHash": "sha256-AlEObg0syDl+Spi4LsZIBrjw+snSVU4T8MOeuZJUJjM=", + "lastModified": 1762410071, + "narHash": "sha256-aF5fvoZeoXNPxT0bejFUBXeUjXfHLSL7g+mjR/p5TEg=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "5b4ee75aeefd1e2d5a1cc43cf6ba65eba75e83e4", + "rev": "97a30861b13c3731a84e09405414398fbf3e109f", "type": "github" }, "original": { @@ -1749,11 +1688,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1762747449, - "narHash": "sha256-Z1TKiux8K09a93w4PFDFsj8HFugXNy3iCC3Z8MpR5Rk=", + "lastModified": 1762488100, + "narHash": "sha256-pD8YqwP0/irHWzJtVElnVljR+OaJPAVbJBwqix+uB5A=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "6338574bc5c036487486acde264f38f39ea15fad", + "rev": "3cd3edffe1be197326e9314816b16bb4e3d685b1", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 15fabc8..803014f 100644 --- a/flake.nix +++ b/flake.nix @@ -49,10 +49,11 @@ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small"; # nixpkgs.url = "github:NixOS/nixpkgs/master"; + nixpkgs-455083.url = "github:NixOS/nixpkgs?ref=pull/455083/head"; lix-module = { - url = "git+https://git.lix.systems/lix-project/nixos-module?ref=release-2.93"; - # url = "git+https://git.lix.systems/lix-project/nixos-module"; + # url = "git+https://git.lix.systems/lix-project/nixos-module?ref=release-2.93"; + url = "git+https://git.lix.systems/lix-project/nixos-module"; inputs = { nixpkgs.follows = "nixpkgs"; flake-utils.follows = "flake-utils"; @@ -64,6 +65,9 @@ owner = "helix-editor"; repo = "helix"; ref = "master"; + inputs = { + nixpkgs.follows = "nixpkgs"; + }; }; home-manager = { @@ -224,21 +228,5 @@ owner = "fufexan"; repo = "nix-gaming"; }; - - quickshell = { - type = "github"; - owner = "outfoxxed"; - repo = "quickshell"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - noctalia = { - type = "github"; - owner = "noctalia-dev"; - repo = "noctalia-shell"; - inputs = { - nixpkgs.follows = "nixpkgs"; - quickshell.follows = "quickshell"; - }; - }; }; } diff --git a/flake/templates.nix b/flake/templates.nix new file mode 100644 index 0000000..22b75a4 --- /dev/null +++ b/flake/templates.nix @@ -0,0 +1,17 @@ +{ + flake-parts-lib, + lib, + rootPath, + ... +}: { + options = { + flake = flake-parts-lib.mkSubmoduleOptions { + templates = lib.mkOption { + type = lib.types.lazyAttrsOf lib.types.raw; + }; + }; + }; + config = { + flake.templates = import (rootPath + "/templates"); + }; +} diff --git a/home/david/configurations/Akun/niri.nix b/home/david/configurations/Akun/niri.nix index 0df2455..fe7227c 100644 --- a/home/david/configurations/Akun/niri.nix +++ b/home/david/configurations/Akun/niri.nix @@ -1,4 +1,10 @@ -{config, ...}: { +{ + config, + inputs, + ... +}: let + inherit (inputs.niri-flake.lib.kdl) node leaf flag; +in { david.programs.niri = { waybar.settings = let cfg = config.david.programs.niri.waybar; @@ -14,5 +20,25 @@ ]; }; }; + extraConfig = let + output = node "output"; + in [ + ( + output + ["eDP-1"] + [ + (leaf "mode" ["1920x1200@60.018"]) + (leaf "scale" [1.0]) + (flag "focus-at-startup") + (leaf "position" [ + { + x = 0; + y = 0; + } + ]) + (leaf "transform" ["normal"]) + ] + ) + ]; }; } diff --git a/home/david/configurations/Tytonidae/default.nix b/home/david/configurations/Tytonidae/default.nix index d9662cb..e892e1e 100644 --- a/home/david/configurations/Tytonidae/default.nix +++ b/home/david/configurations/Tytonidae/default.nix @@ -32,6 +32,7 @@ kvm.enable = true; atuin.enable = true; ion.enable = true; + spotifyd.enable = true; awscli = { enable = true; url = "http://localhost:8491"; diff --git a/home/david/configurations/Tytonidae/niri.nix b/home/david/configurations/Tytonidae/niri.nix index 62ed003..1a76367 100644 --- a/home/david/configurations/Tytonidae/niri.nix +++ b/home/david/configurations/Tytonidae/niri.nix @@ -34,5 +34,6 @@ in { } ]; }; + extraConfig = []; }; } diff --git a/home/david/modules/default.nix b/home/david/modules/default.nix index 85fde6c..903eb35 100644 --- a/home/david/modules/default.nix +++ b/home/david/modules/default.nix @@ -1,4 +1,8 @@ -{lib, ...}: { +{ + lib, + pkgs, + ... +}: { imports = lib.youthlic.loadImports ./.; config = { youthlic.programs = { @@ -8,5 +12,10 @@ eza.enable = true; }; services.mpris-proxy.enable = true; + home.packages = with pkgs; [ + spacer + devenv + just + ]; }; } diff --git a/home/david/modules/programs/mpv.nix b/home/david/modules/programs/mpv.nix index 095828d..4fe19fa 100644 --- a/home/david/modules/programs/mpv.nix +++ b/home/david/modules/programs/mpv.nix @@ -1,7 +1,6 @@ { lib, config, - pkgs, ... }: let cfg = config.david.programs.mpv; @@ -14,10 +13,6 @@ in { config = lib.mkIf cfg.enable { programs.mpv = { enable = true; - scripts = [ - pkgs.mpvScripts.uosc - pkgs.mpvScripts.thumbfast - ]; }; }; } diff --git a/home/david/modules/programs/niri/config.nix b/home/david/modules/programs/niri/config.nix index f038743..a9d01b9 100644 --- a/home/david/modules/programs/niri/config.nix +++ b/home/david/modules/programs/niri/config.nix @@ -1,707 +1,708 @@ { config, + pkgs, lib, inputs, + osConfig ? null, ... -}: { - config.david.programs.niri.config = - let - inherit (lib) getExe; - inherit - (inputs.niri-flake.lib.kdl) - # node with args, props and children - # node:: \lambda name -> [argOrProp] -> [child] -> Output - # arg: single value - # prop: attr contains one or more key-value pair - # children: node - node - # node without children - # leaf:: \lambda name -> [argOrProp] -> Output - leaf - # node only name - # flag:: \lambda name -> Output - flag - # node without args/props - # plain:: \lambda name -> [child] -> Output - plain - ; - - # swaylock = getExe config.programs.swaylock.package; - # fuzzel = getExe config.programs.fuzzel.package; - # waybar = getExe config.programs.waybar.package; - # swaync = getExe config.services.swaync.package; - - # wpctl = getExe' pkgs.wireplumber "wpctl"; - # waypaper = getExe pkgs.waypaper; - default-terminal = getExe config.programs.ghostty.package; - # wl-paste = getExe' pkgs.wl-clipboard "wl-paste"; - # cliphist = getExe' pkgs.cliphist "cliphist"; - # cliphist-fuzzel-img = getExe' pkgs.cliphist "cliphist-fuzzel-img"; - # wl-clip-persist = getExe pkgs.wl-clip-persist; - in - ( - let - spawn = leaf "spawn"; - in [ - (plain "binds" [ - # (plain "Mod+V" [ - # (spawn [cliphist-fuzzel-img]) - # ]) - # (plain "Mod+Shift+P" [ - # (spawn [ - # swaylock - # "--screenshots" - # "--clock" - # "--indicator" - # "--indicator-radius" - # "100" - # "--indicator-thickness" - # "7" - # "--effect-blur" - # "7x5" - # "--effect-vignette" - # "0.5:0.5" - # "--grace" - # "2" - # "--fade-in" - # "0.5" - # ]) - # ]) - (plain "Mod+Shift+Slash" [ - (flag "show-hotkey-overlay") - ]) - (plain "Mod+T" [ - (spawn [ - default-terminal - ]) - ]) - (plain "Mod+Shift+T" [ - (flag "toggle-column-tabbed-display") - ]) - # (plain "Mod+Space" [ - # (spawn [fuzzel]) - # ]) - # ( - # node "XF86AudioRaiseVolume" - # [{allow-when-locked = true;}] - # [ - # (spawn [ - # wpctl - # "set-volume" - # "@DEFAULT_AUDIO_SINK@" - # "0.1+" - # ]) - # ] - # ) - # ( - # node "XF86AudioLowerVolume" - # [{allow-when-locked = true;}] - # [ - # (spawn [ - # wpctl - # "set-volume" - # "@DEFAULT_AUDIO_SINK@" - # "0.1-" - # ]) - # ] - # ) - # ( - # node "XF86AudioMute" - # [{allow-when-locked = true;}] - # [ - # (spawn [ - # wpctl - # "set-volume" - # "@DEFAULT_AUDIO_SINK@" - # "toggle" - # ]) - # ] - # ) - # ( - # node "XF86AudioMicMute" - # [{allow-when-locked = true;}] - # [ - # (spawn [ - # wpctl - # "set-volume" - # "@DEFAULT_AUDIO_SOURCE@" - # "toggle" - # ]) - # ] - # ) - (plain "Mod+Q" [ - (flag "close-window") - ]) - ( - node "Mod+O" - [{repeat = false;}] - [ - (flag "toggle-overview") - ] - ) - (plain "Mod+Left" [ - (flag "focus-column-left") - ]) - (plain "Mod+Down" [ - (flag "focus-window-down") - ]) - (plain "Mod+Up" [ - (flag "focus-window-up") - ]) - (plain "Mod+Right" [ - (flag "focus-column-right") - ]) - (plain "Mod+H" [ - (flag "focus-column-or-monitor-left") - ]) - (plain "Mod+J" [ - (flag "focus-window-or-workspace-down") - ]) - (plain "Mod+K" [ - (flag "focus-window-or-workspace-up") - ]) - (plain "Mod+L" [ - (flag "focus-column-or-monitor-right") - ]) - (plain "Mod+Shift+Left" [ - (flag "move-column-left") - ]) - (plain "Mod+Shift+Down" [ - (flag "move-window-down") - ]) - (plain "Mod+Shift+Up" [ - (flag "move-window-up") - ]) - (plain "Mod+Shift+Right" [ - (flag "move-column-right") - ]) - (plain "Mod+Shift+H" [ - (flag "move-column-left-or-to-monitor-left") - ]) - (plain "Mod+Shift+J" [ - (flag "move-window-down-or-to-workspace-down") - ]) - (plain "Mod+Shift+K" [ - (flag "move-window-up-or-to-workspace-up") - ]) - (plain "Mod+Shift+L" [ - (flag "move-column-right-or-to-monitor-right") - ]) - (plain "Mod+Home" [ - (flag "focus-column-first") - ]) - (plain "Mod+End" [ - (flag "focus-column-last") - ]) - (plain "Mod+Ctrl+Home" [ - (flag "move-column-to-first") - ]) - (plain "Mod+Ctrl+End" [ - (flag "move-column-to-last") - ]) - (plain "Mod+Ctrl+Left" [ - (flag "focus-monitor-left") - ]) - (plain "Mod+Ctrl+Down" [ - (flag "focus-monitor-down") - ]) - (plain "Mod+Ctrl+Up" [ - (flag "focus-monitor-up") - ]) - (plain "Mod+Ctrl+Right" [ - (flag "focus-monitor-right") - ]) - (plain "Mod+Ctrl+H" [ - (flag "focus-monitor-left") - ]) - (plain "Mod+Ctrl+J" [ - (flag "focus-monitor-down") - ]) - (plain "Mod+Ctrl+K" [ - (flag "focus-monitor-up") - ]) - (plain "Mod+Ctrl+L" [ - (flag "focus-monitor-right") - ]) - (plain "Mod+Shift+Ctrl+Left" [ - (flag "move-column-to-monitor-left") - ]) - (plain "Mod+Shift+Ctrl+Down" [ - (flag "move-column-to-monitor-down") - ]) - (plain "Mod+Shift+Ctrl+Up" [ - (flag "move-column-to-monitor-up") - ]) - (plain "Mod+Shift+Ctrl+Right" [ - (flag "move-column-to-monitor-right") - ]) - (plain "Mod+Shift+Ctrl+H" [ - (flag "move-column-to-monitor-left") - ]) - (plain "Mod+Shift+Ctrl+J" [ - (flag "move-column-to-monitor-down") - ]) - (plain "Mod+Shift+Ctrl+K" [ - (flag "move-column-to-monitor-up") - ]) - (plain "Mod+Shift+Ctrl+L" [ - (flag "move-column-to-monitor-right") - ]) - (plain "Mod+Page_Down" [ - (flag "focus-workspace-down") - ]) - (plain "Mod+Page_Up" [ - (flag "focus-workspace-up") - ]) - (plain "Mod+U" [ - (flag "focus-workspace-down") - ]) - (plain "Mod+I" [ - (flag "focus-workspace-up") - ]) - (plain "Mod+Shift+Page_Down" [ - (flag "move-column-to-workspace-down") - ]) - (plain "Mod+Shift+Page_Up" [ - (flag "move-column-to-workspace-up") - ]) - (plain "Mod+Shift+U" [ - (flag "move-column-to-workspace-down") - ]) - (plain "Mod+Shift+I" [ - (flag "move-column-to-workspace-up") - ]) - (plain "Mod+Ctrl+Page_Down" [ - (flag "move-workspace-down") - ]) - (plain "Mod+Ctrl+Page_Up" [ - (flag "move-workspace-up") - ]) - (plain "Mod+Ctrl+U" [ - (flag "move-workspace-down") - ]) - (plain "Mod+Ctrl+I" [ - (flag "move-workspace-up") - ]) - ( - node "Mod+Shift+WheelScrollDown" - [{cooldown-ms = 150;}] - [ - (flag "focus-workspace-down") - ] - ) - ( - node "Mod+Shift+WheelScrollUp" - [{cooldown-ms = 150;}] - [ - (flag "focus-workspace-up") - ] - ) - (plain "Mod+WheelScrollDown" [ - (flag "focus-column-right") - ]) - (plain "Mod+WheelScrollUp" [ - (flag "focus-column-left") - ]) - (plain "Mod+1" [ - (leaf "focus-workspace" [1]) - ]) - (plain "Mod+2" [ - (leaf "focus-workspace" [2]) - ]) - (plain "Mod+3" [ - (leaf "focus-workspace" [3]) - ]) - (plain "Mod+4" [ - (leaf "focus-workspace" [4]) - ]) - (plain "Mod+5" [ - (leaf "focus-workspace" [5]) - ]) - (plain "Mod+6" [ - (leaf "focus-workspace" [6]) - ]) - (plain "Mod+7" [ - (leaf "focus-workspace" [7]) - ]) - (plain "Mod+8" [ - (leaf "focus-workspace" [8]) - ]) - (plain "Mod+9" [ - (leaf "focus-workspace" [9]) - ]) - (plain "Mod+Shift+1" [ - (leaf "move-column-to-workspace" [1]) - ]) - (plain "Mod+Shift+2" [ - (leaf "move-column-to-workspace" [2]) - ]) - (plain "Mod+Shift+3" [ - (leaf "move-column-to-workspace" [3]) - ]) - (plain "Mod+Shift+4" [ - (leaf "move-column-to-workspace" [4]) - ]) - (plain "Mod+Shift+5" [ - (leaf "move-column-to-workspace" [5]) - ]) - (plain "Mod+Shift+6" [ - (leaf "move-column-to-workspace" [6]) - ]) - (plain "Mod+Shift+7" [ - (leaf "move-column-to-workspace" [7]) - ]) - (plain "Mod+Shift+8" [ - (leaf "move-column-to-workspace" [8]) - ]) - (plain "Mod+Shift+9" [ - (leaf "move-column-to-workspace" [9]) - ]) - (plain "Mod+F" [ - (flag "toggle-window-floating") - ]) - (plain "Mod+Shift+F" [ - (flag "toggle-windowed-fullscreen") - ]) - (plain "Mod+Tab" [ - (flag "focus-window-previous") - ]) - (plain "Mod+Shift+Tab" [ - (flag "switch-focus-between-floating-and-tiling") - ]) - (plain "Mod+BracketLeft" [ - (flag "consume-or-expel-window-left") - ]) - (plain "Mod+BracketRight" [ - (flag "consume-or-expel-window-right") - ]) - (plain "Mod+Comma" [ - (flag "consume-window-into-column") - ]) - (plain "Mod+Period" [ - (flag "expel-window-from-column") - ]) - ( - node "Mod+R" - [{repeat = false;}] - [ - (flag "switch-preset-column-width") - ] - ) - ( - node "Mod+Shift+R" - [{repeat = false;}] - [ - (flag "switch-preset-window-height") - ] - ) - (plain "Mod+Ctrl+R" [ - (flag "reset-window-height") - ]) - ( - node "Mod+M" - [{repeat = false;}] - [ - (flag "maximize-column") - ] - ) - ( - node "Mod+Shift+M" - [{repeat = false;}] - [ - (flag "fullscreen-window") - ] - ) - ( - node "Mod+Ctrl+M" - [{repeat = false;}] - [ - (flag "maximize-window-to-edges") - ] - ) - (plain "Mod+Z" [ - (flag "center-column") - ]) - ( - node "Mod+Minus" - [{repeat = false;}] - [ - (leaf "set-column-width" ["-10%"]) - ] - ) - ( - node "Mod+Equal" - [{repeat = false;}] - [ - (leaf "set-column-width" ["+10%"]) - ] - ) - ( - node "Mod+Shift+Minus" - [{repeat = false;}] - [ - (leaf "set-window-height" ["-10%"]) - ] - ) - ( - node "Mod+Shift+Equal" - [{repeat = false;}] - [ - (leaf "set-window-height" ["+10%"]) - ] - ) - (plain "Print" [ - (flag "screenshot") - ]) - (plain "Ctrl+Print" [ - (flag "screenshot-screen") - ]) - (plain "Alt+Print" [ - (flag "screenshot-window") - ]) - (plain "Mod+Shift+Q" [ - (flag "quit") - ]) - (plain "Mod+E" [ - (flag "expand-column-to-available-width") - ]) - (plain "Mod+Shift+S" [ - (flag "toggle-keyboard-shortcuts-inhibit") - ]) - (plain "Mod+Shift+C" [ - (flag "set-dynamic-cast-window") - ]) - (plain "Mod+Shift+Ctrl+C" [ - (flag "clear-dynamic-cast-target") - ]) - ]) - ] # binds - ) - ++ - # let - # spawn-at-startup = leaf "spawn-at-startup"; - # in - [ - (leaf "screenshot-path" ["${config.xdg.userDirs.pictures}/screenshots/%Y-%m-%d_%H:%M:%S.png"]) - (plain "hotkey-overlay" [ - (flag "skip-at-startup") - ]) - (flag "prefer-no-csd") - # (spawn-at-startup [waybar]) - # (spawn-at-startup [swaync]) - # (spawn-at-startup [ - # waypaper - # "--restore" - # ]) - # (spawn-at-startup [ - # wl-paste - # "--watch" - # cliphist - # "store" - # ]) - # (spawn-at-startup [ - # wl-clip-persist - # "--clipboard" - # "regular" - # ]) - # (spawn-at-startup [ - # fcitx5 - # "--replace" - # ]) - (plain "input" [ - (plain "touchpad" [ - (leaf "click-method" ["clickfinger"]) - (flag "dwt") - (leaf "scroll-method" ["two-finger"]) - (leaf "tap-button-map" ["left-right-middle"]) - ]) - ]) - (plain "cursor" [ - (leaf "hide-after-inactive-ms" [3000]) - (flag "hide-when-typing") - ]) - (plain "layout" [ - (leaf "background-color" ["transparent"]) - (plain "border" [ - (flag "off") - (leaf "width" [4]) - (leaf "active-color" ["#7fc8ff"]) - (leaf "inactive-color" ["#505050"]) - ]) - (plain "focus-ring" [ - # (flag "off") - (leaf "width" [4]) - (leaf "active-color" ["#7fc8ff"]) - (leaf "active-gradient" [ - { - from = "#e00a54"; - to = "#b8de17"; - angle = 45; - } - ]) - (leaf "inactive-color" ["#505050"]) - ]) - (plain "tab-indicator" [ - (flag "hide-when-single-tab") - ]) - (plain "preset-column-widths" [ - (leaf "proportion" [(1. / 4.)]) - (leaf "proportion" [(1. / 3.)]) - (leaf "proportion" [(1. / 2.)]) - (leaf "proportion" [(2. / 3.)]) - (leaf "proportion" [(3. / 4.)]) - (leaf "proportion" [(4. / 4.)]) - ]) - (flag "always-center-single-column") - (leaf "center-focused-column" ["never"]) - (leaf "default-column-display" ["tabbed"]) - (plain "default-column-width" [ - (leaf "proportion" [(1. / 2.)]) - ]) - (flag "empty-workspace-above-first") - (leaf "gaps" [16]) - ]) - (plain "animations" [ - (plain "window-close" [ - (leaf "spring" [ - { - damping-ratio = 1.0; - stiffness = 800; - epsilon = 0.0001; - } - ]) - ]) - ]) - (plain "overview" [ - (plain "workspace-shadow" [ - (flag "off") - ]) - ]) - ] # others - ++ ( - let - window-rule = plain "window-rule"; - match = leaf "match"; - in [ - (window-rule [ - (leaf "draw-border-with-background" [true]) - (leaf "geometry-corner-radius" [0.0]) - (leaf "clip-to-geometry" [true]) - ]) - (window-rule [ - (match [{app-id = "^org\\.keepassxc\\.KeePassXC$";}]) - (match [{app-id = "^org\\.gnome\\.World\\.Secrets$";}]) - (leaf "block-out-from" ["screen-capture"]) - ]) - (window-rule [ - (match [{is-active = true;}]) - (leaf "opacity" [1.0]) - ]) - (window-rule [ - (match [{is-active = false;}]) - (leaf "opacity" [0.8]) - (leaf "draw-border-with-background" [false]) - ]) - (window-rule [ - (match [{app-id = "^Alacritty$";}]) - (match [{app-id = "^com\\.mitchellh\\.ghostty$";}]) - (match [{app-id = "^neovide$";}]) - (leaf "draw-border-with-background" [false]) - ]) - (window-rule [ - (match [{app-id = "^org\\.kde\\.polkit-kde-authentication-agent-1$";}]) - (leaf "open-floating" [true]) - ]) - (window-rule [ - (match [{app-id = "^swayimg$";}]) - (leaf "draw-border-with-background" [false]) - (leaf "open-floating" [true]) - ]) - (window-rule [ - (match [{is-window-cast-target = true;}]) - (plain "focus-ring" [ - (leaf "active-color" ["#f38ba8"]) - (leaf "inactive-color" ["#7d0d2d"]) - ]) - (plain "border" [ - (leaf "active-color" ["#f38ba8"]) - (leaf "inactive-color" ["#7d0d2d"]) - ]) - (plain "tab-indicator" [ - (leaf "active-color" ["#f38ba8"]) - (leaf "inactive-color" ["#7d0d2d"]) - ]) - (plain "shadow" [ - (flag "on") - ]) - ]) - (window-rule [ - (match [ - { - app-id = "^org\\.telegram\\.desktop$"; - title = "Media viewer"; - } - ]) - (match [ - { - app-id = "^QQ$"; - title = "图片查看器"; - } - ]) - (leaf "open-floating" [true]) - (leaf "open-fullscreen" [false]) - ]) - (window-rule [ - (match [ - { - app-id = "^wechat$"; - title = "^wechat$"; - } - ]) - (leaf "open-focused" [false]) - ]) - (window-rule [ - (match [ - { - app-id = "^steam$"; - title = "^notificationtoasts_\\d+_desktop$"; - } - ]) - (leaf "open-floating" [true]) - (leaf "open-focused" [false]) - (leaf "default-floating-position" [ - { - x = 10; - y = 10; - "relative-to" = "bottom-right"; - } - ]) - (leaf "clip-to-geometry" [false]) - ]) - ] # window-rule - ) - # ++ ( - # let - # layer-rule = plain "layer-rule"; - # match = leaf "match"; - # in [ - # (layer-rule [ - # (match [{namespace = "^swaync-notification-window$";}]) - # (match [{namespace = "^swaync-control-center$";}]) - # (leaf "block-out-from" ["screen-capture"]) - # ]) - # (layer-rule [ - # (match [{namespace = "^launcher$";}]) - # (plain "shadow" [ - # (flag "on") - # ]) - # (leaf "geometry-corner-radius" [10.0]) - # ]) - # (layer-rule [ - # (match [{namespace = "^mpvpaper$";}]) - # (leaf "place-within-backdrop" [true]) - # ]) - # ] # layer-rule - # ) +}: let + inherit (lib) getExe getExe'; + inherit + (inputs.niri-flake.lib.kdl) + # node with args, props and children + # node:: \lambda name -> [argOrProp] -> [child] -> Output + # arg: single value + # prop: attr contains one or more key-value pair + # children: node + node + # node without children + # leaf:: \lambda name -> [argOrProp] -> Output + leaf + # node only name + # flag:: \lambda name -> Output + flag + # node without args/props + # plain:: \lambda name -> [child] -> Output + plain ; -} + + swaylock = getExe config.programs.swaylock.package; + fuzzel = getExe config.programs.fuzzel.package; + waybar = getExe config.programs.waybar.package; + swaync = getExe config.services.swaync.package; + fcitx5 = lib.getExe' osConfig.i18n.inputMethod.package "fcitx5"; + + polkit-kde-agent = getExe' pkgs.kdePackages.polkit-kde-agent-1 "polkit-kde-agent"; + wpctl = getExe' pkgs.wireplumber "wpctl"; + waypaper = getExe pkgs.waypaper; + default-terminal = getExe config.programs.ghostty.package; + wl-paste = getExe' pkgs.wl-clipboard "wl-paste"; + cliphist = getExe' pkgs.cliphist "cliphist"; + cliphist-fuzzel-img = getExe' pkgs.cliphist "cliphist-fuzzel-img"; + wl-clip-persist = getExe pkgs.wl-clip-persist; +in + ( + let + spawn = leaf "spawn"; + in [ + (plain "binds" [ + (plain "Mod+V" [ + (spawn [cliphist-fuzzel-img]) + ]) + (plain "Mod+Shift+P" [ + (spawn [ + swaylock + "--screenshots" + "--clock" + "--indicator" + "--indicator-radius" + "100" + "--indicator-thickness" + "7" + "--effect-blur" + "7x5" + "--effect-vignette" + "0.5:0.5" + "--grace" + "2" + "--fade-in" + "0.5" + ]) + ]) + (plain "Mod+Shift+Slash" [ + (flag "show-hotkey-overlay") + ]) + (plain "Mod+T" [ + (spawn [ + default-terminal + ]) + ]) + (plain "Mod+Shift+T" [ + (flag "toggle-column-tabbed-display") + ]) + (plain "Mod+Space" [ + (spawn [fuzzel]) + ]) + ( + node "XF86AudioRaiseVolume" + [{allow-when-locked = true;}] + [ + (spawn [ + wpctl + "set-volume" + "@DEFAULT_AUDIO_SINK@" + "0.1+" + ]) + ] + ) + ( + node "XF86AudioLowerVolume" + [{allow-when-locked = true;}] + [ + (spawn [ + wpctl + "set-volume" + "@DEFAULT_AUDIO_SINK@" + "0.1-" + ]) + ] + ) + ( + node "XF86AudioMute" + [{allow-when-locked = true;}] + [ + (spawn [ + wpctl + "set-volume" + "@DEFAULT_AUDIO_SINK@" + "toggle" + ]) + ] + ) + ( + node "XF86AudioMicMute" + [{allow-when-locked = true;}] + [ + (spawn [ + wpctl + "set-volume" + "@DEFAULT_AUDIO_SOURCE@" + "toggle" + ]) + ] + ) + (plain "Mod+Q" [ + (flag "close-window") + ]) + ( + node "Mod+O" + [{repeat = false;}] + [ + (flag "toggle-overview") + ] + ) + (plain "Mod+Left" [ + (flag "focus-column-left") + ]) + (plain "Mod+Down" [ + (flag "focus-window-down") + ]) + (plain "Mod+Up" [ + (flag "focus-window-up") + ]) + (plain "Mod+Right" [ + (flag "focus-column-right") + ]) + (plain "Mod+H" [ + (flag "focus-column-or-monitor-left") + ]) + (plain "Mod+J" [ + (flag "focus-window-or-workspace-down") + ]) + (plain "Mod+K" [ + (flag "focus-window-or-workspace-up") + ]) + (plain "Mod+L" [ + (flag "focus-column-or-monitor-right") + ]) + (plain "Mod+Shift+Left" [ + (flag "move-column-left") + ]) + (plain "Mod+Shift+Down" [ + (flag "move-window-down") + ]) + (plain "Mod+Shift+Up" [ + (flag "move-window-up") + ]) + (plain "Mod+Shift+Right" [ + (flag "move-column-right") + ]) + (plain "Mod+Shift+H" [ + (flag "move-column-left-or-to-monitor-left") + ]) + (plain "Mod+Shift+J" [ + (flag "move-window-down-or-to-workspace-down") + ]) + (plain "Mod+Shift+K" [ + (flag "move-window-up-or-to-workspace-up") + ]) + (plain "Mod+Shift+L" [ + (flag "move-column-right-or-to-monitor-right") + ]) + (plain "Mod+Home" [ + (flag "focus-column-first") + ]) + (plain "Mod+End" [ + (flag "focus-column-last") + ]) + (plain "Mod+Ctrl+Home" [ + (flag "move-column-to-first") + ]) + (plain "Mod+Ctrl+End" [ + (flag "move-column-to-last") + ]) + (plain "Mod+Ctrl+Left" [ + (flag "focus-monitor-left") + ]) + (plain "Mod+Ctrl+Down" [ + (flag "focus-monitor-down") + ]) + (plain "Mod+Ctrl+Up" [ + (flag "focus-monitor-up") + ]) + (plain "Mod+Ctrl+Right" [ + (flag "focus-monitor-right") + ]) + (plain "Mod+Ctrl+H" [ + (flag "focus-monitor-left") + ]) + (plain "Mod+Ctrl+J" [ + (flag "focus-monitor-down") + ]) + (plain "Mod+Ctrl+K" [ + (flag "focus-monitor-up") + ]) + (plain "Mod+Ctrl+L" [ + (flag "focus-monitor-right") + ]) + (plain "Mod+Shift+Ctrl+Left" [ + (flag "move-column-to-monitor-left") + ]) + (plain "Mod+Shift+Ctrl+Down" [ + (flag "move-column-to-monitor-down") + ]) + (plain "Mod+Shift+Ctrl+Up" [ + (flag "move-column-to-monitor-up") + ]) + (plain "Mod+Shift+Ctrl+Right" [ + (flag "move-column-to-monitor-right") + ]) + (plain "Mod+Shift+Ctrl+H" [ + (flag "move-column-to-monitor-left") + ]) + (plain "Mod+Shift+Ctrl+J" [ + (flag "move-column-to-monitor-down") + ]) + (plain "Mod+Shift+Ctrl+K" [ + (flag "move-column-to-monitor-up") + ]) + (plain "Mod+Shift+Ctrl+L" [ + (flag "move-column-to-monitor-right") + ]) + (plain "Mod+Page_Down" [ + (flag "focus-workspace-down") + ]) + (plain "Mod+Page_Up" [ + (flag "focus-workspace-up") + ]) + (plain "Mod+U" [ + (flag "focus-workspace-down") + ]) + (plain "Mod+I" [ + (flag "focus-workspace-up") + ]) + (plain "Mod+Shift+Page_Down" [ + (flag "move-column-to-workspace-down") + ]) + (plain "Mod+Shift+Page_Up" [ + (flag "move-column-to-workspace-up") + ]) + (plain "Mod+Shift+U" [ + (flag "move-column-to-workspace-down") + ]) + (plain "Mod+Shift+I" [ + (flag "move-column-to-workspace-up") + ]) + (plain "Mod+Ctrl+Page_Down" [ + (flag "move-workspace-down") + ]) + (plain "Mod+Ctrl+Page_Up" [ + (flag "move-workspace-up") + ]) + (plain "Mod+Ctrl+U" [ + (flag "move-workspace-down") + ]) + (plain "Mod+Ctrl+I" [ + (flag "move-workspace-up") + ]) + ( + node "Mod+Shift+WheelScrollDown" + [{cooldown-ms = 150;}] + [ + (flag "focus-workspace-down") + ] + ) + ( + node "Mod+Shift+WheelScrollUp" + [{cooldown-ms = 150;}] + [ + (flag "focus-workspace-up") + ] + ) + (plain "Mod+WheelScrollDown" [ + (flag "focus-column-right") + ]) + (plain "Mod+WheelScrollUp" [ + (flag "focus-column-left") + ]) + (plain "Mod+1" [ + (leaf "focus-workspace" [1]) + ]) + (plain "Mod+2" [ + (leaf "focus-workspace" [2]) + ]) + (plain "Mod+3" [ + (leaf "focus-workspace" [3]) + ]) + (plain "Mod+4" [ + (leaf "focus-workspace" [4]) + ]) + (plain "Mod+5" [ + (leaf "focus-workspace" [5]) + ]) + (plain "Mod+6" [ + (leaf "focus-workspace" [6]) + ]) + (plain "Mod+7" [ + (leaf "focus-workspace" [7]) + ]) + (plain "Mod+8" [ + (leaf "focus-workspace" [8]) + ]) + (plain "Mod+9" [ + (leaf "focus-workspace" [9]) + ]) + (plain "Mod+Shift+1" [ + (leaf "move-column-to-workspace" [1]) + ]) + (plain "Mod+Shift+2" [ + (leaf "move-column-to-workspace" [2]) + ]) + (plain "Mod+Shift+3" [ + (leaf "move-column-to-workspace" [3]) + ]) + (plain "Mod+Shift+4" [ + (leaf "move-column-to-workspace" [4]) + ]) + (plain "Mod+Shift+5" [ + (leaf "move-column-to-workspace" [5]) + ]) + (plain "Mod+Shift+6" [ + (leaf "move-column-to-workspace" [6]) + ]) + (plain "Mod+Shift+7" [ + (leaf "move-column-to-workspace" [7]) + ]) + (plain "Mod+Shift+8" [ + (leaf "move-column-to-workspace" [8]) + ]) + (plain "Mod+Shift+9" [ + (leaf "move-column-to-workspace" [9]) + ]) + (plain "Mod+F" [ + (flag "toggle-window-floating") + ]) + (plain "Mod+Shift+F" [ + (flag "toggle-windowed-fullscreen") + ]) + (plain "Mod+Tab" [ + (flag "focus-window-previous") + ]) + (plain "Mod+Shift+Tab" [ + (flag "switch-focus-between-floating-and-tiling") + ]) + (plain "Mod+BracketLeft" [ + (flag "consume-or-expel-window-left") + ]) + (plain "Mod+BracketRight" [ + (flag "consume-or-expel-window-right") + ]) + (plain "Mod+Comma" [ + (flag "consume-window-into-column") + ]) + (plain "Mod+Period" [ + (flag "expel-window-from-column") + ]) + ( + node "Mod+R" + [{repeat = false;}] + [ + (flag "switch-preset-column-width") + ] + ) + ( + node "Mod+Shift+R" + [{repeat = false;}] + [ + (flag "switch-preset-window-height") + ] + ) + (plain "Mod+Ctrl+R" [ + (flag "reset-window-height") + ]) + ( + node "Mod+M" + [{repeat = false;}] + [ + (flag "maximize-column") + ] + ) + ( + node "Mod+Shift+M" + [{repeat = false;}] + [ + (flag "fullscreen-window") + ] + ) + ( + node "Mod+Ctrl+M" + [{repeat = false;}] + [ + (flag "maximize-window-to-edges") + ] + ) + (plain "Mod+Z" [ + (flag "center-column") + ]) + ( + node "Mod+Minus" + [{repeat = false;}] + [ + (leaf "set-column-width" ["-10%"]) + ] + ) + ( + node "Mod+Equal" + [{repeat = false;}] + [ + (leaf "set-column-width" ["+10%"]) + ] + ) + ( + node "Mod+Shift+Minus" + [{repeat = false;}] + [ + (leaf "set-window-height" ["-10%"]) + ] + ) + ( + node "Mod+Shift+Equal" + [{repeat = false;}] + [ + (leaf "set-window-height" ["+10%"]) + ] + ) + (plain "Print" [ + (flag "screenshot") + ]) + (plain "Ctrl+Print" [ + (flag "screenshot-screen") + ]) + (plain "Alt+Print" [ + (flag "screenshot-window") + ]) + (plain "Mod+Shift+Q" [ + (flag "quit") + ]) + (plain "Mod+E" [ + (flag "expand-column-to-available-width") + ]) + (plain "Mod+Shift+S" [ + (flag "toggle-keyboard-shortcuts-inhibit") + ]) + (plain "Mod+Shift+C" [ + (flag "set-dynamic-cast-window") + ]) + (plain "Mod+Shift+Ctrl+C" [ + (flag "clear-dynamic-cast-target") + ]) + ]) + ] # binds + ) + ++ ( + let + spawn-at-startup = leaf "spawn-at-startup"; + in [ + (leaf "screenshot-path" ["${config.xdg.userDirs.pictures}/screenshots/%Y-%m-%d_%H:%M:%S.png"]) + (plain "hotkey-overlay" [ + (flag "skip-at-startup") + ]) + (flag "prefer-no-csd") + (spawn-at-startup [waybar]) + (spawn-at-startup [swaync]) + (spawn-at-startup [ + waypaper + "--restore" + ]) + (spawn-at-startup [polkit-kde-agent]) + (spawn-at-startup [ + wl-paste + "--watch" + cliphist + "store" + ]) + (spawn-at-startup [ + wl-clip-persist + "--clipboard" + "regular" + ]) + (spawn-at-startup [ + fcitx5 + "--replace" + ]) + (plain "input" [ + (plain "touchpad" [ + (leaf "click-method" ["clickfinger"]) + (flag "dwt") + (leaf "scroll-method" ["two-finger"]) + (leaf "tap-button-map" ["left-right-middle"]) + ]) + ]) + (plain "cursor" [ + (leaf "hide-after-inactive-ms" [3000]) + (flag "hide-when-typing") + ]) + (plain "layout" [ + (leaf "background-color" ["transparent"]) + (plain "border" [ + (flag "off") + (leaf "width" [4]) + (leaf "active-color" ["#7fc8ff"]) + (leaf "inactive-color" ["#505050"]) + ]) + (plain "focus-ring" [ + # (flag "off") + (leaf "width" [4]) + (leaf "active-color" ["#7fc8ff"]) + (leaf "active-gradient" [ + { + from = "#e00a54"; + to = "#b8de17"; + angle = 45; + } + ]) + (leaf "inactive-color" ["#505050"]) + ]) + (plain "tab-indicator" [ + (flag "hide-when-single-tab") + ]) + (plain "preset-column-widths" [ + (leaf "proportion" [(1. / 4.)]) + (leaf "proportion" [(1. / 3.)]) + (leaf "proportion" [(1. / 2.)]) + (leaf "proportion" [(2. / 3.)]) + (leaf "proportion" [(3. / 4.)]) + (leaf "proportion" [(4. / 4.)]) + ]) + (flag "always-center-single-column") + (leaf "center-focused-column" ["never"]) + (leaf "default-column-display" ["tabbed"]) + (plain "default-column-width" [ + (leaf "proportion" [(1. / 2.)]) + ]) + (flag "empty-workspace-above-first") + (leaf "gaps" [16]) + ]) + (plain "animations" [ + (plain "window-close" [ + (leaf "spring" [ + { + damping-ratio = 1.0; + stiffness = 800; + epsilon = 0.0001; + } + ]) + ]) + ]) + (plain "overview" [ + (plain "workspace-shadow" [ + (flag "off") + ]) + ]) + ] # others + ) + ++ ( + let + window-rule = plain "window-rule"; + match = leaf "match"; + in [ + (window-rule [ + (leaf "draw-border-with-background" [true]) + (leaf "geometry-corner-radius" [0.0]) + (leaf "clip-to-geometry" [true]) + ]) + (window-rule [ + (match [{app-id = "^org\\.keepassxc\\.KeePassXC$";}]) + (match [{app-id = "^org\\.gnome\\.World\\.Secrets$";}]) + (leaf "block-out-from" ["screen-capture"]) + ]) + (window-rule [ + (match [{is-active = true;}]) + (leaf "opacity" [1.0]) + ]) + (window-rule [ + (match [{is-active = false;}]) + (leaf "opacity" [0.8]) + (leaf "draw-border-with-background" [false]) + ]) + (window-rule [ + (match [{app-id = "^Alacritty$";}]) + (match [{app-id = "^com\\.mitchellh\\.ghostty$";}]) + (match [{app-id = "^neovide$";}]) + (leaf "draw-border-with-background" [false]) + ]) + (window-rule [ + (match [{app-id = "^org\\.kde\\.polkit-kde-authentication-agent-1$";}]) + (leaf "open-floating" [true]) + ]) + (window-rule [ + (match [{app-id = "^swayimg$";}]) + (leaf "draw-border-with-background" [false]) + (leaf "open-floating" [true]) + ]) + (window-rule [ + (match [{is-window-cast-target = true;}]) + (plain "focus-ring" [ + (leaf "active-color" ["#f38ba8"]) + (leaf "inactive-color" ["#7d0d2d"]) + ]) + (plain "border" [ + (leaf "active-color" ["#f38ba8"]) + (leaf "inactive-color" ["#7d0d2d"]) + ]) + (plain "tab-indicator" [ + (leaf "active-color" ["#f38ba8"]) + (leaf "inactive-color" ["#7d0d2d"]) + ]) + (plain "shadow" [ + (flag "on") + ]) + ]) + (window-rule [ + (match [ + { + app-id = "^org\\.telegram\\.desktop$"; + title = "Media viewer"; + } + ]) + (match [ + { + app-id = "^QQ$"; + title = "图片查看器"; + } + ]) + (leaf "open-floating" [true]) + (leaf "open-fullscreen" [false]) + ]) + (window-rule [ + (match [ + { + app-id = "^wechat$"; + title = "^wechat$"; + } + ]) + (leaf "open-focused" [false]) + ]) + (window-rule [ + (match [ + { + app-id = "^steam$"; + title = "^notificationtoasts_\\d+_desktop$"; + } + ]) + (leaf "open-floating" [true]) + (leaf "open-focused" [false]) + (leaf "default-floating-position" [ + { + x = 10; + y = 10; + "relative-to" = "bottom-right"; + } + ]) + (leaf "clip-to-geometry" [false]) + ]) + ] # window-rule + ) + ++ ( + let + layer-rule = plain "layer-rule"; + match = leaf "match"; + in [ + (layer-rule [ + (match [{namespace = "^swaync-notification-window$";}]) + (match [{namespace = "^swaync-control-center$";}]) + (leaf "block-out-from" ["screen-capture"]) + ]) + (layer-rule [ + (match [{namespace = "^launcher$";}]) + (plain "shadow" [ + (flag "on") + ]) + (leaf "geometry-corner-radius" [10.0]) + ]) + (layer-rule [ + (match [{namespace = "^mpvpaper$";}]) + (leaf "place-within-backdrop" [true]) + ]) + ] # layer-rule + ) diff --git a/home/david/modules/programs/niri/default.nix b/home/david/modules/programs/niri/default.nix index 3e7d6b0..b77a236 100644 --- a/home/david/modules/programs/niri/default.nix +++ b/home/david/modules/programs/niri/default.nix @@ -3,15 +3,13 @@ lib, inputs, pkgs, - osConfig ? (throw "Trying to access osConfig, the home-manager module is not being used in the nixos module"), + osConfig ? null, options, ... -}: let +} @ args: let cfg = config.david.programs.niri; + niri = osConfig.programs.niri.package; in { - imports = [ - ./config.nix - ]; options = { david.programs.niri = { enable = @@ -19,25 +17,9 @@ in { // { default = osConfig.youthlic.gui.enabled == "niri"; }; - config = lib.mkOption { + extraConfig = lib.mkOption { type = inputs.niri-flake.lib.kdl.types.kdl-document; }; - configHelper = lib.mkOption { - type = lib.types.anything; - default = { - validated-config-for = configuration: - pkgs.runCommand "config.kdl" { - inherit configuration; - passAsFile = ["configuration"]; - buildInputs = [config.programs.niri.package]; - } - #bash - '' - niri validate -c $configurationPath - cp $configurationPath $out - ''; - }; - }; wluma.extraSettings = lib.mkOption { inherit (options.david.programs.wluma.extraSettings) type; }; @@ -60,50 +42,62 @@ in { }; config = lib.mkMerge [ (lib.mkIf cfg.enable { - home.packages = with pkgs; [ - # swaynotificationcenter - wl-clipboard - # cliphist - swayimg - seahorse - ]; + home.packages = + (with pkgs; [ + swaynotificationcenter + kdePackages.polkit-kde-agent-1 + wl-clipboard + cliphist + swayimg + seahorse + ]) + ++ [niri]; + qt = { + enable = true; + }; + xdg.portal = { + configPackages = [niri]; + enable = true; + extraPortals = lib.mkIf ( + !niri.cargoBuildNoDefaultFeatures || builtins.elem "xdp-gnome-screencast" niri.cargoBuildFeatures + ) [pkgs.xdg-desktop-portal-gnome]; + }; xdg.configFile = let - qtctConf = '' - [Appearance] - standard_dialogs=xdgdesktopportal - ''; + qtctConf = + '' + [Appearance] + standard_dialogs=xdgdesktopportal + '' + + lib.optionalString (config.qt.style ? name) '' + style=${config.qt.style.name} + ''; in { - "qt5ct/qt5ct.conf" = { + "qt5ct/qt5ct.conf" = lib.mkForce { text = qtctConf; }; - "qt6ct/qt6ct.conf" = { + "qt6ct/qt6ct.conf" = lib.mkForce { text = qtctConf; }; }; david.programs = { - # fuzzel.enable = true; - # waybar = { - # enable = true; - # inherit (cfg.waybar) settings; - # }; - # wluma = { - # enable = true; - # inherit (cfg.wluma) extraSettings; - # }; - # swaync.enable = true; - # swaylock.enable = true; - # waypaper.enable = true; - kanshi.enable = true; - noctalia.enable = true; - }; - programs = { - niri = { - config = - cfg.config - ++ [ - (inputs.niri-flake.lib.kdl.leaf "include" [(toString config.david.programs.noctalia.niriExtraConfig)]) - ]; + fuzzel.enable = true; + waybar = { + enable = true; + inherit (cfg.waybar) settings; }; + wluma = { + enable = true; + inherit (cfg.wluma) extraSettings; + }; + swaync.enable = true; + swaylock.enable = true; + waypaper.enable = true; + kanshi.enable = true; + }; + programs.niri = { + config = + (lib.toList (import ./config.nix (args // {inherit pkgs;}))) ++ (lib.toList cfg.extraConfig); + package = niri; }; }) (lib.mkIf (!cfg.enable) { diff --git a/home/david/modules/programs/noctalia.nix b/home/david/modules/programs/noctalia.nix deleted file mode 100644 index 15e83c4..0000000 --- a/home/david/modules/programs/noctalia.nix +++ /dev/null @@ -1,223 +0,0 @@ -{ - config, - lib, - inputs, - pkgs, - ... -}: let - cfg = config.david.programs.noctalia; - inherit (inputs.niri-flake.lib.kdl) node leaf flag plain; - spawn = leaf "spawn"; - noctalia = args: (spawn (["noctalia-shell" "ipc" "call"] ++ args)); - - layer-rule = plain "layer-rule"; - match = leaf "match"; -in { - options = { - david.programs.noctalia = { - enable = lib.mkEnableOption "noctalia"; - niriExtraConfig = lib.mkOption { - type = inputs.niri-flake.lib.kdl.types.kdl-document; - default = [ - (plain "binds" [ - (plain "Mod+V" [(noctalia ["launcher" "clipboard"])]) - (plain "Mod+Shift+P" [(noctalia ["lockScreen" "lock"])]) - (plain "Mod+Space" [(noctalia ["launcher" "toggle"])]) - (node "XF86AudioRaiseVolume" [{allow-when-locked = true;}] - [(noctalia ["volume" "increase"])]) - (node "XF86AudioLowerVolume" [{allow-when-locked = true;}] - [(noctalia ["volume" "decrease"])]) - (node "XF86AudioMute" [{allow-when-locked = true;}] - [(noctalia ["volume" "muteOutput"])]) - (node "XF86AudioMicMute" [{allow-when-locked = true;}] - [(noctalia ["volume" "muteInput"])]) - ]) - (layer-rule [ - (match [{namespace = "^noctalia-wallpaper-.*$";}]) - (leaf "place-within-backdrop" [true]) - ]) - (layer-rule [ - (match [{namespace = "^noctalia-notifications-.*$";}]) - (leaf "block-out-from" ["screen-capture"]) - ]) - (plain "layout" [ - (plain "focus-ring" [ - (leaf "active-gradient" [ - { - from = "#8288fcff"; - to = "#8288fc00"; - angle = 45; - "in" = "oklch"; - } - ]) - ]) - ]) - ]; - apply = configuration: config.david.programs.niri.configHelper.validated-config-for (inputs.niri-flake.lib.kdl.serialize.nodes configuration); - }; - }; - }; - config = lib.mkIf cfg.enable { - home.packages = [pkgs.app2unit]; - programs.noctalia-shell = { - enable = true; - systemd.enable = true; - settings = { - settingsVersion = 23; - appLauncher = { - enableClipboardHistory = true; - position = "center"; - sortByMostUsed = true; - terminalCommand = "ghostty -e"; - useApp2Unit = true; - }; - audio = { - volumeStep = 1; - volumeOverdrive = true; - cavaFrameRate = 165; - visualizerQuality = "high"; - visualizerType = "mirrored"; - }; - bar = { - density = "comfortable"; - exclusive = true; - floating = false; - outerCorners = true; - position = "right"; - showCapsule = true; - widgets = { - center = [ - {id = "Taskbar";} - { - id = "Workspace"; - hideUnoccupied = true; - } - ]; - left = [ - {id = "SystemMonitor";} - { - id = "MediaMini"; - hideWhenIdle = false; - hideMode = "hidden"; - showAlbumArt = true; - } - { - id = "AudioVisualizer"; - hideWhenIdle = true; - } - ]; - right = [ - {id = "WallpaperSelector";} - {id = "ScreenRecorder";} - {id = "Brightness";} - {id = "DarkMode";} - {id = "NotificationHistory";} - {id = "Volume";} - { - id = "Tray"; - drawerEnabled = true; - pinned = [ - "Fcitx" - ]; - } - {id = "Clock";} - ]; - }; - }; - brightness = { - brightnessStep = 1; - enableDdcSupport = true; - enforceMinimum = true; - }; - colorSchemes = { - generateTemplatesForPredefined = false; - predefineScheme = "Catppuccin"; - schedulingMode = "location"; - useWallpaperColors = false; - darkMode = false; - }; - controlCenter = { - cards = [ - { - enabled = true; - id = "profile-card"; - } - { - enabled = true; - id = "shortcuts-card"; - } - { - enabled = true; - id = "audio-card"; - } - { - enabled = true; - id = "weather-card"; - } - { - enabled = true; - id = "media-sysmon-card"; - } - ]; - position = "close_to_bar_button"; - shortcuts = { - left = [{id = "Bluetooth";} {id = "WallpaperSelector";}]; - right = [{id = "KeepAwake";} {id = "NightLight";}]; - }; - }; - dock = { - enabled = false; - }; - general = { - animationSpeed = 2; - avatarImage = "${config.home.homeDirectory}/.face"; - compactLockScreen = false; - dimmerOpacity = 0; - enableShadows = true; - forceBlackScreenCorners = false; - language = "zh-CN"; - lockOnSuspend = true; - showScreenCorners = false; - }; - location = { - firstDayOfWeek = 1; - showCalendarEvents = true; - showCalendarWeather = true; - weatherEnabled = true; - }; - network = { - wifiEnabled = false; - }; - notifications = { - enabled = true; - location = "bottom_right"; - overlayLayer = true; - respectExpireTimeout = true; - }; - osd = { - enabled = true; - location = "bottom"; - overlayLayer = true; - }; - setupCompleted = true; - ui = { - fontDefault = "Source Han Serif SC"; - fontFixed = "Maple Mono NF CN"; - panelsAttachedToBar = true; - settingsPanelAttachToBar = false; - tooltipsEnabled = true; - }; - wallpaper = { - directory = "${config.home.homeDirectory}/wallpaper"; - enabled = true; - panelPosition = "center"; - randomEnabled = true; - randomIntervalSec = 900; - recursiveSearch = true; - transitionDuration = 1500; - transitionType = "random"; - }; - }; - }; - }; -} diff --git a/home/modules/default.nix b/home/modules/default.nix index 5f2bbef..5e02002 100644 --- a/home/modules/default.nix +++ b/home/modules/default.nix @@ -8,7 +8,6 @@ sops-nix.homeManagerModules.sops betterfox-nix.homeModules.betterfox nix4nvchad.homeManagerModule - noctalia.homeModules.default ]) ++ lib.youthlic.loadImports ./.; diff --git a/home/modules/programs/atuin.nix b/home/modules/programs/atuin.nix index 99de6a1..8e84e5f 100644 --- a/home/modules/programs/atuin.nix +++ b/home/modules/programs/atuin.nix @@ -31,7 +31,6 @@ in { enter_accept = false; keymap_mode = "vim-insert"; sync.records = true; - search_mode = "skim"; }; }; }) diff --git a/home/modules/programs/eza.nix b/home/modules/programs/eza.nix index 8a9b4e4..03e2d34 100644 --- a/home/modules/programs/eza.nix +++ b/home/modules/programs/eza.nix @@ -17,8 +17,6 @@ in { (lib.mkIf cfg.enable { programs.eza = { enable = true; - colors = "auto"; - icons = "auto"; }; }) (lib.mkIf (cfg.enable && fish-cfg.enable) { diff --git a/nixos/configurations/Tytonidae/specialisation/niri-hybrid.nix b/nixos/configurations/Tytonidae/specialisation/niri-hybrid.nix index db6d7da..5cf3649 100644 --- a/nixos/configurations/Tytonidae/specialisation/niri-hybrid.nix +++ b/nixos/configurations/Tytonidae/specialisation/niri-hybrid.nix @@ -1,16 +1,13 @@ -{inputs, ...}: { +{ + inputs, + lib, + ... +}: { config.specialisation.niri-hybrid = { inheritParentConfig = true; configuration = { - disabledModules = [ - inputs.nixos-hardware.nixosModules.common-gpu-nvidia-nonprime - ]; imports = [inputs.nixos-hardware.nixosModules.common-gpu-nvidia]; - hardware.nvidia.prime = { - reverseSync.enable = false; - offload.enable = true; - }; - services.xserver.videoDrivers = ["nvidia"]; + hardware.nvidia.prime.reverseSync.enable = lib.mkForce false; }; }; } diff --git a/nixos/modules/gui/kde.nix b/nixos/modules/gui/kde.nix index 9651516..8bd02c5 100644 --- a/nixos/modules/gui/kde.nix +++ b/nixos/modules/gui/kde.nix @@ -6,6 +6,8 @@ cfg = config.youthlic.gui; in { config = lib.mkIf (cfg.enabled == "kde") { + # Fix stylix bug + qt.platformTheme = lib.mkForce "kde"; services = { desktopManager.plasma6.enable = true; displayManager.sddm.enable = true; diff --git a/nixos/modules/gui/niri.nix b/nixos/modules/gui/niri.nix index c9893ec..f341d33 100644 --- a/nixos/modules/gui/niri.nix +++ b/nixos/modules/gui/niri.nix @@ -11,11 +11,12 @@ in { }; }; config = lib.mkIf (cfg.enabled == "niri") { + qt = { + enable = true; + platformTheme = "qt5ct"; + }; # Enabled to support trash of nautilus services.gvfs.enable = true; - - systemd.user.services.niri-flake-polkit.serviceConfig.ExecStart = lib.mkForce "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1"; - environment = { pathsToLink = ["share/thumbnailers"]; systemPackages = with pkgs; [ @@ -25,16 +26,13 @@ in { libheif.out bluez + kdePackages.qt6ct + libsForQt5.qt5ct xwayland-satellite-unstable evince ]; }; xdg = { - portal = { - extraPortals = [ - pkgs.xdg-desktop-portal-gtk - ]; - }; terminal-exec = { enable = true; settings = { diff --git a/nixos/modules/nix.nix b/nixos/modules/nix.nix index b80b30f..b0c85c1 100644 --- a/nixos/modules/nix.nix +++ b/nixos/modules/nix.nix @@ -27,6 +27,24 @@ "immersive-translate" ]; packageOverrides = p: { + kdePackages = + p.kdePackages + // { + inherit + ( + (import inputs.nixpkgs-455083 { + localSystem = { + inherit (pkgs.stdenv.hostPlatform) system; + }; + config = { + allowUnfree = true; + allowInsecurePredicate = p: builtins.elem (lib.getName p) ["olm"]; + }; + }).kdePackages + ) + neochat + ; + }; intel-vaapi-driver = p.intel-vaapi-driver.override {enableHybridCodec = true;}; onnxruntime = p.onnxruntime.override { cudaSupport = false; diff --git a/nvfetcher.toml b/nvfetcher.toml index 345ab71..26b9e4f 100644 --- a/nvfetcher.toml +++ b/nvfetcher.toml @@ -58,3 +58,8 @@ url.name = "yustar_$ver.zip" [nvim_vim-startuptime] fetch.github = "dstein64/vim-startuptime" src.git = "https://github.com/dstein64/vim-startuptime.git" + +[spotifyd] +fetch.git = "https://github.com/ulic-youthlic/spotifyd.git" +src.git = "https://github.com/ulic-youthlic/spotifyd.git" +src.branch = "push-mrxqoqwxqsqt" diff --git a/overlays/modifications/default.nix b/overlays/modifications/default.nix index 663f1c1..8233af6 100644 --- a/overlays/modifications/default.nix +++ b/overlays/modifications/default.nix @@ -12,6 +12,7 @@ in ./helix.nix ./cliphist.nix ./zulip.nix + ./spotifyd.nix ./nautilus.nix ./neovim-nightly.nix ./vim.nix diff --git a/overlays/modifications/spotifyd.nix b/overlays/modifications/spotifyd.nix new file mode 100644 index 0000000..eb39754 --- /dev/null +++ b/overlays/modifications/spotifyd.nix @@ -0,0 +1,5 @@ +{outputs, ...}: _final: prev: let + inherit (prev.stdenv.hostPlatform) system; +in { + spotifyd = outputs.packages.${system}.spotifyd'; +} diff --git a/pkgs/spotifyd'.nix b/pkgs/spotifyd'.nix new file mode 100644 index 0000000..ff1b4c0 --- /dev/null +++ b/pkgs/spotifyd'.nix @@ -0,0 +1,27 @@ +{ + srcs, + spotifyd, + rustPlatform, + ... +}: let + inherit (srcs.spotifyd) src date version; +in + spotifyd.overrideAttrs ( + _final: prev: { + inherit src; + version = + if prev.version != "0.4.1" + then + throw '' + Please remove + '' + else "0-unstable-${date}-git${version}"; + cargoDeps = rustPlatform.fetchCargoVendor { + inherit + (prev) + src + ; + hash = "sha256-WwShp1ebk89cBqRXqKDgbwGZraCDjQAOxoL4uEIq2aw="; + }; + } + ) diff --git a/pkgs/wallpapers.nix b/pkgs/wallpapers.nix index 806cb42..96ad9cb 100644 --- a/pkgs/wallpapers.nix +++ b/pkgs/wallpapers.nix @@ -7,7 +7,7 @@ wallpapers = with lib; pipe srcs [ (filterAttrs (name: _value: hasPrefix "wallpaper" name)) - (concatMapAttrsStringSep "\n" (name: value: "cp ${value.src} $out/${name}")) + (concatMapAttrsStringSep "\n" (name: value: "ln -s ${value.src} $out/${name}")) ]; in runCommandLocal "wallpapers" {} '' @@ -15,5 +15,5 @@ in ${wallpapers} - cp ${rootPath + "/assets/wallpaper/01.png"} $out/01.png + ln -s ${rootPath + "/assets/wallpaper/01.png"} $out/01.png '' diff --git a/templates/cxx/.clang-format b/templates/cxx/.clang-format new file mode 100644 index 0000000..06e3c51 --- /dev/null +++ b/templates/cxx/.clang-format @@ -0,0 +1,4 @@ +--- +Language: Cpp +BasedOnStyle: Google +... diff --git a/templates/cxx/.clang-tidy b/templates/cxx/.clang-tidy new file mode 100755 index 0000000..fbc2618 --- /dev/null +++ b/templates/cxx/.clang-tidy @@ -0,0 +1,3 @@ +--- +Checks: "clang-diagnostic-*,clang-analyzer-*,modernize-*,performance-*,cppcoreguidelines-*" +... diff --git a/templates/cxx/.clangd b/templates/cxx/.clangd new file mode 100644 index 0000000..8793993 --- /dev/null +++ b/templates/cxx/.clangd @@ -0,0 +1,9 @@ +InlayHints: + Enabled: + true + ParameterNames: + true + DuducedTypes: + true + Designators: + true diff --git a/templates/cxx/.envrc b/templates/cxx/.envrc new file mode 100644 index 0000000..c1d8584 --- /dev/null +++ b/templates/cxx/.envrc @@ -0,0 +1,2 @@ + +use flake diff --git a/templates/cxx/.gitignore b/templates/cxx/.gitignore new file mode 100644 index 0000000..0a293cf --- /dev/null +++ b/templates/cxx/.gitignore @@ -0,0 +1,50 @@ +.cache +compile_commands.json + +###---------------### +### GitHub: C++ ### +###---------------### + +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + +###---------------### +### GitHub: Nix ### +###---------------### + +# Ignore build outputs from performing a nix-build or `nix build` command +result +result-* + +# Ignore automatically generated direnv output +.direnv diff --git a/templates/cxx/LICENSE-GPL-3.0-or-later b/templates/cxx/LICENSE-GPL-3.0-or-later new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/templates/cxx/LICENSE-GPL-3.0-or-later @@ -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/templates/cxx/Makefile b/templates/cxx/Makefile new file mode 100644 index 0000000..39127b0 --- /dev/null +++ b/templates/cxx/Makefile @@ -0,0 +1,16 @@ +main.out: main.o + $(CXX) -std=c++26 $^ -o $@ + +main.o: main.cxx + $(CXX) -std=c++26 -c $^ + +compile_commands.json: clean + bear -- make + +.PHONY: run clean +run: main + @echo Run: + @./main + +clean: + -rm main.out main.o diff --git a/templates/cxx/flake.nix b/templates/cxx/flake.nix new file mode 100644 index 0000000..0339e8f --- /dev/null +++ b/templates/cxx/flake.nix @@ -0,0 +1,34 @@ +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + flake-utils = { + url = "github:numtide/flake-utils"; + }; + }; + outputs = { + flake-utils, + nixpkgs, + ... + }: + flake-utils.lib.eachDefaultSystem ( + system: let + pkgs = import nixpkgs { + localSystem = {inherit system;}; + }; + in { + formatter = pkgs.alejandra; + devShells.default = pkgs.mkShell { + packages = with pkgs; [ + clang-tools + + gcc + bear + gnumake + ]; + }; + } + ); + nixConfig = { + keepOutputs = true; + }; +} diff --git a/templates/cxx/main.cxx b/templates/cxx/main.cxx new file mode 100644 index 0000000..a492343 --- /dev/null +++ b/templates/cxx/main.cxx @@ -0,0 +1,3 @@ +#include + +auto main() -> int { std::println("Hello, {}!", "World"); } diff --git a/templates/default.nix b/templates/default.nix new file mode 100644 index 0000000..f157840 --- /dev/null +++ b/templates/default.nix @@ -0,0 +1,14 @@ +{ + rust = { + path = ./rust; + description = "Rust template."; + }; + cxx = { + path = ./cxx; + description = "C++ template."; + }; + python = { + path = ./python; + description = "Python template."; + }; +} diff --git a/templates/python/.envrc b/templates/python/.envrc new file mode 100644 index 0000000..97dd692 --- /dev/null +++ b/templates/python/.envrc @@ -0,0 +1,3 @@ +watch_file pyproject.toml uv.lock + +use flake diff --git a/templates/python/.gitignore b/templates/python/.gitignore new file mode 100644 index 0000000..10991b9 --- /dev/null +++ b/templates/python/.gitignore @@ -0,0 +1,291 @@ +###------------------### +### GitHub: Python ### +###------------------### + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# UV +# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +#uv.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock +#poetry.toml + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/latest/usage/project/#working-with-version-control +.pdm.toml +.pdm-python +.pdm-build/ + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ + +# Abstra +# Abstra is an AI-powered process automation framework. +# Ignore directories containing user credentials, local state, and settings. +# Learn more at https://abstra.io/docs +.abstra/ + +# Visual Studio Code +# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore +# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore +# and can be added to the global gitignore or merged into this file. However, if you prefer, +# you could uncomment the following to ignore the entire vscode folder +# .vscode/ + +# Ruff stuff: +.ruff_cache/ + +# PyPI configuration file +.pypirc + +# Cursor +# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to +# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data +# refer to https://docs.cursor.com/context/ignore-files +.cursorignore +.cursorindexingignore + +###---------------### +### GitHub: Nix ### +###---------------### + +# Ignore build outputs from performing a nix-build or `nix build` command +result +result-* + +# Ignore automatically generated direnv output +.direnv + +###----------------------------### +### GitHub Global: JetBrains ### +###----------------------------### + +# Covers JetBrains IDEs: IntelliJ, GoLand, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ +.idea/sonarlint.xml # see https://community.sonarsource.com/t/is-the-file-idea-idea-idea-sonarlint-xml-intended-to-be-under-source-control/121119 + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser diff --git a/templates/python/.python-version b/templates/python/.python-version new file mode 100644 index 0000000..e4fba21 --- /dev/null +++ b/templates/python/.python-version @@ -0,0 +1 @@ +3.12 diff --git a/templates/python/README.md b/templates/python/README.md new file mode 100644 index 0000000..e69de29 diff --git a/templates/python/app/__init__.py b/templates/python/app/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/templates/python/app/__init__.py @@ -0,0 +1 @@ + diff --git a/templates/python/app/__main__.py b/templates/python/app/__main__.py new file mode 100644 index 0000000..ebfc5ed --- /dev/null +++ b/templates/python/app/__main__.py @@ -0,0 +1,10 @@ +def hello(name: str = "World"): + print(f"Hello, {name}!") + + +def main(): + hello() + + +if __name__ == "__main__": + main() diff --git a/templates/python/flake.lock b/templates/python/flake.lock new file mode 100644 index 0000000..5011e13 --- /dev/null +++ b/templates/python/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1746300365, + "narHash": "sha256-thYTdWqCRipwPRxWiTiH1vusLuAy0okjOyzRx4hLWh4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f21e4546e3ede7ae34d12a84602a22246b31f7e0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/templates/python/flake.nix b/templates/python/flake.nix new file mode 100644 index 0000000..d37fdcf --- /dev/null +++ b/templates/python/flake.nix @@ -0,0 +1,54 @@ +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + flake-utils = { + url = "github:numtide/flake-utils"; + }; + }; + outputs = { + flake-utils, + nixpkgs, + ... + }: + flake-utils.lib.eachDefaultSystem ( + system: let + inherit (pkgs) lib; + pkgs = import nixpkgs { + localSystem = {inherit system;}; + config = { + cudaSupport = true; + allowUnfree = true; + }; + }; + defaultPython = pkgs.python3; + in { + formatter = pkgs.alejandra; + devShells.default = pkgs.mkShell { + packages = + (with pkgs; [ + ruff + pyright + + uv + defaultPython + ]) + ++ (with pkgs.python3Packages; [ + pydantic + torchWithCuda + ]); + shellHook = '' + uv sync + . ./.venv/bin/activate + ''; + env = { + UV_PYTHON_DOWNLOADS = "never"; + UV_PYTHON = "${lib.getExe' defaultPython "python"}"; + UV_TORCH_BACKEND = "auto"; + }; + }; + } + ); + nixConfig = { + keepOutputs = true; + }; +} diff --git a/templates/python/pyproject.toml b/templates/python/pyproject.toml new file mode 100644 index 0000000..c7885d2 --- /dev/null +++ b/templates/python/pyproject.toml @@ -0,0 +1,16 @@ +[project] +dependencies = ["numpy>=2.2.6"] +description = "Add your description here" +name = "python" +readme = "README.md" +requires-python = ">=3.12" +version = "0.1.0" + +[dependency-groups] +dev = ["ipython>=9.2.0", "ptpython>=3.0.30"] + +[build-system] +build-backend = "hatchling.build" +requires = ["hatchling"] +[tool.hatch.build.targets.wheel] +packages = ["app"] diff --git a/templates/python/uv.lock b/templates/python/uv.lock new file mode 100644 index 0000000..aeb2b05 --- /dev/null +++ b/templates/python/uv.lock @@ -0,0 +1,273 @@ +version = 1 +revision = 2 +requires-python = ">=3.12" + +[[package]] +name = "appdirs" +version = "1.4.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c316d7b95f46c669dd9c15aaeecbb48c7d0aeb88c40/appdirs-1.4.4.tar.gz", hash = "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41", size = 13470, upload-time = "2020-05-11T07:59:51.037Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3b/00/2344469e2084fb287c2e0b57b72910309874c3245463acd6cf5e3db69324/appdirs-1.4.4-py2.py3-none-any.whl", hash = "sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128", size = 9566, upload-time = "2020-05-11T07:59:49.499Z" }, +] + +[[package]] +name = "asttokens" +version = "3.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/4a/e7/82da0a03e7ba5141f05cce0d302e6eed121ae055e0456ca228bf693984bc/asttokens-3.0.0.tar.gz", hash = "sha256:0dcd8baa8d62b0c1d118b399b2ddba3c4aff271d0d7a9e0d4c1681c79035bbc7", size = 61978, upload-time = "2024-11-30T04:30:14.439Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/25/8a/c46dcc25341b5bce5472c718902eb3d38600a903b14fa6aeecef3f21a46f/asttokens-3.0.0-py3-none-any.whl", hash = "sha256:e3078351a059199dd5138cb1c706e6430c05eff2ff136af5eb4790f9d28932e2", size = 26918, upload-time = "2024-11-30T04:30:10.946Z" }, +] + +[[package]] +name = "colorama" +version = "0.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, +] + +[[package]] +name = "decorator" +version = "5.2.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/43/fa/6d96a0978d19e17b68d634497769987b16c8f4cd0a7a05048bec693caa6b/decorator-5.2.1.tar.gz", hash = "sha256:65f266143752f734b0a7cc83c46f4618af75b8c5911b00ccb61d0ac9b6da0360", size = 56711, upload-time = "2025-02-24T04:41:34.073Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4e/8c/f3147f5c4b73e7550fe5f9352eaa956ae838d5c51eb58e7a25b9f3e2643b/decorator-5.2.1-py3-none-any.whl", hash = "sha256:d316bb415a2d9e2d2b3abcc4084c6502fc09240e292cd76a76afc106a1c8e04a", size = 9190, upload-time = "2025-02-24T04:41:32.565Z" }, +] + +[[package]] +name = "executing" +version = "2.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/91/50/a9d80c47ff289c611ff12e63f7c5d13942c65d68125160cefd768c73e6e4/executing-2.2.0.tar.gz", hash = "sha256:5d108c028108fe2551d1a7b2e8b713341e2cb4fc0aa7dcf966fa4327a5226755", size = 978693, upload-time = "2025-01-22T15:41:29.403Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7b/8f/c4d9bafc34ad7ad5d8dc16dd1347ee0e507a52c3adb6bfa8887e1c6a26ba/executing-2.2.0-py2.py3-none-any.whl", hash = "sha256:11387150cad388d62750327a53d3339fad4888b39a6fe233c3afbb54ecffd3aa", size = 26702, upload-time = "2025-01-22T15:41:25.929Z" }, +] + +[[package]] +name = "ipython" +version = "9.2.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "decorator" }, + { name = "ipython-pygments-lexers" }, + { name = "jedi" }, + { name = "matplotlib-inline" }, + { name = "pexpect", marker = "sys_platform != 'emscripten' and sys_platform != 'win32'" }, + { name = "prompt-toolkit" }, + { name = "pygments" }, + { name = "stack-data" }, + { name = "traitlets" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/9d/02/63a84444a7409b3c0acd1de9ffe524660e0e5d82ee473e78b45e5bfb64a4/ipython-9.2.0.tar.gz", hash = "sha256:62a9373dbc12f28f9feaf4700d052195bf89806279fc8ca11f3f54017d04751b", size = 4424394, upload-time = "2025-04-25T17:55:40.498Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/78/ce/5e897ee51b7d26ab4e47e5105e7368d40ce6cfae2367acdf3165396d50be/ipython-9.2.0-py3-none-any.whl", hash = "sha256:fef5e33c4a1ae0759e0bba5917c9db4eb8c53fee917b6a526bd973e1ca5159f6", size = 604277, upload-time = "2025-04-25T17:55:37.625Z" }, +] + +[[package]] +name = "ipython-pygments-lexers" +version = "1.1.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pygments" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ef/4c/5dd1d8af08107f88c7f741ead7a40854b8ac24ddf9ae850afbcf698aa552/ipython_pygments_lexers-1.1.1.tar.gz", hash = "sha256:09c0138009e56b6854f9535736f4171d855c8c08a563a0dcd8022f78355c7e81", size = 8393, upload-time = "2025-01-17T11:24:34.505Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d9/33/1f075bf72b0b747cb3288d011319aaf64083cf2efef8354174e3ed4540e2/ipython_pygments_lexers-1.1.1-py3-none-any.whl", hash = "sha256:a9462224a505ade19a605f71f8fa63c2048833ce50abc86768a0d81d876dc81c", size = 8074, upload-time = "2025-01-17T11:24:33.271Z" }, +] + +[[package]] +name = "jedi" +version = "0.19.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "parso" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/72/3a/79a912fbd4d8dd6fbb02bf69afd3bb72cf0c729bb3063c6f4498603db17a/jedi-0.19.2.tar.gz", hash = "sha256:4770dc3de41bde3966b02eb84fbcf557fb33cce26ad23da12c742fb50ecb11f0", size = 1231287, upload-time = "2024-11-11T01:41:42.873Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c0/5a/9cac0c82afec3d09ccd97c8b6502d48f165f9124db81b4bcb90b4af974ee/jedi-0.19.2-py2.py3-none-any.whl", hash = "sha256:a8ef22bde8490f57fe5c7681a3c83cb58874daf72b4784de3cce5b6ef6edb5b9", size = 1572278, upload-time = "2024-11-11T01:41:40.175Z" }, +] + +[[package]] +name = "matplotlib-inline" +version = "0.1.7" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "traitlets" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/99/5b/a36a337438a14116b16480db471ad061c36c3694df7c2084a0da7ba538b7/matplotlib_inline-0.1.7.tar.gz", hash = "sha256:8423b23ec666be3d16e16b60bdd8ac4e86e840ebd1dd11a30b9f117f2fa0ab90", size = 8159, upload-time = "2024-04-15T13:44:44.803Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8f/8e/9ad090d3553c280a8060fbf6e24dc1c0c29704ee7d1c372f0c174aa59285/matplotlib_inline-0.1.7-py3-none-any.whl", hash = "sha256:df192d39a4ff8f21b1895d72e6a13f5fcc5099f00fa84384e0ea28c2cc0653ca", size = 9899, upload-time = "2024-04-15T13:44:43.265Z" }, +] + +[[package]] +name = "numpy" +version = "2.2.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/76/21/7d2a95e4bba9dc13d043ee156a356c0a8f0c6309dff6b21b4d71a073b8a8/numpy-2.2.6.tar.gz", hash = "sha256:e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd", size = 20276440, upload-time = "2025-05-17T22:38:04.611Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/82/5d/c00588b6cf18e1da539b45d3598d3557084990dcc4331960c15ee776ee41/numpy-2.2.6-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:41c5a21f4a04fa86436124d388f6ed60a9343a6f767fced1a8a71c3fbca038ff", size = 20875348, upload-time = "2025-05-17T21:34:39.648Z" }, + { url = "https://files.pythonhosted.org/packages/66/ee/560deadcdde6c2f90200450d5938f63a34b37e27ebff162810f716f6a230/numpy-2.2.6-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:de749064336d37e340f640b05f24e9e3dd678c57318c7289d222a8a2f543e90c", size = 14119362, upload-time = "2025-05-17T21:35:01.241Z" }, + { url = "https://files.pythonhosted.org/packages/3c/65/4baa99f1c53b30adf0acd9a5519078871ddde8d2339dc5a7fde80d9d87da/numpy-2.2.6-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:894b3a42502226a1cac872f840030665f33326fc3dac8e57c607905773cdcde3", size = 5084103, upload-time = "2025-05-17T21:35:10.622Z" }, + { url = "https://files.pythonhosted.org/packages/cc/89/e5a34c071a0570cc40c9a54eb472d113eea6d002e9ae12bb3a8407fb912e/numpy-2.2.6-cp312-cp312-macosx_14_0_x86_64.whl", hash = "sha256:71594f7c51a18e728451bb50cc60a3ce4e6538822731b2933209a1f3614e9282", size = 6625382, upload-time = "2025-05-17T21:35:21.414Z" }, + { url = "https://files.pythonhosted.org/packages/f8/35/8c80729f1ff76b3921d5c9487c7ac3de9b2a103b1cd05e905b3090513510/numpy-2.2.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f2618db89be1b4e05f7a1a847a9c1c0abd63e63a1607d892dd54668dd92faf87", size = 14018462, upload-time = "2025-05-17T21:35:42.174Z" }, + { url = "https://files.pythonhosted.org/packages/8c/3d/1e1db36cfd41f895d266b103df00ca5b3cbe965184df824dec5c08c6b803/numpy-2.2.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd83c01228a688733f1ded5201c678f0c53ecc1006ffbc404db9f7a899ac6249", size = 16527618, upload-time = "2025-05-17T21:36:06.711Z" }, + { url = "https://files.pythonhosted.org/packages/61/c6/03ed30992602c85aa3cd95b9070a514f8b3c33e31124694438d88809ae36/numpy-2.2.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:37c0ca431f82cd5fa716eca9506aefcabc247fb27ba69c5062a6d3ade8cf8f49", size = 15505511, upload-time = "2025-05-17T21:36:29.965Z" }, + { url = "https://files.pythonhosted.org/packages/b7/25/5761d832a81df431e260719ec45de696414266613c9ee268394dd5ad8236/numpy-2.2.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fe27749d33bb772c80dcd84ae7e8df2adc920ae8297400dabec45f0dedb3f6de", size = 18313783, upload-time = "2025-05-17T21:36:56.883Z" }, + { url = "https://files.pythonhosted.org/packages/57/0a/72d5a3527c5ebffcd47bde9162c39fae1f90138c961e5296491ce778e682/numpy-2.2.6-cp312-cp312-win32.whl", hash = "sha256:4eeaae00d789f66c7a25ac5f34b71a7035bb474e679f410e5e1a94deb24cf2d4", size = 6246506, upload-time = "2025-05-17T21:37:07.368Z" }, + { url = "https://files.pythonhosted.org/packages/36/fa/8c9210162ca1b88529ab76b41ba02d433fd54fecaf6feb70ef9f124683f1/numpy-2.2.6-cp312-cp312-win_amd64.whl", hash = "sha256:c1f9540be57940698ed329904db803cf7a402f3fc200bfe599334c9bd84a40b2", size = 12614190, upload-time = "2025-05-17T21:37:26.213Z" }, + { url = "https://files.pythonhosted.org/packages/f9/5c/6657823f4f594f72b5471f1db1ab12e26e890bb2e41897522d134d2a3e81/numpy-2.2.6-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0811bb762109d9708cca4d0b13c4f67146e3c3b7cf8d34018c722adb2d957c84", size = 20867828, upload-time = "2025-05-17T21:37:56.699Z" }, + { url = "https://files.pythonhosted.org/packages/dc/9e/14520dc3dadf3c803473bd07e9b2bd1b69bc583cb2497b47000fed2fa92f/numpy-2.2.6-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:287cc3162b6f01463ccd86be154f284d0893d2b3ed7292439ea97eafa8170e0b", size = 14143006, upload-time = "2025-05-17T21:38:18.291Z" }, + { url = "https://files.pythonhosted.org/packages/4f/06/7e96c57d90bebdce9918412087fc22ca9851cceaf5567a45c1f404480e9e/numpy-2.2.6-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:f1372f041402e37e5e633e586f62aa53de2eac8d98cbfb822806ce4bbefcb74d", size = 5076765, upload-time = "2025-05-17T21:38:27.319Z" }, + { url = "https://files.pythonhosted.org/packages/73/ed/63d920c23b4289fdac96ddbdd6132e9427790977d5457cd132f18e76eae0/numpy-2.2.6-cp313-cp313-macosx_14_0_x86_64.whl", hash = "sha256:55a4d33fa519660d69614a9fad433be87e5252f4b03850642f88993f7b2ca566", size = 6617736, upload-time = "2025-05-17T21:38:38.141Z" }, + { url = "https://files.pythonhosted.org/packages/85/c5/e19c8f99d83fd377ec8c7e0cf627a8049746da54afc24ef0a0cb73d5dfb5/numpy-2.2.6-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f92729c95468a2f4f15e9bb94c432a9229d0d50de67304399627a943201baa2f", size = 14010719, upload-time = "2025-05-17T21:38:58.433Z" }, + { url = "https://files.pythonhosted.org/packages/19/49/4df9123aafa7b539317bf6d342cb6d227e49f7a35b99c287a6109b13dd93/numpy-2.2.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1bc23a79bfabc5d056d106f9befb8d50c31ced2fbc70eedb8155aec74a45798f", size = 16526072, upload-time = "2025-05-17T21:39:22.638Z" }, + { url = "https://files.pythonhosted.org/packages/b2/6c/04b5f47f4f32f7c2b0e7260442a8cbcf8168b0e1a41ff1495da42f42a14f/numpy-2.2.6-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e3143e4451880bed956e706a3220b4e5cf6172ef05fcc397f6f36a550b1dd868", size = 15503213, upload-time = "2025-05-17T21:39:45.865Z" }, + { url = "https://files.pythonhosted.org/packages/17/0a/5cd92e352c1307640d5b6fec1b2ffb06cd0dabe7d7b8227f97933d378422/numpy-2.2.6-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b4f13750ce79751586ae2eb824ba7e1e8dba64784086c98cdbbcc6a42112ce0d", size = 18316632, upload-time = "2025-05-17T21:40:13.331Z" }, + { url = "https://files.pythonhosted.org/packages/f0/3b/5cba2b1d88760ef86596ad0f3d484b1cbff7c115ae2429678465057c5155/numpy-2.2.6-cp313-cp313-win32.whl", hash = "sha256:5beb72339d9d4fa36522fc63802f469b13cdbe4fdab4a288f0c441b74272ebfd", size = 6244532, upload-time = "2025-05-17T21:43:46.099Z" }, + { url = "https://files.pythonhosted.org/packages/cb/3b/d58c12eafcb298d4e6d0d40216866ab15f59e55d148a5658bb3132311fcf/numpy-2.2.6-cp313-cp313-win_amd64.whl", hash = "sha256:b0544343a702fa80c95ad5d3d608ea3599dd54d4632df855e4c8d24eb6ecfa1c", size = 12610885, upload-time = "2025-05-17T21:44:05.145Z" }, + { url = "https://files.pythonhosted.org/packages/6b/9e/4bf918b818e516322db999ac25d00c75788ddfd2d2ade4fa66f1f38097e1/numpy-2.2.6-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:0bca768cd85ae743b2affdc762d617eddf3bcf8724435498a1e80132d04879e6", size = 20963467, upload-time = "2025-05-17T21:40:44Z" }, + { url = "https://files.pythonhosted.org/packages/61/66/d2de6b291507517ff2e438e13ff7b1e2cdbdb7cb40b3ed475377aece69f9/numpy-2.2.6-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:fc0c5673685c508a142ca65209b4e79ed6740a4ed6b2267dbba90f34b0b3cfda", size = 14225144, upload-time = "2025-05-17T21:41:05.695Z" }, + { url = "https://files.pythonhosted.org/packages/e4/25/480387655407ead912e28ba3a820bc69af9adf13bcbe40b299d454ec011f/numpy-2.2.6-cp313-cp313t-macosx_14_0_arm64.whl", hash = "sha256:5bd4fc3ac8926b3819797a7c0e2631eb889b4118a9898c84f585a54d475b7e40", size = 5200217, upload-time = "2025-05-17T21:41:15.903Z" }, + { url = "https://files.pythonhosted.org/packages/aa/4a/6e313b5108f53dcbf3aca0c0f3e9c92f4c10ce57a0a721851f9785872895/numpy-2.2.6-cp313-cp313t-macosx_14_0_x86_64.whl", hash = "sha256:fee4236c876c4e8369388054d02d0e9bb84821feb1a64dd59e137e6511a551f8", size = 6712014, upload-time = "2025-05-17T21:41:27.321Z" }, + { url = "https://files.pythonhosted.org/packages/b7/30/172c2d5c4be71fdf476e9de553443cf8e25feddbe185e0bd88b096915bcc/numpy-2.2.6-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e1dda9c7e08dc141e0247a5b8f49cf05984955246a327d4c48bda16821947b2f", size = 14077935, upload-time = "2025-05-17T21:41:49.738Z" }, + { url = "https://files.pythonhosted.org/packages/12/fb/9e743f8d4e4d3c710902cf87af3512082ae3d43b945d5d16563f26ec251d/numpy-2.2.6-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f447e6acb680fd307f40d3da4852208af94afdfab89cf850986c3ca00562f4fa", size = 16600122, upload-time = "2025-05-17T21:42:14.046Z" }, + { url = "https://files.pythonhosted.org/packages/12/75/ee20da0e58d3a66f204f38916757e01e33a9737d0b22373b3eb5a27358f9/numpy-2.2.6-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:389d771b1623ec92636b0786bc4ae56abafad4a4c513d36a55dce14bd9ce8571", size = 15586143, upload-time = "2025-05-17T21:42:37.464Z" }, + { url = "https://files.pythonhosted.org/packages/76/95/bef5b37f29fc5e739947e9ce5179ad402875633308504a52d188302319c8/numpy-2.2.6-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8e9ace4a37db23421249ed236fdcdd457d671e25146786dfc96835cd951aa7c1", size = 18385260, upload-time = "2025-05-17T21:43:05.189Z" }, + { url = "https://files.pythonhosted.org/packages/09/04/f2f83279d287407cf36a7a8053a5abe7be3622a4363337338f2585e4afda/numpy-2.2.6-cp313-cp313t-win32.whl", hash = "sha256:038613e9fb8c72b0a41f025a7e4c3f0b7a1b5d768ece4796b674c8f3fe13efff", size = 6377225, upload-time = "2025-05-17T21:43:16.254Z" }, + { url = "https://files.pythonhosted.org/packages/67/0e/35082d13c09c02c011cf21570543d202ad929d961c02a147493cb0c2bdf5/numpy-2.2.6-cp313-cp313t-win_amd64.whl", hash = "sha256:6031dd6dfecc0cf9f668681a37648373bddd6421fff6c66ec1624eed0180ee06", size = 12771374, upload-time = "2025-05-17T21:43:35.479Z" }, +] + +[[package]] +name = "parso" +version = "0.8.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/66/94/68e2e17afaa9169cf6412ab0f28623903be73d1b32e208d9e8e541bb086d/parso-0.8.4.tar.gz", hash = "sha256:eb3a7b58240fb99099a345571deecc0f9540ea5f4dd2fe14c2a99d6b281ab92d", size = 400609, upload-time = "2024-04-05T09:43:55.897Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c6/ac/dac4a63f978e4dcb3c6d3a78c4d8e0192a113d288502a1216950c41b1027/parso-0.8.4-py2.py3-none-any.whl", hash = "sha256:a418670a20291dacd2dddc80c377c5c3791378ee1e8d12bffc35420643d43f18", size = 103650, upload-time = "2024-04-05T09:43:53.299Z" }, +] + +[[package]] +name = "pexpect" +version = "4.9.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "ptyprocess" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz", hash = "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f", size = 166450, upload-time = "2023-11-25T09:07:26.339Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9e/c3/059298687310d527a58bb01f3b1965787ee3b40dce76752eda8b44e9a2c5/pexpect-4.9.0-py2.py3-none-any.whl", hash = "sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523", size = 63772, upload-time = "2023-11-25T06:56:14.81Z" }, +] + +[[package]] +name = "prompt-toolkit" +version = "3.0.51" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "wcwidth" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/bb/6e/9d084c929dfe9e3bfe0c6a47e31f78a25c54627d64a66e884a8bf5474f1c/prompt_toolkit-3.0.51.tar.gz", hash = "sha256:931a162e3b27fc90c86f1b48bb1fb2c528c2761475e57c9c06de13311c7b54ed", size = 428940, upload-time = "2025-04-15T09:18:47.731Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ce/4f/5249960887b1fbe561d9ff265496d170b55a735b76724f10ef19f9e40716/prompt_toolkit-3.0.51-py3-none-any.whl", hash = "sha256:52742911fde84e2d423e2f9a4cf1de7d7ac4e51958f648d9540e0fb8db077b07", size = 387810, upload-time = "2025-04-15T09:18:44.753Z" }, +] + +[[package]] +name = "ptpython" +version = "3.0.30" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "appdirs" }, + { name = "jedi" }, + { name = "prompt-toolkit" }, + { name = "pygments" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c9/ce/4441ac40762c73d74b48088a7311e368d28beec92602d66e632a59792a93/ptpython-3.0.30.tar.gz", hash = "sha256:51a07f9b8ebf8435a5aaeb22831cca4a52e87029771a2637df2763c79d3d8776", size = 72812, upload-time = "2025-04-15T09:26:37.534Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/05/15/77dfd9a52fa6c87b50232b246df0cfacacc0665c95ebe4a517cc994819f0/ptpython-3.0.30-py3-none-any.whl", hash = "sha256:bec3045f0285ac817c902ef98d6ece31d3e00a4604ef3fdde07d365c78bde23c", size = 67249, upload-time = "2025-04-15T09:26:35.693Z" }, +] + +[[package]] +name = "ptyprocess" +version = "0.7.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/20/e5/16ff212c1e452235a90aeb09066144d0c5a6a8c0834397e03f5224495c4e/ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220", size = 70762, upload-time = "2020-12-28T15:15:30.155Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/22/a6/858897256d0deac81a172289110f31629fc4cee19b6f01283303e18c8db3/ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35", size = 13993, upload-time = "2020-12-28T15:15:28.35Z" }, +] + +[[package]] +name = "pure-eval" +version = "0.2.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/cd/05/0a34433a064256a578f1783a10da6df098ceaa4a57bbeaa96a6c0352786b/pure_eval-0.2.3.tar.gz", hash = "sha256:5f4e983f40564c576c7c8635ae88db5956bb2229d7e9237d03b3c0b0190eaf42", size = 19752, upload-time = "2024-07-21T12:58:21.801Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8e/37/efad0257dc6e593a18957422533ff0f87ede7c9c6ea010a2177d738fb82f/pure_eval-0.2.3-py3-none-any.whl", hash = "sha256:1db8e35b67b3d218d818ae653e27f06c3aa420901fa7b081ca98cbedc874e0d0", size = 11842, upload-time = "2024-07-21T12:58:20.04Z" }, +] + +[[package]] +name = "pygments" +version = "2.19.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7c/2d/c3338d48ea6cc0feb8446d8e6937e1408088a72a39937982cc6111d17f84/pygments-2.19.1.tar.gz", hash = "sha256:61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f", size = 4968581, upload-time = "2025-01-06T17:26:30.443Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8a/0b/9fcc47d19c48b59121088dd6da2488a49d5f72dacf8262e2790a1d2c7d15/pygments-2.19.1-py3-none-any.whl", hash = "sha256:9ea1544ad55cecf4b8242fab6dd35a93bbce657034b0611ee383099054ab6d8c", size = 1225293, upload-time = "2025-01-06T17:26:25.553Z" }, +] + +[[package]] +name = "python" +version = "0.1.0" +source = { editable = "." } +dependencies = [ + { name = "numpy" }, +] + +[package.dev-dependencies] +dev = [ + { name = "ipython" }, + { name = "ptpython" }, +] + +[package.metadata] +requires-dist = [{ name = "numpy", specifier = ">=2.2.6" }] + +[package.metadata.requires-dev] +dev = [ + { name = "ipython", specifier = ">=9.2.0" }, + { name = "ptpython", specifier = ">=3.0.30" }, +] + +[[package]] +name = "stack-data" +version = "0.6.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "asttokens" }, + { name = "executing" }, + { name = "pure-eval" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/28/e3/55dcc2cfbc3ca9c29519eb6884dd1415ecb53b0e934862d3559ddcb7e20b/stack_data-0.6.3.tar.gz", hash = "sha256:836a778de4fec4dcd1dcd89ed8abff8a221f58308462e1c4aa2a3cf30148f0b9", size = 44707, upload-time = "2023-09-30T13:58:05.479Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f1/7b/ce1eafaf1a76852e2ec9b22edecf1daa58175c090266e9f6c64afcd81d91/stack_data-0.6.3-py3-none-any.whl", hash = "sha256:d5558e0c25a4cb0853cddad3d77da9891a08cb85dd9f9f91b9f8cd66e511e695", size = 24521, upload-time = "2023-09-30T13:58:03.53Z" }, +] + +[[package]] +name = "traitlets" +version = "5.14.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/eb/79/72064e6a701c2183016abbbfedaba506d81e30e232a68c9f0d6f6fcd1574/traitlets-5.14.3.tar.gz", hash = "sha256:9ed0579d3502c94b4b3732ac120375cda96f923114522847de4b3bb98b96b6b7", size = 161621, upload-time = "2024-04-19T11:11:49.746Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/00/c0/8f5d070730d7836adc9c9b6408dec68c6ced86b304a9b26a14df072a6e8c/traitlets-5.14.3-py3-none-any.whl", hash = "sha256:b74e89e397b1ed28cc831db7aea759ba6640cb3de13090ca145426688ff1ac4f", size = 85359, upload-time = "2024-04-19T11:11:46.763Z" }, +] + +[[package]] +name = "wcwidth" +version = "0.2.13" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/6c/63/53559446a878410fc5a5974feb13d31d78d752eb18aeba59c7fef1af7598/wcwidth-0.2.13.tar.gz", hash = "sha256:72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5", size = 101301, upload-time = "2024-01-06T02:10:57.829Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fd/84/fd2ba7aafacbad3c4201d395674fc6348826569da3c0937e75505ead3528/wcwidth-0.2.13-py2.py3-none-any.whl", hash = "sha256:3da69048e4540d84af32131829ff948f1e022c1c6bdb8d6102117aac784f6859", size = 34166, upload-time = "2024-01-06T02:10:55.763Z" }, +] diff --git a/templates/rust/.cargo/audit.toml b/templates/rust/.cargo/audit.toml new file mode 100644 index 0000000..c81ec0e --- /dev/null +++ b/templates/rust/.cargo/audit.toml @@ -0,0 +1,25 @@ +[advisories] +ignore = [] # advisory IDs to ignore e.g. ["RUSTSEC-2019-0001", ...] +informational_warnings = [ + "unmaintained", +] # warn for categories of informational advisories +severity_threshold = "low" # CVSS severity ("none", "low", "medium", "high", "critical") + +[database] +url = "https://github.com/RustSec/advisory-db.git" +fetch = true +stale = false + +[output] +deny = ["unmaintained"] # exit on error if unmaintained dependencies are found +format = "terminal" # "terminal" (human readable report) or "json" +quiet = false # Only print information on error +show_tree = true + +[target] +arch = ["x86_64"] +os = ["linux", "windows"] + +[yanked] +enabled = true +update_index = true diff --git a/templates/rust/.envrc b/templates/rust/.envrc new file mode 100644 index 0000000..5e5ab08 --- /dev/null +++ b/templates/rust/.envrc @@ -0,0 +1,3 @@ +watch_file rust-toolchain.toml nix/*.nix + +use flake diff --git a/templates/rust/.gitignore b/templates/rust/.gitignore new file mode 100644 index 0000000..4ceb593 --- /dev/null +++ b/templates/rust/.gitignore @@ -0,0 +1,119 @@ +###----------------### +### GitHub: Rust ### +###----------------### + +# Generated by Cargo +# will have compiled files and executables +debug/ +target/ + +# These are backup files generated by rustfmt +**/*.rs.bk + +# MSVC Windows builds of rustc generate these, which store debugging information +*.pdb + +# Generated by cargo mutants +# Contains mutation testing data +**/mutants.out*/ + +# RustRover +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ + +###----------------------------### +### GitHub Global: JetBrains ### +###----------------------------### + +# Covers JetBrains IDEs: IntelliJ, GoLand, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ +.idea/sonarlint.xml # see https://community.sonarsource.com/t/is-the-file-idea-idea-idea-sonarlint-xml-intended-to-be-under-source-control/121119 + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +###---------------### +### GitHub: Nix ### +###---------------### + +# Ignore build outputs from performing a nix-build or `nix build` command +result +result-* + +# Ignore automatically generated direnv output +.direnv diff --git a/templates/rust/.rustfmt.toml b/templates/rust/.rustfmt.toml new file mode 100644 index 0000000..7f8e98f --- /dev/null +++ b/templates/rust/.rustfmt.toml @@ -0,0 +1,17 @@ +edition = "2024" +merge_derives = true +newline_style = "Unix" +reorder_imports = true +reorder_modules = true +use_field_init_shorthand = true +use_try_shorthand = true +# unstable_features = true +# format_code_in_doc_comments = true +# format_macro_bodies = true +# format_strings = true +# float_literal_trailing_zero = "IfNoPostfix" +# imports_granularity = "Crate" +# overflow_delimited_expr = true +# reorder_impl_items = true +# group_imports = "StdExternalCrate" +# wrap_comments = true diff --git a/templates/rust/Cargo.lock b/templates/rust/Cargo.lock new file mode 100644 index 0000000..da9ac51 --- /dev/null +++ b/templates/rust/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "rust-demo" +version = "0.1.0" diff --git a/templates/rust/Cargo.toml b/templates/rust/Cargo.toml new file mode 100644 index 0000000..f61d055 --- /dev/null +++ b/templates/rust/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "rust-demo" +version = "0.1.0" +edition = "2024" +license = "GPL-3.0-or-later" + +[dependencies] diff --git a/templates/rust/LICENSE-GPL-3.0-or-later b/templates/rust/LICENSE-GPL-3.0-or-later new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/templates/rust/LICENSE-GPL-3.0-or-later @@ -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/templates/rust/deny.toml b/templates/rust/deny.toml new file mode 100644 index 0000000..6f58a9b --- /dev/null +++ b/templates/rust/deny.toml @@ -0,0 +1,236 @@ +# This template contains all of the possible sections and their default values + +# Note that all fields that take a lint level have these possible values: +# * deny - An error will be produced and the check will fail +# * warn - A warning will be produced, but the check will not fail +# * allow - No warning or error will be produced, though in some cases a note +# will be + +# The values provided in this template are the default values that will be used +# when any section or field is not specified in your own configuration + +# Root options + +# The graph table configures how the dependency graph is constructed and thus +# which crates the checks are performed against +[graph] +# If 1 or more target triples (and optionally, target_features) are specified, +# only the specified targets will be checked when running `cargo deny check`. +# This means, if a particular package is only ever used as a target specific +# dependency, such as, for example, the `nix` crate only being used via the +# `target_family = "unix"` configuration, that only having windows targets in +# this list would mean the nix crate, as well as any of its exclusive +# dependencies not shared by any other crates, would be ignored, as the target +# list here is effectively saying which targets you are building for. +targets = [ + # The triple can be any string, but only the target triples built in to + # rustc (as of 1.40) can be checked against actual config expressions + # "x86_64-unknown-linux-musl", + # You can also specify which target_features you promise are enabled for a + # particular target. target_features are currently not validated against + # the actual valid features supported by the target architecture. + # { triple = "wasm32-unknown-unknown", features = ["atomics"] }, +] +# When creating the dependency graph used as the source of truth when checks are +# executed, this field can be used to prune crates from the graph, removing them +# from the view of cargo-deny. This is an extremely heavy hammer, as if a crate +# is pruned from the graph, all of its dependencies will also be pruned unless +# they are connected to another crate in the graph that hasn't been pruned, +# so it should be used with care. The identifiers are [Package ID Specifications] +# (https://doc.rust-lang.org/cargo/reference/pkgid-spec.html) +# exclude = [] +# If true, metadata will be collected with `--all-features`. Note that this can't +# be toggled off if true, if you want to conditionally enable `--all-features` it +# is recommended to pass `--all-features` on the cmd line instead +all-features = false +# If true, metadata will be collected with `--no-default-features`. The same +# caveat with `all-features` applies +no-default-features = false +# If set, these feature will be enabled when collecting metadata. If `--features` +# is specified on the cmd line they will take precedence over this option. +# features = [] + +# The output table provides options for how/if diagnostics are outputted +[output] +# When outputting inclusion graphs in diagnostics that include features, this +# option can be used to specify the depth at which feature edges will be added. +# This option is included since the graphs can be quite large and the addition +# of features from the crate(s) to all of the graph roots can be far too verbose. +# This option can be overridden via `--feature-depth` on the cmd line +feature-depth = 1 + +# This section is considered when running `cargo deny check advisories` +# More documentation for the advisories section can be found here: +# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html +[advisories] +# The path where the advisory databases are cloned/fetched into +# db-path = "$CARGO_HOME/advisory-dbs" +# The url(s) of the advisory databases to use +# db-urls = ["https://github.com/rustsec/advisory-db"] +# A list of advisory IDs to ignore. Note that ignored advisories will still +# output a note when they are encountered. +ignore = [ + # "RUSTSEC-0000-0000", + # { id = "RUSTSEC-0000-0000", reason = "you can specify a reason the advisory is ignored" }, + # "a-crate-that-is-yanked@0.1.1", # you can also ignore yanked crate versions if you wish + # { crate = "a-crate-that-is-yanked@0.1.1", reason = "you can specify why you are ignoring the yanked crate" }, +] +# If this is true, then cargo deny will use the git executable to fetch advisory database. +# If this is false, then it uses a built-in git library. +# Setting this to true can be helpful if you have special authentication requirements that cargo-deny does not support. +# See Git Authentication for more information about setting up git authentication. +# git-fetch-with-cli = true + +# This section is considered when running `cargo deny check licenses` +# More documentation for the licenses section can be found here: +# https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html +[licenses] +# List of explicitly allowed licenses +# See https://spdx.org/licenses/ for list of possible licenses +# [possible values: any SPDX 3.11 short identifier (+ optional exception)]. +allow = [ + "MIT", + # "Apache-2.0", + # "Apache-2.0 WITH LLVM-exception", + "GPL-3.0", +] +# The confidence threshold for detecting a license from license text. +# The higher the value, the more closely the license text must be to the +# canonical license text of a valid SPDX license file. +# [possible values: any between 0.0 and 1.0]. +confidence-threshold = 0.8 +# Allow 1 or more licenses on a per-crate basis, so that particular licenses +# aren't accepted for every possible crate as with the normal allow list +exceptions = [ + # Each entry is the crate and version constraint, and its specific allow + # list + # { allow = ["Zlib"], crate = "adler32" }, +] + +# Some crates don't have (easily) machine readable licensing information, +# adding a clarification entry for it allows you to manually specify the +# licensing information +# [[licenses.clarify]] +# The package spec the clarification applies to +# crate = "ring" +# The SPDX expression for the license requirements of the crate +# expression = "MIT AND ISC AND OpenSSL" +# One or more files in the crate's source used as the "source of truth" for +# the license expression. If the contents match, the clarification will be used +# when running the license check, otherwise the clarification will be ignored +# and the crate will be checked normally, which may produce warnings or errors +# depending on the rest of your configuration +# license-files = [ +# Each entry is a crate relative path, and the (opaque) hash of its contents +# { path = "LICENSE", hash = 0xbd0eed23 } +# ] + +[licenses.private] +# If true, ignores workspace crates that aren't published, or are only +# published to private registries. +# To see how to mark a crate as unpublished (to the official registry), +# visit https://doc.rust-lang.org/cargo/reference/manifest.html#the-publish-field. +ignore = false +# One or more private registries that you might publish crates to, if a crate +# is only published to private registries, and ignore is true, the crate will +# not have its license(s) checked +registries = [ + # "https://sekretz.com/registry +] + +# This section is considered when running `cargo deny check bans`. +# More documentation about the 'bans' section can be found here: +# https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html +[bans] +# Lint level for when multiple versions of the same crate are detected +multiple-versions = "warn" +# Lint level for when a crate version requirement is `*` +wildcards = "allow" +# The graph highlighting used when creating dotgraphs for crates +# with multiple versions +# * lowest-version - The path to the lowest versioned duplicate is highlighted +# * simplest-path - The path to the version with the fewest edges is highlighted +# * all - Both lowest-version and simplest-path are used +highlight = "all" +# The default lint level for `default` features for crates that are members of +# the workspace that is being checked. This can be overridden by allowing/denying +# `default` on a crate-by-crate basis if desired. +workspace-default-features = "allow" +# The default lint level for `default` features for external crates that are not +# members of the workspace. This can be overridden by allowing/denying `default` +# on a crate-by-crate basis if desired. +external-default-features = "allow" +# List of crates that are allowed. Use with care! +allow = [ + # "ansi_term@0.11.0", + # { crate = "ansi_term@0.11.0", reason = "you can specify a reason it is allowed" }, +] +# List of crates to deny +deny = [ + # "ansi_term@0.11.0", + # { crate = "ansi_term@0.11.0", reason = "you can specify a reason it is banned" }, + # Wrapper crates can optionally be specified to allow the crate when it + # is a direct dependency of the otherwise banned crate + # { crate = "ansi_term@0.11.0", wrappers = ["this-crate-directly-depends-on-ansi_term"] }, +] + +# List of features to allow/deny +# Each entry the name of a crate and a version range. If version is +# not specified, all versions will be matched. +# [[bans.features]] +# crate = "reqwest" +# Features to not allow +# deny = ["json"] +# Features to allow +# allow = [ +# "rustls", +# "__rustls", +# "__tls", +# "hyper-rustls", +# "rustls", +# "rustls-pemfile", +# "rustls-tls-webpki-roots", +# "tokio-rustls", +# "webpki-roots", +# ] +# If true, the allowed features must exactly match the enabled feature set. If +# this is set there is no point setting `deny` +# exact = true + +# Certain crates/versions that will be skipped when doing duplicate detection. +skip = [ + # "ansi_term@0.11.0", + # { crate = "ansi_term@0.11.0", reason = "you can specify a reason why it can't be updated/removed" }, +] +# Similarly to `skip` allows you to skip certain crates during duplicate +# detection. Unlike skip, it also includes the entire tree of transitive +# dependencies starting at the specified crate, up to a certain depth, which is +# by default infinite. +skip-tree = [ + # "ansi_term@0.11.0", # will be skipped along with _all_ of its direct and transitive dependencies + # { crate = "ansi_term@0.11.0", depth = 20 }, +] + +# This section is considered when running `cargo deny check sources`. +# More documentation about the 'sources' section can be found here: +# https://embarkstudios.github.io/cargo-deny/checks/sources/cfg.html +[sources] +# Lint level for what to happen when a crate from a crate registry that is not +# in the allow list is encountered +unknown-registry = "warn" +# Lint level for what to happen when a crate from a git repository that is not +# in the allow list is encountered +unknown-git = "warn" +# List of URLs for allowed crate registries. Defaults to the crates.io index +# if not specified. If it is specified but empty, no registries are allowed. +allow-registry = ["https://github.com/rust-lang/crates.io-index"] +# List of URLs for allowed Git repositories +allow-git = [] + +[sources.allow-org] +# github.com organizations to allow git sources for +github = [] +# gitlab.com organizations to allow git sources for +gitlab = [] +# bitbucket.org organizations to allow git sources for +bitbucket = [] diff --git a/templates/rust/flake.lock b/templates/rust/flake.lock new file mode 100644 index 0000000..86e35b4 --- /dev/null +++ b/templates/rust/flake.lock @@ -0,0 +1,175 @@ +{ + "nodes": { + "advisory-db": { + "flake": false, + "locked": { + "lastModified": 1747937073, + "narHash": "sha256-52H8P6jAHEwRvg7rXr4Z7h1KHZivO8T1Z9tN6R0SWJg=", + "owner": "rustsec", + "repo": "advisory-db", + "rev": "bccf313a98c034573ac4170e6271749113343d97", + "type": "github" + }, + "original": { + "owner": "rustsec", + "repo": "advisory-db", + "type": "github" + } + }, + "crane": { + "locked": { + "lastModified": 1748047550, + "narHash": "sha256-t0qLLqb4C1rdtiY8IFRH5KIapTY/n3Lqt57AmxEv9mk=", + "owner": "ipetkov", + "repo": "crane", + "rev": "b718a78696060df6280196a6f992d04c87a16aef", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1747958103, + "narHash": "sha256-qmmFCrfBwSHoWw7cVK4Aj+fns+c54EBP8cGqp/yK410=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "fe51d34885f7b5e3e7b59572796e1bcb427eccb1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat", + "gitignore": "gitignore", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1747372754, + "narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "root": { + "inputs": { + "advisory-db": "advisory-db", + "crane": "crane", + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "pre-commit-hooks": "pre-commit-hooks", + "rust-overlay": "rust-overlay" + } + }, + "rust-overlay": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1748140821, + "narHash": "sha256-GZcjWLQtDifSYMd1ueLDmuVTcQQdD5mONIBTqABooOk=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "476b2ba7dc99ddbf70b1f45357dbbdbdbdfb4422", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/templates/rust/flake.nix b/templates/rust/flake.nix new file mode 100644 index 0000000..0a22d97 --- /dev/null +++ b/templates/rust/flake.nix @@ -0,0 +1,166 @@ +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + flake-utils = { + url = "github:numtide/flake-utils"; + }; + rust-overlay = { + url = "github:oxalica/rust-overlay"; + inputs = { + nixpkgs.follows = "nixpkgs"; + }; + }; + advisory-db = { + url = "github:rustsec/advisory-db"; + flake = false; + }; + crane = { + url = "github:ipetkov/crane"; + }; + pre-commit-hooks = { + url = "github:cachix/git-hooks.nix"; + inputs = { + nixpkgs.follows = "nixpkgs"; + }; + }; + }; + outputs = { + self, + flake-utils, + nixpkgs, + rust-overlay, + advisory-db, + crane, + pre-commit-hooks, + ... + }: + flake-utils.lib.eachDefaultSystem ( + system: let + inherit (pkgs) lib; + pkgs = import nixpkgs { + localSystem = {inherit system;}; + overlays = [ + (import rust-overlay) + (_final: prev: { + lib = prev.lib // (import ./nix/lib.nix prev.lib); + }) + ]; + }; + rustToolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; + craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchain; + srcFilters = path: type: + builtins.any (lib.flip lib.hasSuffix path) [ + ".sql" + ".diff" + ".md" + ".adoc" + ".json" + ] + || (craneLib.filterCargoSources path type); + src = lib.cleanSourceWith { + src = ./.; + filter = srcFilters; + }; + basicArgs = { + inherit src; + strictDeps = true; + }; + nativeBuildInputs = []; + buildInputs = []; + genInputs = lib.genInputsWith pkgs; + commonArgs = + basicArgs + // { + cargoArtifacts = self.packages.${system}.cargo-artifacts; + buildInputs = genInputs buildInputs; + nativeBuildInputs = genInputs nativeBuildInputs; + }; + in { + formatter = pkgs.alejandra; + checks = { + pre-commit-check = pre-commit-hooks.lib.${system}.run { + src = ./.; + hooks = { + alejandra = { + enable = true; + }; + rustfmt.enable = true; + cargo-check = { + enable = true; + stages = ["pre-push"]; + }; + clippy = { + enable = true; + stages = ["pre-push"]; + settings.denyWarnings = true; + }; + }; + }; + package = self.packages.${system}.default.overrideAttrs { + doCheck = true; + }; + clippy = craneLib.cargoClippy ( + commonArgs + // { + cargoClippyExtraArgs = "--all-targets -- --deny warnings"; + } + ); + doc = craneLib.cargoDoc commonArgs; + deny = craneLib.cargoDeny commonArgs; + fmt = craneLib.cargoFmt basicArgs; + audit = craneLib.cargoAudit { + inherit src advisory-db; + }; + nextest = craneLib.cargoNextest ( + commonArgs + // { + partitions = 1; + partitionType = "count"; + cargoNextestExtraArgs = "--no-tests pass"; + env = { + CARGO_PROFILE = "dev"; + }; + } + ); + }; + packages = let + callPackage = lib.callPackageWith (pkgs // {inherit craneLib callPackage;}); + packageArgs = { + inherit + lib + basicArgs + buildInputs + nativeBuildInputs + ; + }; + importWithArgs = with lib; flip import packageArgs; + in rec { + cargo-artifacts = callPackage (importWithArgs ./nix/cargo-artifacts.nix) {}; + rust-demo = callPackage (importWithArgs ./nix/package.nix) { + cargoArtifacts = cargo-artifacts; + }; + default = rust-demo; + }; + apps.default = flake-utils.lib.mkApp { + drv = self.packages."${system}".default; + }; + devShells.default = craneLib.devShell { + checks = self.checks.${system}; + shellHook = '''' + self.checks.${system}.pre-commit-check.shellHook; + packages = with pkgs; [ + rust-analyzer + cargo-audit + cargo-deny + cargo-watch + cargo-nextest + ]; + env = { + RUST_SRC_PATH = "${rustToolchain}/lib/rustlib/src/rust/library"; + }; + }; + } + ); + nixConfig = { + keepOutputs = true; + }; +} diff --git a/templates/rust/nix/cargo-artifacts.nix b/templates/rust/nix/cargo-artifacts.nix new file mode 100644 index 0000000..71769a6 --- /dev/null +++ b/templates/rust/nix/cargo-artifacts.nix @@ -0,0 +1,23 @@ +{ + lib, + basicArgs, + buildInputs, + nativeBuildInputs, +}: let + f = { + craneLib, + lib, + ... + } @ args: let + genInputs = lib.genInputsWith args; + in + craneLib.buildDepsOnly ( + basicArgs + // { + buildInputs = genInputs buildInputs; + nativeBuildInputs = genInputs nativeBuildInputs; + } + ); +in + with lib; + setFunctionArgs f ((functionArgs f) // (genFunctionArgs (buildInputs ++ nativeBuildInputs))) diff --git a/templates/rust/nix/lib.nix b/templates/rust/nix/lib.nix new file mode 100644 index 0000000..505e870 --- /dev/null +++ b/templates/rust/nix/lib.nix @@ -0,0 +1,28 @@ +{ + flip, + pipe, + splitString, + head, + listToAttrs, + nameValuePair, + getAttrFromPath, + ... +}: { + genFunctionArgs = flip pipe [ + (map ( + flip pipe [ + (splitString ".") + head + (flip nameValuePair false) + ] + )) + listToAttrs + ]; + genInputsWith = pkgs: + map ( + flip pipe [ + (splitString ".") + (flip getAttrFromPath pkgs) + ] + ); +} diff --git a/templates/rust/nix/package.nix b/templates/rust/nix/package.nix new file mode 100644 index 0000000..938fb6d --- /dev/null +++ b/templates/rust/nix/package.nix @@ -0,0 +1,33 @@ +{ + lib, + basicArgs, + buildInputs, + nativeBuildInputs, +}: let + f = { + craneLib, + lib, + cargoArtifacts, + ... + } @ args: let + genInputs = lib.genInputsWith args; + in + craneLib.buildPackage ( + basicArgs + // { + inherit + (craneLib.crateNameFromCargoToml { + cargoToml = "${toString basicArgs.src}/Cargo.toml"; + }) + pname + version + ; + inherit cargoArtifacts; + buildInputs = genInputs buildInputs; + nativeBuildInputs = genInputs nativeBuildInputs; + doCheck = false; + } + ); +in + with lib; + setFunctionArgs f ((functionArgs f) // (genFunctionArgs (buildInputs ++ nativeBuildInputs))) diff --git a/templates/rust/rust-toolchain.toml b/templates/rust/rust-toolchain.toml new file mode 100644 index 0000000..90e92de --- /dev/null +++ b/templates/rust/rust-toolchain.toml @@ -0,0 +1,4 @@ +[toolchain] +channel = "stable" +components = ["rust-src"] +profile = "default" diff --git a/templates/rust/src/main.rs b/templates/rust/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/templates/rust/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}