diff options
62 files changed, 3944 insertions, 4114 deletions
diff --git a/.guix-channel b/.guix-channel index bae567a..4358798 100644 --- a/.guix-channel +++ b/.guix-channel @@ -1,19 +1,31 @@ (channel - (version 0) - (dependencies - (channel - (introduction - (channel-introduction - (version 0) - (commit "897c1a470da759236cc11798f4e0a5f7d4d59fbc") - (signer "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))) - (name nonguix) - (url "https://gitlab.com/nonguix/nonguix")) - (channel - (introduction - (channel-introduction - (version 0) - (commit "7d17bded11ef1239592e6e5abd40ceee1e99cbb8") - (signer "590E 500F E39D 26B3 E60B 743B 6D81 B120 7711 899F"))) - (name distribution) - (url "https://git.marekpasnikowski.pl/git/distribution.git")))) + (version 0) + (dependencies + (channel + (name mnt-reform-nonguix) + (url "https://git.marekpasnikowski.pl/git/mnt-reform-nonguix.git") + (branch "personal")) + (channel + (introduction + (channel-introduction + (version 0) + (commit "897c1a470da759236cc11798f4e0a5f7d4d59fbc") + (signer "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))) + (name nonguix) + (url "https://gitlab.com/nonguix/nonguix")) + (channel + (introduction + (channel-introduction + (version 0) + (commit "44a44b4c3c645a878ab8920bf0d250541bf59af0") + (signer "590E 500F E39D 26B3 E60B 743B 6D81 B120 7711 899F"))) + (name sovereign) + (url "https://git.marekpasnikowski.pl/git/sovereign.git")) + (channel + (introduction + (channel-introduction + (version 0) + (commit "257cebd587b66e4d865b3537a9a88cccd7107c95") + (signer "28419AC650387440C7E92FFA2208D20958C1DEB0"))) + (name rde) + (url "https://git.sr.ht/~abcdw/rde")))) @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + 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. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + 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 <https://www.gnu.org/licenses/>. + +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: + + <program> Copyright (C) <year> <name of author> + 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 +<https://www.gnu.org/licenses/>. + + 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 +<https://www.gnu.org/licenses/why-not-lgpl.html>. diff --git a/channels.scm b/channels.scm index b28e204..0dbd440 100644 --- a/channels.scm +++ b/channels.scm @@ -1,3 +1,23 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + (define-module (channels) #:use-module (gnu home services guix) #:use-module (gnu services) diff --git a/deployment/gexp.scm b/deployment/gexp.scm new file mode 100644 index 0000000..823b8d2 --- /dev/null +++ b/deployment/gexp.scm @@ -0,0 +1,57 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (deployment gexp) + #:use-module (guix gexp)) + +(define-public aisaka-guix-key + (mixed-text-file "aisaka-guix-key.pub" + "(public-key\n" + " (ecc\n" + " (curve Ed25519)\n" + " (q #983CD313090D2699AD26AE5CB589A29F24A32E247A41EB4F4A22D196DFCD9D3C#)))")) + +(define-public akashi-guix-key + (mixed-text-file "akashi-guix-key.pub" + "(public-key\n" + " (ecc\n" + " (curve Ed25519)\n" + " (q #A3E347D0D79D616C4379C844C1D67DFC9BFD4F2011D4070EB3DB7EFA66D6F3D2#)))")) + +(define-public ayase-guix-key + (mixed-text-file "ayase-guix-key.pub" + "(public-key\n" + " (ecc\n" + " (curve Ed25519)\n" + " (q #B617E8D644A80841BDF060B67EA0772BA1688754F54582CFDEA899FD8010B3AE#)))")) + +(define-public mcdowell-guix-key + (mixed-text-file "mcdowell-guix-key.pub" + "(public-key\n" + " (ecc\n" + " (curve Ed25519)\n" + " (q #FDA720ED167E05AB735182D887A450DCD534A85F2697DE421E49CA043FC01E4D#)))")) + +(define-public rakan-guix-key + (mixed-text-file "rakan-guix-key.pub" + "(public-key\n" + " (ecc\n" + " (curve Ed25519)\n" + " (q #FDA720ED167E05AB735182D887A450DCD534A85F2697DE421E49CA043FC01E4D#)))")) diff --git a/deployment/machine.scm b/deployment/machine.scm new file mode 100644 index 0000000..dfb7dee --- /dev/null +++ b/deployment/machine.scm @@ -0,0 +1,47 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (deployment machine) + #:use-module ((deployment machine ssh) + #:prefix deployment:machine:ssh:) + #:use-module ((deployment system) + #:prefix deployment:system:) + #:use-module ((gnu machine) + #:prefix gnu:machine:) + #:use-module ((gnu machine ssh) + #:prefix gnu:machine:ssh:)) + +(define aisaka-machine + (gnu:machine:machine + (operating-system deployment:system:aisaka) + (environment gnu:machine:ssh:managed-host-environment-type) + (configuration deployment:machine:ssh:aisaka-configuration))) + +(define-public aisaka + (list aisaka-machine)) + +(define akashi-machine + (gnu:machine:machine + (operating-system deployment:system:akashi) + (environment gnu:machine:ssh:managed-host-environment-type) + (configuration deployment:machine:ssh:akashi-configuration))) + +(define-public akashi + (list akashi-machine)) diff --git a/deployment/machine/ssh.scm b/deployment/machine/ssh.scm new file mode 100644 index 0000000..23dcbd7 --- /dev/null +++ b/deployment/machine/ssh.scm @@ -0,0 +1,64 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (deployment machine ssh) + #:use-module ((deployment system aisaka) + #:prefix deployment:system:aisaka:) + #:use-module ((deployment system akashi) + #:prefix deployment:system:akashi:) + #:use-module ((gnu machine ssh) + #:prefix gnu:machine:ssh:) + #:use-module ((sovereign machine) + #:prefix sovereign:machine:)) + +(define open-machine-ssh-session* + (@@ (gnu machine ssh) + open-machine-ssh-session*)) + +(define-public aisaka-configuration + (gnu:machine:ssh:machine-ssh-configuration + (host-name deployment:system:aisaka:host-name-aisaka) + (system sovereign:machine:system-x86-linux) + (build-locally? #t) + (authorize? #t) + (allow-downgrades? #f) + (safety-checks? #t) + (port 22) + (user "marek") + (identity "./id_ed25519") + (session (open-machine-ssh-session* (@@ (gnu machine ssh) + this-machine-ssh-configuration))) + (host-key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM0Eh0q54myeSEironEP9DEKl+ownYuH7oSgAVuLIDNt marek@aisaka"))) + +(define-public akashi-configuration + (gnu:machine:ssh:machine-ssh-configuration + (host-name deployment:system:akashi:host-name) + (system sovereign:machine:system-x86-linux) + (build-locally? #t) + (authorize? #t) + (allow-downgrades? #f) + (safety-checks? #t) + (port 22) + (user "marek") + (identity "./id_ed25519") + (session (open-machine-ssh-session* (@@ (gnu machine ssh) + this-machine-ssh-configuration))) + (host-key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICtEYtiph2TwshHHSQhLL7A2ZvFMCogWuI8vfS3jLQsm marek@akashi"))) + diff --git a/deployment/services.scm b/deployment/services.scm new file mode 100644 index 0000000..f34e200 --- /dev/null +++ b/deployment/services.scm @@ -0,0 +1,26 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (deployment services) + #:use-module (sovereign services) + #:export (qemu-binfmt_rakan-record)) + +(define qemu-binfmt_rakan-record + (qemu-binfmt_service-record)) diff --git a/deployment/services/certbot.scm b/deployment/services/certbot.scm new file mode 100644 index 0000000..17fa421 --- /dev/null +++ b/deployment/services/certbot.scm @@ -0,0 +1,82 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (deployment services certbot) + #:export (aisaka-certbot-service) + #:use-module (gnu services) + #:use-module (gnu services certbot) + #:use-module (guix gexp) + #:use-module ((deployment services web) + #:prefix deployment:services:web:) + #:use-module ((gnu services web) + #:prefix gnu:services:web:)) + +(define nginx-extension-of-certbot + (service-extension deployment:services:web:nginx-service-type* + (@@ (gnu services certbot) + certbot-nginx-server-configurations))) + +(define (extend-certbot extension) + (let* + ((extension-target- (service-extension-target extension)) + (nginx-service-type?- (eq? extension-target- + gnu:services:web:nginx-service-type))) + (if nginx-service-type?- + nginx-extension-of-certbot + extension))) + +(define certbot-type + (let + ((certbot-extensions- (service-type-extensions certbot-service-type))) + (service-type + (inherit certbot-service-type) + (extensions (map extend-certbot + certbot-extensions-))))) + +(define nginx-deploy-hook-file + #~(let + ((pid (call-with-input-file "/var/run/nginx/pid" + read))) + (kill pid + SIGHUP))) + +(define aisaka-certificate-configuration + (certificate-configuration + (deploy-hook (program-file "nginx-deploy-hook" + nginx-deploy-hook-file)) + (domains (list "marekpasnikowski.pl" + "git.marekpasnikowski.pl" + "guix.marekpasnikowski.pl" + "matrix.marekpasnikowski.pl" + ;; "mx.marekpasnikowski.pl" + "radicale.marekpasnikowski.pl" + "www.marekpasnikowski.pl")))) + +(define aisaka-certbot-configuration + (certbot-configuration + (certificates (list aisaka-certificate-configuration)) + (email "marek@marekpasnikowski.pl") + (webroot "/srv/www/marek/marekpasnikowski.pl"))) + +(define aisaka-certbot-service + (service certbot-type + aisaka-certbot-configuration)) + +;;; EOF diff --git a/deployment/services/cgit.scm b/deployment/services/cgit.scm new file mode 100644 index 0000000..6bdf812 --- /dev/null +++ b/deployment/services/cgit.scm @@ -0,0 +1,94 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (deployment services cgit) + #:export (aisaka-cgit-service) + #:use-module (gnu services) + #:use-module (gnu services cgit) + #:use-module (gnu services web) + #:use-module ((deployment services version-control) + #:prefix deployment:services:version-control:) + #:use-module ((deployment services web) + #:prefix deployment:services:web:) + #:use-module ((gnu packages version-control) + #:prefix gnu:packages:version-control:) + #:use-module ((gnu services version-control) + #:prefix gnu:services:version-control:)) + +(define cgit-repository-configuration + (repository-cgit-configuration + (hide? #t) + (path "/srv/git/marek/packages"))) + +(define nginx-location-cgit + (nginx-location-configuration + (body (list "fastcgi_param HTTP_HOST $server_name ;" + "fastcgi_param PATH_INFO $uri ;" + "fastcgi_param QUERY_STRING $args ;" + "fastcgi_param SCRIPT_FILENAME $document_root/lib/cgit/cgit.cgi ;" + "fastcgi_pass 127.0.0.1:9000 ;")) + (uri "@cgit"))) + +(define nginx-server-cgit + (nginx-server-configuration + (locations (list deployment:services:version-control:aisaka-git-http-nginx-location + nginx-location-cgit + deployment:services:web:nginx-location-well-known)) + (listen (list "192.168.10.2:443 ssl")) + (root gnu:packages:version-control:cgit) + (server-name (list "git.marekpasnikowski.pl")) + (ssl-certificate "/etc/letsencrypt/live/marekpasnikowski.pl/fullchain.pem") + (ssl-certificate-key "/etc/letsencrypt/live/marekpasnikowski.pl/privkey.pem") + (try-files (list "$uri" "@cgit")))) + +(define nginx-extension-of-cgit + (service-extension deployment:services:web:nginx-service-type* + cgit-configuration-nginx-config)) + +(define (extend-cgit extension) + (let* + ((extension-target- (service-extension-target extension)) + (nginx-service-type?- (eq? extension-target- + nginx-service-type))) + (if nginx-service-type?- + nginx-extension-of-cgit + extension))) + +(define cgit-type + (let + ((cgit-extensions- (service-type-extensions cgit-service-type))) + (service-type + (inherit cgit-service-type) + (extensions (map extend-cgit + cgit-extensions-))))) + +(define aisaka-cgit-configuration + (cgit-configuration + (nginx (list nginx-server-cgit)) + (repositories (list cgit-repository-configuration)) + (project-list (list "deployment.git" + "sovereign.git")) + (repository-directory "/var/lib/gitolite/repositories"))) + +(define-public aisaka-cgit-service + (service cgit-type + aisaka-cgit-configuration)) + +;;; EOF diff --git a/deployment/services/databases.scm b/deployment/services/databases.scm new file mode 100644 index 0000000..7451477 --- /dev/null +++ b/deployment/services/databases.scm @@ -0,0 +1,63 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (deployment services databases) + #:use-module (gnu services) + #:use-module (gnu services databases) + #:use-module (guix gexp) + #:use-module ((gnu packages databases) + #:prefix gnu:packages:databases:) + #:export (matrix-postgresql-service)) + +(define postgres-hba + (mixed-text-file "pg_hba.conf" + "host synapse synapse_user 127.0.0.1/32 trust\n" + "host synapse synapse_user ::1/128 trust\n" + "local all all peer\n" + "host all all 127.0.0.1/32 md5\n" + "host all all ::1/128 md5\n")) + +(define config-file + (postgresql-config-file + (log-destination "syslog") + (hba-file postgres-hba) + (ident-file (@@ (gnu services databases) + %default-postgres-ident)) + (socket-directory "/var/run/postgresql") + (extra-config (list)))) + +(define matrix-postgresql-service-configuration + (postgresql-configuration + (postgresql gnu:packages:databases:postgresql-17) + (port 5432) + (locale "pl_PL.utf8") + (config-file config-file) + (log-directory "/var/log/postgresql") + (data-directory "/var/lib/postgresql/data") + (extension-packages (list)) + (create-account? #t) + (home-directory "/var/lib/postgresql") + (allow-login? #t) + (uid 501) + (gid 501))) + +(define matrix-postgresql-service + (service postgresql-service-type + matrix-postgresql-service-configuration)) diff --git a/deployment/services/dns.scm b/deployment/services/dns.scm new file mode 100644 index 0000000..3b423b0 --- /dev/null +++ b/deployment/services/dns.scm @@ -0,0 +1,83 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (deployment services dns) + #:export (knot-service-aisaka + wireguard-endpoint) + #:use-module (gnu services) + #:use-module (gnu services dns)) + +(define ip-multimedia "81.190.248.246") + +(define ip-otvarta "95.171.119.109") + +(define ttl "3600") + +(define spf-value + (string-append "\"v=spf1 ip4:" + ip-otvarta + " -all\"")) + +(define wireguard-endpoint + (string-append ip-multimedia + ":51820")) + +(define-zone-entries marekpasnikowski.pl-entries + ("@" ttl "IN" "A" ip-otvarta) + ("1" ttl "IN" "A" ip-otvarta) + ("ns1" ttl "IN" "A" ip-otvarta) + ("@" ttl "IN" "NS" "ns1.marekpasnikowski.pl.") + ("@" ttl "IN" "A" ip-multimedia) + ("2" ttl "IN" "A" ip-multimedia) + ("ns2" ttl "IN" "A" ip-multimedia) + ("@" ttl "IN" "NS" "ns2.marekpasnikowski.pl.") + ("@" ttl "IN" "MX" "10 1.marekpasnikowski.pl.") + ("@" ttl "IN" "TXT" spf-value) + ("_caldavs._tcp" ttl "IN" "SRV" "10 0 443 radicale.marekpasnikowski.pl") + ("_carddavs._tcp" ttl "IN" "SRV" "10 0 443 radicale.marekpasnikowski.pl") + ("_dmarc" ttl "IN" "TXT" "\"adkim=s; aspf=s; p=reject; pct=100; sp=reject; v=DMARC1\"") + ("dkim._domainkey" ttl "IN" "TXT" "\"v=DKIM1; d=marekpasnikowski.pl; t=s; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAo/b/WV5EUxqAhBgJ4v5K3sP8QI+IwziRJ/F9SDO3p3QOMjZd9AGVt2/AztZ4EmcOJnTlbQnLE/DKCOq4HAdxSZjIqj5AXyMddvWiO78+ugdame/flV0tjdDGNflx65Twap3qgJ9jzhvJfZ1BDuh2WC06fn2pyFl1TCETEGp6ZDkI41FW5GH8l9Jk7hhCmr+Mau0EpE7V42lBdireItOA1e7jQcub50584QATme4rYxA7WR4AeIsknOkUo4q8vkVrssoP11nSg/sNM9RGn1QDfVMJRX0twtgGnJ8N5QE4Ia9DvXL4Y0PNMC0/frp13pB6m1VQP/Z4jfDy+TQzEdSRaQIDAQAB\"") + ("git" ttl "IN" "CNAME" "2") + ("guix" ttl "IN" "CNAME" "2") + ("matrix" ttl "IN" "CNAME" "2") + ("radicale" ttl "IN" "CNAME" "2") + ("www" ttl "IN" "CNAME" "2")) + +(define marekpasnikowski.pl-zone + (zone-file + (entries marekpasnikowski.pl-entries) + (origin "marekpasnikowski.pl") + (ns "ns1.marekpasnikowski.pl.") + (mail "marek.marekpasnikowski.pl.") + (serial 2026042801))) + +(define aisaka-master-zone + (knot-zone-configuration + (domain "marekpasnikowski.pl") + (zone marekpasnikowski.pl-zone))) + +(define aisaka-knot-configuration + (knot-configuration + (listen-v4 "0.0.0.0") + (zones (list aisaka-master-zone)))) + +(define knot-service-aisaka + (service knot-service-type + aisaka-knot-configuration)) diff --git a/deployment/services/mail.scm b/deployment/services/mail.scm new file mode 100644 index 0000000..0101de9 --- /dev/null +++ b/deployment/services/mail.scm @@ -0,0 +1,177 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2019 Julien Lepiller <julien@lepiller.eu> +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2019, Julien Lepiller <julien@lepiller.eu> +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (deployment services mail) + #:export (dkimproxy-out-service + etc-mailname-aisaka + smtp-service-aisaka) + #:use-module (gnu services) + #:use-module (gnu services mail) + #:use-module (guix gexp) + #:use-module (sovereign services mail) + #:use-module ((gnu packages mail) + #:prefix gnu:packages:mail:)) + +(define dkimproxy-out-signature-configuration-marekpasnikowski.pl-dkim + (dkimproxy-out-signature-configuration + (algorithm "rsa-sha256") + (key "/etc/mail/dkim/marekpasnikowski.pl.key") + (method "relaxed") + (selector "dkim") + (type 'dkim))) + +(define dkimproxy-out-signature-configuration-marekpasnikowski.pl-domainkeys + (dkimproxy-out-signature-configuration + (method "mofws") + (type 'domainkeys))) + +(define dkimproxy-out-signature-configurations-marekpasnikowski.pl + (list dkimproxy-out-signature-configuration-marekpasnikowski.pl-dkim + dkimproxy-out-signature-configuration-marekpasnikowski.pl-domainkeys)) + +(define dkimproxy-out-configuration-sender-map-marekpasnikowski.pl + (list "marekpasnikowski.pl" + dkimproxy-out-signature-configurations-marekpasnikowski.pl)) + +(define dkimproxy-out-configuration-marekpasnikowski.pl + (dkimproxy-out-configuration + (listen "127.0.0.1:10027") + (relay "127.0.0.1:10028") + (sender-map (list dkimproxy-out-configuration-sender-map-marekpasnikowski.pl)))) + +(define dkimproxy-out-service + (service dkimproxy-out-service-type + dkimproxy-out-configuration-marekpasnikowski.pl)) + +(define aliases-file + (mixed-text-file "aliases" + "@ vmail\n")) + +(define blacklist-file + (mixed-text-file "blacklist" + "@yahoo.com.cn\n" + "@qq.com\n" + "@fnac.com\n" + "@just-aero.us\n" + "@elitetorrent1.com\n")) + +(define relays-file + (mixed-text-file "other-relays" + "mx1.forwardemail.net\n" + "mx2.forwardemail.net\n")) + +(define smtpd-keys "/secrets/smtpd") + +(define (smtpd-conf interface domain) + (mixed-text-file "smtpd.conf" + "# This is the smtpd server system-wide configuration file.\n" + "# See smtpd.conf(5) for more information.\n" + "\n" + "# My TLS certificate and key\n" + "pki marekpasnikowski.pl cert \"/etc/letsencrypt/live/" domain "/fullchain.pem\"\n" + "pki marekpasnikowski.pl key \"/etc/letsencrypt/live/" domain "/privkey.pem\"\n" + "\n" + "# Edit this file to add add more virtual users (passwords are read in that file\n" + "# instead of /etc/passwd\n" + "table passwd file:" smtpd-keys "\n" + "\n" + "# table other-relays file:" relays-file "\n" + "table blacklist file:" blacklist-file "\n" + "\n" + "# A simple spam filter\n" + "# filter spam-filter phase mail-from match mail-from <blacklist> reject \"555\"\n" + "\n" + "# port 25 is used only for receiving from external servers, and they may start\n" + "# a TLS session if they want.\n" + "listen on " interface " port 25 # tls pki marekpasnikowski.pl filter spam-filter\n" + "\n" + "# For sending messages from outside of this server, you need to authenticate and\n" + "# use TLS.\n" + "listen on " interface " port 465 smtps pki marekpasnikowski.pl mask-src auth <passwd>\n" + "\n" + "# Localhost is used by the .onion, so we use the same configuration for \n" + "# local connections." + "listen on lo port 25 tls pki marekpasnikowski.pl filter spam-filter\n" + "# Since incoming connection uses tor, we don't need tls, but still require\n" + "# authentication; we're not a relay\n" + "# listen on lo port 587 tls pki marekpasnikowski.pl mask-src auth <passwd>\n" + "\n" + "# DKIMproxy\n" + "listen on lo port 10028 tag DKIM_OUT\n" + "\n" + "# The socket is considered an internal connection\n" + "listen on socket mask-src\n" + "\n" + "# Maybe it'll work better if we connect to gmail only with v4?\n" + "# limit mta for domain gmail.com inet4\n" + "\n" + "# TODO: manage these files directly in the configuration?\n" + "# If you edit the file, you have to run \"smtpctl update table aliases\"\n" + "table aliases file:" aliases-file "\n" + "\n" + "# We define some actions\n" + "action receive lmtp \"/var/run/dovecot/lmtp\" rcpt-to virtual <aliases>\n" + "action godkim relay host smtp://localhost:10027\n" + "action outbound relay src \"192.168.1.2\" helo " domain "\n" + "\n" + "# We accept to relay any mail from authenticated users\n" + "match for any from any auth action godkim\n" + "match tag DKIM_OUT for any action outbound\n" + "\n" + "# Then, we reject on some other conditions:\n" + "\n" + "# If the mail tries to impersonate us\n" + "# match !from src <other-relays> mail-from \"@marekpasnikowski.pl\" for any reject\n" + "\n" + "# If it comes from someone on the blacklist\n" + "match from any mail-from <blacklist> reject\n" + "\n" + "# Finally, if we accept incoming messages\n" + "match from any for domain \"marekpasnikowski.pl\" action receive\n" + "match for local action receive\n" )) + +(define opensmtpd-configuration-aisaka + (opensmtpd-configuration + (package gnu:packages:mail:opensmtpd) + (shepherd-requirement (list 'dkimproxy-out + 'networking)) + (config-file (smtpd-conf "enp2s0" + "marekpasnikowski.pl")) + (log-file "/val/log/mail.log") + (setgid-commands? #t))) + +(define etc-mailname-aisaka + (let* + ((file (plain-file "mailname-aisaka" + "marekpasnikowski.pl\n")) + (mailname (list "mailname" + file)) + (links (list mailname))) + (simple-service 'etc-mailname + etc-service-type + links))) + +(define smtp-service-aisaka + (service opensmtpd-service-type + opensmtpd-configuration-aisaka)) + +;;; EOF diff --git a/deployment/services/matrix.scm b/deployment/services/matrix.scm new file mode 100644 index 0000000..aeac883 --- /dev/null +++ b/deployment/services/matrix.scm @@ -0,0 +1,80 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (deployment services matrix) + #:use-module (gnu services) + #:use-module (guix gexp) + #:use-module (sovereign services matrix) + #:use-module ((gnu packages matrix) + #:prefix gnu:packages:matrix:) + #:export (matrix-service-aisaka + matrix-service-rakan)) + +(define matrix-service-aisaka + (service matrix-service-type)) + +(define homeserver-configuration-file-rakan + (mixed-text-file "homeserver.yaml" + "# Configuration file for Synapse.\n" + "#\n" + "# This is a YAML file: see [1] for a quick introduction. Note in particular\n" + "# that *indentation is important*: all the elements of a list or dictionary\n" + "# should have the same indentation." + "#\n" + "# [1] https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html\n" + "# For more information on how to configura Synapse, including a complete accounting of\n" + "# each option, go to docs/usage/configuratoin/config_documentation.md or\n" + "# https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html\n" + "server_name: \"marekpasnikowski.pl\"\n" + "pid_file: /home/matrix/data/homeserver.pid\n" + "listeners:\n" + " - port: 8008\n" + " tls: false\n" + " type: http\n" + " x_forwarded: true\n" + " bind_addresses: ['::1', '127.0.0.1']\n" + " resources:\n" + " - names: [client]\n" + " compress: false\n" + "database:\n" + " name: sqlite3\n" + " args:\n" + " database: /home/matrix/data/homeserver.db\n" + "log_config: \"/home/matrix/keys/marekpasnikowski.pl.log.config\"\n" + "media_store_path: /home/matrix/data/media_store\n" + "registration_shared_secret: /home/matrix/keys/registration_shared_secret\n" + "report_stats: false\n" + "macaroon_secret_key: /home/matrix/keys/macaroon_secret_key\n" + "form_secret: /home/matrix/keys/form_secret\n" + "signing_key_path: \"/home/matrix/keys/marekpasnikowski.pl.signing.key\"\n" + "trusted_key_servers:\n" + " - server_name: \"matrix.org\"\n" + "\n" + "\n" + "# vim:ft=yaml\n")) + +(define matrix-configuration-rakan + (matrix-configuration + (package gnu:packages:matrix:synapse) + (homeserver-yaml homeserver-configuration-file-rakan))) + +(define matrix-service-rakan + (service matrix-service-type + matrix-configuration-rakan)) diff --git a/deployment/services/networking.scm b/deployment/services/networking.scm new file mode 100644 index 0000000..a205fc4 --- /dev/null +++ b/deployment/services/networking.scm @@ -0,0 +1,28 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (deployment services networking) + #:export (network-online-service-aisaka) + #:use-module ((sovereign services networking) + #:prefix sovereign:services:networking:)) + +(define network-online-service-aisaka sovereign:services:networking:network-online-throwaway-service) + +;;; EOF diff --git a/deployment/services/nfs.scm b/deployment/services/nfs.scm new file mode 100644 index 0000000..2e9336b --- /dev/null +++ b/deployment/services/nfs.scm @@ -0,0 +1,95 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (deployment services nfs) + #:export (autofs-aisaka_service + autofs-akashi_service + autofs-rakan_service-record + nfs-akashi_service + nfs-rakan_service-record + service-nfs-aisaka) + #:use-module (gnu services nfs) + #:use-module (sovereign services nfs)) + +(define autofs-indirect-map/mnt_record + (autofs-indirect-map + (inherit %autofs-indirect-map/mnt_record) + (entries (list (autofs-map-entry + (inherit %autofs-map-entry/nfs_record) + (device "10.0.0.1:/home/marek/Szablony") + (mount-point "szablony")) + (autofs-map-entry + (inherit %autofs-map-entry/nfs_record) + (device "10.0.0.1:/home/marek/Dokumenty") + (mount-point "dokumenty")))))) + +(define autofs-aisaka_record + (autofs-configuration + (inherit %autofs-configuration_record) + (mounts (list autofs-indirect-map/mnt_record)))) + +(define autofs-akashi_record + (autofs-configuration + (inherit %autofs-configuration_record) + (mounts (list autofs-indirect-map/mnt_record)))) + +(define autofs-rakan_configuration-record + (autofs-configuration + (inherit %autofs-configuration_record) + (mounts (list autofs-indirect-map/mnt_record)))) + +(define nfs-server-aisaka + (let + ((Export-Dokumenty (list "/home/marek/Dokumenty" + "10.0.0.0/24(rw)")) + (Export-Szablony (list "/home/marek/Szablony" + "10.0.0.0/24(rw)"))) + (nfs-configuration + (inherit %nfs-configuration) + (exports (list Export-Dokumenty + Export-Szablony))))) + +(define nfs-client-akashi + (nfs-configuration + (inherit %nfs-configuration))) + +(define nfs-rakan_service-record + (nfs-configuration + (inherit %nfs-configuration))) + +(define autofs-aisaka_service + (autofs_proc autofs-aisaka_record)) + +(define autofs-akashi_service + (autofs_proc autofs-akashi_record)) + +(define autofs-rakan_service-record + (autofs_proc autofs-rakan_configuration-record)) + +(define service-nfs-aisaka + (service-nfs nfs-server-aisaka)) + +(define nfs-akashi_service + (service-nfs nfs-client-akashi)) + +(define nfs-rakan_service-record + (service-nfs nfs-rakan_service-record)) + +;;; EOF diff --git a/deployment/services/version-control.scm b/deployment/services/version-control.scm new file mode 100644 index 0000000..3c89c05 --- /dev/null +++ b/deployment/services/version-control.scm @@ -0,0 +1,33 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (deployment services version-control) + #:export (aisaka-git-http-nginx-location) + #:use-module (gnu services version-control)) + +(define aisaka-git-http-configuration + (git-http-configuration + (git-root "/var/lib/gitolite/repositories") + (uri-path "/git"))) + +(define-public aisaka-git-http-nginx-location + (git-http-nginx-location-configuration aisaka-git-http-configuration)) + +;;; EOF diff --git a/deployment/services/vpn.scm b/deployment/services/vpn.scm new file mode 100644 index 0000000..53a7623 --- /dev/null +++ b/deployment/services/vpn.scm @@ -0,0 +1,115 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (deployment services vpn) + #:export (wireguard-service-aisaka + wireguard-service-akashi + wireguard-service-ayase + wireguard-service-giewont + wireguard-service-rakan) + #:use-module (gnu services) + #:use-module (gnu services vpn) + #:use-module (sovereign services vpn) + #:use-module ((deployment services dns) + #:prefix deployment:services:dns:)) + +(define wireguard-peer-aisaka + (wireguard-peer + (inherit %wireguard-peer) + (name "aisaka") + (endpoint deployment:services:dns:wireguard-endpoint) + (public-key "7B6fgIKVZs6DWN3hdDGlYI8XpvHWGCjZKh6kbY/KKg8="))) + +(define wireguard-peer-akashi + (wireguard-peer + (inherit %wireguard-peer) + (name "akashi") + (public-key "p0X7zaemU0NyuJ+UiKVZ/4HfC8vj5z9kJK9j/iJDwT8=") + (allowed-ips (list "10.0.0.4/32")))) + +(define wireguard-peer-ayase + (wireguard-peer + (inherit %wireguard-peer) + (name "ayase") + (public-key "mzz5aZ0TLPj1WNK+PqpPILlUn16i371OGWVwuU0iDnQ=") + (allowed-ips (list "10.0.0.5/32")))) + +(define wireguard-peer-giewont + (wireguard-peer + (inherit %wireguard-peer) + (name "giewont") + (public-key "/XsuEpAHX1iEc5abcmY9sYTx8qETAuSLjEmx5ekqfwM=") + (allowed-ips (list "10.0.0.2/32")))) + +(define wireguard-peer-rakan + (wireguard-peer + (inherit %wireguard-peer) + (name "rakan") + (public-key "vOEJivgw9C7wZwYX3Kiqw3Ycl6wErr8N9z3BmkhF0Us=") + (allowed-ips (list "10.0.0.3/32")))) + +(define wireguard-configuration-aisaka + (wireguard-configuration + (inherit %wireguard-configuration) + (peers (list wireguard-peer-akashi + wireguard-peer-ayase + wireguard-peer-giewont + wireguard-peer-rakan)))) + +(define wireguard-configuration-akashi + (wireguard-configuration + (inherit %wireguard-configuration) + (addresses (list "10.0.0.4/24")) + (peers (list wireguard-peer-aisaka)))) + +(define wireguard-configuration-ayase + (wireguard-configuration + (inherit %wireguard-configuration) + (addresses (list "10.0.0.5/24")) + (peers (list wireguard-peer-aisaka)))) + +(define wireguard-configuration-giewont + (wireguard-configuration + (inherit %wireguard-configuration) + (addresses (list "10.0.0.2/24")) + (peers (list wireguard-peer-aisaka)))) + +(define wireguard-configuration-rakan + (wireguard-configuration + (inherit %wireguard-configuration) + (addresses (list "10.0.0.3/24")) + (peers (list wireguard-peer-aisaka)))) + +(define wireguard-service-aisaka + (wireguard-service wireguard-configuration-aisaka)) + +(define wireguard-service-akashi + (wireguard-service wireguard-configuration-akashi)) + +(define wireguard-service-ayase + (wireguard-service wireguard-configuration-ayase)) + +(define wireguard-service-giewont + (wireguard-service wireguard-configuration-giewont)) + +(define wireguard-service-rakan + (wireguard-service wireguard-configuration-rakan)) + +;;; EOF diff --git a/deployment/services/web.scm b/deployment/services/web.scm new file mode 100644 index 0000000..b076056 --- /dev/null +++ b/deployment/services/web.scm @@ -0,0 +1,182 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (deployment services web) + #:export (fcgiwrap-service-aisaka + nginx-service-aisaka + nginx-location-well-known + nginx-service-type*) + #:use-module (gnu services) + #:use-module (gnu services web) + #:use-module (guix gexp) + #:use-module ((gnu packages matrix) + #:prefix gnu:packages:matrix:) + #:use-module ((gnu packages web) + #:prefix gnu:packages:web:) + #:use-module ((gnu system shadow) + #:prefix gnu:system:shadow:) + #:use-module ((sovereign system accounts) + #:prefix sovereign:system:accounts:)) + +(define fcgiwrap-configuration-aisaka + (fcgiwrap-configuration + (package gnu:packages:web:fcgiwrap) + (socket "tcp:127.0.0.1:9000") + (user "git") + (group "git"))) + +(define fcgiwrap-service-aisaka + (service + fcgiwrap-service-type + fcgiwrap-configuration-aisaka)) + +(define nginx-accounts + (let + ((accounts- (list sovereign:system:accounts:nginx-group + sovereign:system:accounts:nginx-account))) + (const accounts-))) + +(define nginx-extension-of-account + (service-extension gnu:system:shadow:account-service-type + nginx-accounts)) + +(define (extend-account extension) + (let* + ((extension-target- (service-extension-target extension)) + (account-service-type?- (eq? extension-target- + gnu:system:shadow:account-service-type))) + (if account-service-type?- + nginx-extension-of-account + extension))) + +(define nginx-service-type* + (let + ((nginx-extensions- (service-type-extensions nginx-service-type))) + (service-type + (inherit nginx-service-type) + (extensions (map extend-account + nginx-extensions-))))) + +(define nginx-location-proxy-guix + (nginx-location-configuration + (body (list "proxy_pass http://localhost:8080/ ;" + "proxy_set_header X-Script-Name \"\" ;" + "proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;" + "proxy_set_header Host $http_host ;" + "proxy_pass_header Authorization ;")) + (uri "/"))) + +(define nginx-location-proxy-matrix + (nginx-location-configuration + (body (list "proxy_pass http://localhost:8008 ;" + "proxy_set_header X-Forwarded-For $remote_addr ;" + "proxy_set_header X-Forwarded-Proto $scheme ;" + "proxy_set_header Host $host:$server_port ;" + "client_max_body_size 1024M ;")) + (uri "~ ^(/_matrix|/_synapse/client)"))) + +(define nginx-location-proxy-radicale + (nginx-location-configuration + (body (list "proxy_pass http://localhost:5232/ ;" + "proxy_set_header X-Script-Name \"\" ;" + "proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;" + "proxy_set_header Host $http_host ;" + "proxy_pass_header Authorization ;")) + (uri "/"))) + +(define nginx-location-proxy-auth + (nginx-location-configuration + (body (list "proxy_set_header Host $host;" + "proxy_set_header X-Real-IP $remote_addr;" + "proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;" + "proxy_set_header X-Forwarded-Proto $scheme;" + "if ($ssl_client_verify != SUCCESS) {return 403;}")) + (uri "/"))) + +(define nginx-location-well-known + (nginx-location-configuration + (body (list "root /srv/www/marek/marekpasnikowski.pl ;")) + (uri "/.well-known"))) + +(define nginx-location-well-known-matrix-client + (nginx-location-configuration + (body (list "return 200 '{\"m.homeserver\": {\"base_url\": \"https://matrix.marekpasnikowski.pl\"}}' ;" + "default_type application/json ;" + "add_header Access-Control-Allow-Origin * ;")) + (uri "/.well-known/matrix/client"))) + +(define nginx-server-guix + (nginx-server-configuration + (locations (list nginx-location-proxy-guix)) + (listen (list "192.168.10.2:443 ssl")) + (server-name (list "guix.marekpasnikowski.pl")) + (ssl-certificate "/etc/letsencrypt/live/marekpasnikowski.pl/fullchain.pem") + (ssl-certificate-key "/etc/letsencrypt/live/marekpasnikowski.pl/privkey.pem"))) + +(define nginx-server-matrix + (nginx-server-configuration + (locations (list nginx-location-proxy-matrix)) + (listen (list "192.168.10.2:443 ssl" + "192.168.10.2:8448 ssl default_server")) + (root (file-append gnu:packages:matrix:synapse + "/lib/python3.11/site-packages/synapse/static")) + (server-name (list "matrix.marekpasnikowski.pl")) + (ssl-certificate "/etc/letsencrypt/live/marekpasnikowski.pl/fullchain.pem") + (ssl-certificate-key "/etc/letsencrypt/live/marekpasnikowski.pl/privkey.pem") + (raw-content (list "proxy_http_version 1.1 ;")))) + +(define nginx-server-portal + (nginx-server-configuration + (locations (list nginx-location-well-known + nginx-location-well-known-matrix-client)) + (listen (list "192.168.10.2:443 ssl")) + (root "/srv/www/marek/marekpasnikowski.pl") + (server-name (list 'default + "marekpasnikowski.pl")) + (ssl-certificate "/etc/letsencrypt/live/marekpasnikowski.pl/fullchain.pem") + (ssl-certificate-key "/etc/letsencrypt/live/marekpasnikowski.pl/privkey.pem"))) + +(define nginx-server-radicale + (nginx-server-configuration + (locations (list nginx-location-proxy-radicale + nginx-location-well-known)) + (listen (list "192.168.10.2:443 ssl")) + (server-name (list "radicale.marekpasnikowski.pl")))) + +(define nginx-server-www + (nginx-server-configuration + (listen (list "192.168.10.2:443 ssl")) + (root "/srv/www/marek/marekpasnikowski.pl") + (server-name (list "www.marekpasnikowski.pl")))) + +(define nginx-configuration* + (nginx-configuration + (shepherd-requirement (list 'networking)) + (server-blocks (list nginx-server-portal + nginx-server-www + nginx-server-guix + nginx-server-matrix + nginx-server-radicale)))) + +(define nginx-service-aisaka + (service nginx-service-type* + nginx-configuration*)) + +;;; EOF diff --git a/deployment/system.scm b/deployment/system.scm new file mode 100644 index 0000000..0b411da --- /dev/null +++ b/deployment/system.scm @@ -0,0 +1,251 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (deployment system) + #:export (aisaka + akashi + asakura + ayase + cokolwiek + mcdowell + rakan) + #:use-module (deployment system file-systems) + #:use-module (deployment services vpn) + #:use-module (gnu services) + #:use-module (gnu services base) + #:use-module (gnu system file-systems) + #:use-module (gnu system shadow) + #:use-module (guix gexp) + #:use-module (sovereign system file-systems) + #:use-module (sovereign systems) + #:use-module (users id1000) + #:use-module ((deployment system aisaka) + #:prefix deployment:system:aisaka:) + #:use-module ((deployment system akashi) + #:prefix deployment:system:akashi:) + #:use-module ((deployment system asakura) + #:prefix deployment:system:asakura:) + #:use-module ((deployment system ayase) + #:prefix deployment:system:ayase:) + #:use-module ((deployment system cokolwiek) + #:prefix deployment:system:cokolwiek:) + #:use-module ((deployment system mcdowell) + #:prefix deployment:system:mcdowell:) + #:use-module ((deployment system rakan) + #:prefix deployment:system:rakan:) + #:use-module ((gnu packages linux) + #:prefix gnu:packages:linux:) + #:use-module ((gnu packages tls) + #:prefix gnu:packages:tls:) + #:use-module ((gnu packages matrix) + #:prefix gnu:packages:matrix:) + #:use-module ((gnu system) + #:prefix gnu:system:) + #:use-module ((gnu system file-systems) + #:prefix gnu:system:file-systems:) + #:use-module ((gnu system linux-initrd) + #:prefix gnu:system:linux-initrd:) + #:use-module ((gnu system locale) + #:prefix gnu:system:locale:) + #:use-module ((gnu system nss) + #:prefix gnu:system:nss:) + #:use-module ((gnu system pam) + #:prefix gnu:system:pam:) + #:use-module ((gnu system shadow) + #:prefix gnu:system:shadow:) + #:use-module ((guix diagnostics) + #:prefix guix:diagnostics:) + #:use-module ((nongnu packages linux) + #:prefix nongnu:packages:linux:) + #:use-module ((nongnu system linux-initrd) + #:prefix nongnu:system:linux-initrd:) + #:use-module ((sovereign packages jekyll) + #:prefix sovereign:packages:jekyll:) + #:use-module ((sovereign services) + #:prefix sovereign:services:) + #:use-module ((sovereign systems) + #:prefix sovereign:systems:) + #:use-module ((users id1000) + #:prefix users:id1000:) + #:use-module ((users vmail) + #:prefix users:vmail:)) + +(define aisaka + (gnu:system:operating-system + (kernel nongnu:packages:linux:linux) + (kernel-loadable-modules (list)) + (kernel-arguments gnu:system:%default-kernel-arguments) + (hurd #f) + (bootloader deployment:system:aisaka:bootloader-aisaka) + (label (sovereign:systems:operating-system-label* deployment:system:aisaka:host-name-aisaka + gnu:system:this-operating-system)) + (keyboard-layout deployment:system:aisaka:system-keyboard-layout) + (initrd nongnu:system:linux-initrd:microcode-initrd) + (initrd-modules gnu:system:linux-initrd:%base-initrd-modules) + (firmware (list nongnu:packages:linux:linux-firmware)) + (host-name deployment:system:aisaka:host-name-aisaka) + (hosts-file #f) + (mapped-devices (list)) + (file-systems deployment:system:aisaka:file-systems) + (swap-devices (list)) + (users (cons* users:id1000:uid1000-account + users:vmail:vmail-account + gnu:system:shadow:%base-user-accounts)) + (groups (cons* deployment:system:aisaka:vmail-group + gnu:system:shadow:%base-groups)) + (skeletons (gnu:system:shadow:default-skeletons)) + (issue (@@ (gnu system) + %default-issue)) + (packages (cons* sovereign:packages:jekyll:custom-jekyll + gnu:packages:tls:openssl + gnu:system:%base-packages)) + (timezone "Europe/Warsaw") + (locale sovereign:systems:pl-locale) + (locale-definitions sovereign:systems:%sovereign-locale-definitions) + (locale-libcs gnu:system:locale:%default-locale-libcs) + (name-service-switch gnu:system:nss:%default-nss) + (essential-services (gnu:system:operating-system-default-essential-services gnu:system:this-operating-system)) + (services deployment:system:aisaka:services) + (pam-services (gnu:system:pam:base-pam-services)) + (privileged-programs gnu:system:%default-privileged-programs) + (setuid-programs gnu:system:%setuid-programs) + (sudoers-file sovereign:systems:%sovereign-sudoers-specification) + (location (and=> (current-source-location) + guix:diagnostics:source-properties->location)))) + +(define akashi deployment:system:akashi:system) + +(define asakura deployment:system:asakura:system) + +(define ayase + (gnu:system:operating-system + (inherit sovereign:systems:%sovereign-operating-system) + (kernel deployment:system:ayase:kernel) + (kernel-arguments (list "no_console_suspend" + "cryptomgr.notests" + "loglevel=3" + "clk_ignore_unused" + "cma=256M" + "swiotlb=65535" + "console=tty1")) + (bootloader deployment:system:ayase:bootloader) + (label "ayase") + (keyboard-layout sovereign:systems:keyboard-layout) + (initrd-modules (list "rfkill" + "dm_mod" + "rk805_pwrkey" + "hantro_vpu" + "snd_soc_wm8960" + ;; "rockchip_vdec2" + "v4l2_vp9" + "rockchip_saradc" + "v4l2_h264" + "v4l2_jpeg" + "industrialio_triggered_buffer" + "v4l2_mem2mem" + "rockchip_thermal" + "kfifo_buf" + "snd_soc_rockchip_i2s_tdm" + "videobuf2_dma_contig" + "videobuf2_memops" + "videobuf2_v4l2" + "panthor" + "videodev" + "drm_gpuvm" + "videobuf2_common" + "drm_exec" + "snd_soc_audio_graph_card" + "mc" + "drm_shmem_helper" + "gpu_sched" + "snd_soc_simple_card_utils" + "pci_endpoint_test" + "fuse" + ;; "ip_tables" + "x_tables" + "ipv6" + "onboard_usb_dev" + "dwmac_rk" + "stmmac_platform" + "stmmac" + ;; "crct10dif_ce" + "phy_rockchip_naneng_combphy" + "phy_rockchip_usbdp" + "typec" + "rtc_pcf8523" + "phy_rockchip_samsung_hdptx" + "pcs_xpcs" + "nvme" + "nvme_core" + "rockchipdrm" + "analogix_dp" + "dw_hdmi_qp" + "dw_mipi_dsi" + + ;; Some taken from in %base-initrd-modules a.k.a. default-initrd-modules + ;; May not be strictly needed... but you never know. + "ahci" + "dm-crypt" + "xts" + )) + (firmware (list ;; arm-trusted-firmware-rk3588 + nongnu:packages:linux:linux-firmware + gnu:packages:linux:wireless-regdb)) + (host-name "ayase") + (file-systems (cons* (file-system + (device (file-system-label "ayase-root")) + (mount-point "/") + (type "ext4")) + file-system-dokumenty + file-system-szablony + %base-file-systems)) + ;; (swap-devices ) + (users (cons* uid1000-account + %base-user-accounts)) + (skeletons (gnu:system:shadow:default-skeletons)) + (timezone "Europe/Warsaw") + (locale "pl_PL.utf8") + (services (cons* wireguard-service-ayase + (guix-home-service (list named-home-environment)) + (simple-service 'offload-extension + guix-service-type + (guix-extension + (authorized-keys (list (mixed-text-file "aisaka-guix-key.pub" + "(public-key\n" + " (ecc\n" + " (curve Ed25519)\n" + " (q #983CD313090D2699AD26AE5CB589A29F24A32E247A41EB4F4A22D196DFCD9D3C#)))"))) + (build-machines (list #~(build-machine + (name "www.marekpasnikowski.pl") + (systems (list "x86_64-linux" + "i686-linux" + "aarch64-linux")) + (user "marek") + (host-key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM0Eh0q54myeSEironEP9DEKl+ownYuH7oSgAVuLIDNt root@aisaka") + (port 23) + (private-key "/home/marek/.ssh/id_ed25519")))))) + %sovereign-services)) + (sudoers-file sovereign:systems:%sovereign-sudoers-specification))) + +(define cokolwiek deployment:system:cokolwiek:system) + +(define mcdowell deployment:system:mcdowell:system) + +(define rakan deployment:system:rakan:system) diff --git a/deployment/system/aisaka.scm b/deployment/system/aisaka.scm new file mode 100644 index 0000000..aaebe5e --- /dev/null +++ b/deployment/system/aisaka.scm @@ -0,0 +1,358 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (deployment system aisaka) + #:export (bootloader-aisaka + file-systems + host-name-aisaka + services) + #:use-module (guix gexp) + #:use-module (sovereign bootloader) + #:use-module (sovereign system file-systems) + #:use-module ((deployment gexp) + #:prefix deployment:gexp:) + #:use-module ((deployment services certbot) + #:prefix deployment:services:certbot:) + #:use-module ((deployment services cgit) + #:prefix deployment:services:cgit:) + #:use-module ((deployment services databases) + #:prefix deployment:services:databases:) + #:use-module ((deployment services dns) + #:prefix deployment:services:dns:) + #:use-module ((deployment services mail) + #:prefix deployment:services:mail:) + #:use-module ((deployment services matrix) + #:prefix deployment:services:matrix:) + #:use-module ((deployment services networking) + #:prefix deployment:services:networking:) + #:use-module ((deployment services nfs) + #:prefix deployment:services:nfs:) + #:use-module ((deployment services vpn) + #:prefix deployment:services:vpn:) + #:use-module ((deployment services web) + #:prefix deployment:services:web:) + #:use-module ((gnu bootloader) + #:prefix gnu:bootloader:) + #:use-module ((gnu bootloader grub) + #:prefix gnu:bootloader:grub:) + #:use-module ((gnu packages) + #:prefix gnu:packages:) + #:use-module ((gnu packages linux) + #:prefix gnu:packages:linux:) + #:use-module ((gnu packages tls) + #:prefix gnu:packages:tls:) + #:use-module ((gnu services) + #:prefix gnu:services:) + #:use-module ((gnu services base) + #:prefix gnu:services:base:) + #:use-module ((gnu services mail) + #:prefix gnu:services:mail:) + #:use-module ((gnu services networking) + #:prefix gnu:services:networking:) + #:use-module ((gnu services shepherd) + #:prefix gnu:services:shepherd:) + #:use-module ((gnu services version-control) + #:prefix gnu:services:version-control:) + #:use-module ((gnu system) + #:prefix gnu:system:) + #:use-module ((gnu system accounts) + #:prefix gnu:system:accounts:) + #:use-module ((gnu system file-systems) + #:prefix gnu:system:file-systems:) + #:use-module ((gnu system keyboard) + #:prefix gnu:system:keyboard:) + #:use-module ((gnu system linux-initrd) + #:prefix gnu:system:linux-initrd:) + #:use-module ((gnu system locale) + #:prefix gnu:system:locale:) + #:use-module ((gnu system nss) + #:prefix gnu:system:nss:) + #:use-module ((gnu system pam) + #:prefix gnu:system:pam:) + #:use-module ((guix diagnostics) + #:prefix guix:diagnostics:) + #:use-module ((nongnu packages linux) + #:prefix nongnu:packages:linux:) + #:use-module ((nongnu system linux-initrd) + #:prefix nongnu:system:linux-initrd:) + #:use-module ((sovereign packages jekyll) + #:prefix sovereign:packages:jekyll:) + #:use-module ((sovereign services) + #:prefix sovereign:services:) + #:use-module ((sovereign systems) + #:prefix sovereign:systems:) + #:use-module ((users id1000) + #:prefix users:id1000:) + #:use-module ((users vmail) + #:prefix users:vmail:)) + +(define gitolite-rc-file + (gnu:services:version-control:gitolite-rc-file + (umask #o0027))) + +(define gitolite-configuration + (gnu:services:version-control:gitolite-configuration + (rc-file gitolite-rc-file) + (admin-pubkey #f))) + +(define-public gitolite + (gnu:services:service + gnu:services:version-control:gitolite-service-type + gitolite-configuration)) + +(define-public system-keyboard-layout + (gnu:system:keyboard:keyboard-layout "pl")) + +(define rakan-machine + #~(build-machine + (name "rakan") + (systems (list "x86_64-linux" + "i686-linux" + "aarch64-linux")) + (user "marek") + (host-key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFxlIhNlkWCNA+l/RiOJztB+VWhuJtDTUvSwwlE3MpgJ root@rakan") + (private-key "/home/marek/.ssh/id_ed25519"))) + +(define guix-offload-rakan + (gnu:services:base:guix-extension + (authorized-keys (list deployment:gexp:akashi-guix-key + deployment:gexp:ayase-guix-key + deployment:gexp:rakan-guix-key)) + (build-machines (list rakan-machine)))) + +(define-public offload-rakan + (gnu:services:simple-service 'offload-rakan + gnu:services:base:guix-service-type + guix-offload-rakan)) + +(define radicale-auth-configuration + (gnu:services:mail:radicale-auth-configuration + (type 'htpasswd) + (htpasswd-filename "/secrets/radicale/keys") + (htpasswd-encryption 'plain))) + +(define radicale-storage-configuration + (gnu:services:mail:radicale-storage-configuration + (filesystem-folder "/data/radicale/collections"))) + +(define radicale-configuration + (gnu:services:mail:radicale-configuration + (auth radicale-auth-configuration) + (storage radicale-storage-configuration))) + +(define-public radicale + (gnu:services:service + gnu:services:mail:radicale-service-type + radicale-configuration)) + +(define enp1s0-address-4 + (gnu:services:base:network-address + (device "enp1s0") + (value "192.168.10.2/24") + (ipv6? #f))) + +(define enp2s0-address-4 + (gnu:services:base:network-address + (device "enp2s0") + (value "192.168.1.2/24") + (ipv6? #f))) + +(define enp1s0-route-4-default + (gnu:services:base:network-route + (destination "default") + (source #f) + (device #f) + (ipv6? #f) + (gateway "192.168.10.1"))) + +(define network-hardware + (gnu:services:base:static-networking + (addresses (list enp1s0-address-4 + enp2s0-address-4)) + (links (list)) + (routes (list enp1s0-route-4-default)) + (name-servers (list "192.168.10.1" + "192.168.1.1")) + (provision (list 'network-hardware)) + (requirement (list)))) + +(define static-networking-configuration + (list network-hardware)) + +(define-public static-networking + (gnu:services:service + gnu:services:networking:static-networking-service-type + static-networking-configuration)) + +(define ip-command + (file-append gnu:packages:linux:iproute + "/sbin/ip")) + +(define network-enp2s0-route-default + (let + ((route-default- #~(list #$ip-command + "route" + "add" + "default" + "via" + "192.168.1.1" + "table" + "1"))) + (gnu:services:shepherd:shepherd-service + (provision (list 'network-enp2s0-route-default)) + (requirement (list 'network-enp2s0-table)) + (one-shot? #t) + (respawn? #f) + (start #~(make-forkexec-constructor #$route-default-)) + (stop #~(const #f)) + (actions (list)) + (auto-start? #t) + (documentation "Sets up a default route for traffic from enp2s0.") + (modules gnu:services:shepherd:%default-modules)))) + +(define network-enp2s0-table + (let + ((table- #~(list #$ip-command + "rule" + "add" + "from" + "192.168.1.2" + "table" + "1" + "prio" + "1"))) + (gnu:services:shepherd:shepherd-service + (provision (list 'network-enp2s0-table)) + (requirement (list 'network-hardware)) + (one-shot? #t) + (respawn? #f) + (start #~(make-forkexec-constructor #$table-)) + (stop #~(const #f)) + (actions (list)) + (auto-start? #t) + (documentation "Defines a table of rules number 1 for routes through enp2s0.") + (modules gnu:services:shepherd:%default-modules)))) + +(define networking + (gnu:services:shepherd:shepherd-service + (provision (list 'networking)) + (requirement (list 'network-enp2s0-table + 'network-enp2s0-route-default + 'network-online)) + (one-shot? #t) + (respawn? #f) + (start #~(const #t)) + (stop #~(const #f)) + (actions (list)) + (auto-start? #t) + (documentation "Defines a graph root of one-shot services to invoke various ip commands.") + (modules gnu:services:shepherd:%default-modules))) + +(define-public iproute2-networking + (let + ((extensions- (list network-enp2s0-table + network-enp2s0-route-default + networking))) + (gnu:services:simple-service 'networking + gnu:services:shepherd:shepherd-root-service-type + extensions-))) + +(define swap-device-izumi-1-label + (gnu:system:file-systems:file-system-label "izumi-swap-f")) + +(define-public %sovereign-services* + (gnu:services:modify-services sovereign:systems:%sovereign-services + (gnu:services:delete gnu:services:networking:network-manager-service-type))) + +(define-public system-bootloader + (gnu:bootloader:bootloader-configuration + (bootloader gnu:bootloader:grub:grub-efi-bootloader) + (targets (list "/boot")) + (keyboard-layout sovereign:systems:keyboard-layout))) + +(define-public vmail-group + (gnu:system:accounts:user-group + (name "vmail") + (system? #t))) + +(define named-home-environments + (list users:id1000:named-home-environment)) + +(define guix-publish-configuration + (gnu:services:base:guix-publish-configuration + (host "0.0.0.0") + (port 8080) + (advertise? #t))) + +(define-public guix-home-service + (sovereign:systems:guix-home-service named-home-environments)) + +(define-public guix-publish-service + (sovereign:services:guix-publish-service guix-publish-configuration)) + +(define host-name-aisaka "aisaka") + +(define bootloader-configuration-targets-aisaka + (list "/dev/nvme0n1")) + +(define bootloader-aisaka + (custom-bootloader-configuration bootloader-configuration-targets-aisaka)) + +(define file-system-boot + (gnu:system:file-systems:file-system + (inherit file-system/efi) + (device (file-system-label* "BOOT")))) + +(define file-system-root + (gnu:system:file-systems:file-system + (inherit file-system/root) + (device (file-system-label* host-name-aisaka + "root")))) + +(define file-systems + (cons* file-system-root + file-system-boot + gnu:system:file-systems:%base-file-systems)) + +(define services + (cons* deployment:services:certbot:aisaka-certbot-service + deployment:services:cgit:aisaka-cgit-service + deployment:services:mail:dkimproxy-out-service + users:id1000:dovecot-service + deployment:services:mail:etc-mailname-aisaka + deployment:services:web:fcgiwrap-service-aisaka + gitolite + guix-home-service + guix-publish-service + iproute2-networking + deployment:services:dns:knot-service-aisaka + deployment:services:databases:matrix-postgresql-service + deployment:services:matrix:matrix-service-aisaka + deployment:services:networking:network-online-service-aisaka + deployment:services:nfs:service-nfs-aisaka + deployment:services:web:nginx-service-aisaka + offload-rakan + radicale + deployment:services:mail:smtp-service-aisaka + static-networking + deployment:services:vpn:wireguard-service-aisaka + %sovereign-services*)) + +;;; EOF diff --git a/deployment/system/akashi.scm b/deployment/system/akashi.scm new file mode 100644 index 0000000..4e2bb24 --- /dev/null +++ b/deployment/system/akashi.scm @@ -0,0 +1,158 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (deployment system akashi) + #:export (host-name) + #:use-module (guix gexp) + #:use-module (sovereign bootloader) + #:use-module (sovereign system file-systems) + #:use-module (users id1000) + #:use-module ((deployment gexp) + #:prefix deployment:gexp:) + #:use-module ((deployment services nfs) + #:prefix deployment:services:nfs:) + #:use-module ((deployment services vpn) + #:prefix deployment:services:vpn:) + #:use-module ((deployment system file-systems) + #:prefix deployment:system:file-systems:) + #:use-module ((gnu packages linux) + #:prefix gnu:packages:linux:) + #:use-module ((gnu services) + #:prefix gnu:services:) + #:use-module ((gnu services base) + #:prefix gnu:services:base:) + #:use-module ((gnu services guix) + #:prefix gnu:services:guix:) + #:use-module ((gnu system) + #:prefix gnu:system:) + #:use-module ((gnu system file-systems) + #:prefix gnu:system:file-systems:) + #:use-module ((gnu system keyboard) + #:prefix gnu:system:keyboard:) + #:use-module ((gnu system linux-initrd) + #:prefix gnu:system:linux-initrd:) + #:use-module ((gnu system locale) + #:prefix gnu:system:locale:) + #:use-module ((gnu system nss) + #:prefix gnu:system:nss:) + #:use-module ((gnu system pam) + #:prefix gnu:system:pam:) + #:use-module ((gnu system shadow) + #:prefix gnu:system:shadow:) + #:use-module ((guix diagnostics) + #:prefix guix:diagnostics:) + #:use-module ((sovereign systems) + #:prefix sovereign:systems:)) + +(define host-name "akashi") + +(define file-system-boot + (gnu:system:file-systems:file-system + (inherit file-system/efi) + (device (file-system-label* "BOOT")))) + +(define root-partition + ((@ (gnu system file-systems) file-system) + (mount-point "/") + (device ((@ (gnu system file-systems) file-system-label) "akashi-root")) + (type "ext4"))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(define system-keyboard-layout + (gnu:system:keyboard:keyboard-layout "pl")) + +(define offload-hub + #~(build-machine + (name "www.marekpasnikowski.pl") + (systems (list "x86_64-linux" + "i686-linux")) + (user "marek") + (host-key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM0Eh0q54myeSEironEP9DEKl+ownYuH7oSgAVuLIDNt root@aisaka") + (port 23) + (private-key "/home/marek/.ssh/id_ed25519"))) + +(define guix-offload-targets + (gnu:services:base:guix-extension + (authorized-keys (list deployment:gexp:aisaka-guix-key)) + (build-machines (list offload-hub)))) + +(define offload-extension + (gnu:services:simple-service 'offload-extension + gnu:services:base:guix-service-type + guix-offload-targets)) + +(define home-environments + `((,uid1000-name ,uid1000-home-environment))) + +(define guix-home + (gnu:services:service gnu:services:guix:guix-home-service-type + home-environments)) + +(define-public system + (gnu:system:operating-system + (kernel gnu:packages:linux:linux-libre) + (kernel-loadable-modules (list)) + (kernel-arguments (cons* "thinkpad_acpi.fan_control=1" + "thinkpad_acpi.fan='level 2'" + gnu:system:%default-kernel-arguments)) + (hurd #f) + (bootloader (custom-bootloader-configuration (list "/dev/sda"))) + (label (sovereign:systems:operating-system-label* host-name + gnu:system:this-operating-system)) + (keyboard-layout system-keyboard-layout) + (initrd gnu:system:linux-initrd:base-initrd) + (initrd-modules gnu:system:linux-initrd:%base-initrd-modules) + (firmware (list)) + (host-name host-name) + (hosts-file #f) + (mapped-devices (list)) + (file-systems (cons* root-partition + file-system-boot + deployment:system:file-systems:file-system-dokumenty + deployment:system:file-systems:file-system-szablony + gnu:system:file-systems:%base-file-systems)) + (swap-devices (list)) + (users (list uid1000-account)) + (groups gnu:system:shadow:%base-groups) + (skeletons (gnu:system:shadow:default-skeletons)) + (issue (@@ (gnu system) + %default-issue)) + (packages gnu:system:%base-packages) + (timezone "Europe/Warsaw") + (locale sovereign:systems:pl-locale) + (locale-definitions sovereign:systems:%sovereign-locale-definitions) + (locale-libcs gnu:system:locale:%default-locale-libcs) + (name-service-switch gnu:system:nss:%default-nss) + (essential-services (gnu:system:operating-system-default-essential-services gnu:system:this-operating-system)) + (services (cons* guix-home + offload-extension + deployment:services:nfs:nfs-akashi_service + deployment:services:nfs:autofs-akashi_service + deployment:services:vpn:wireguard-service-akashi + sovereign:systems:%sovereign-services)) + (pam-services (gnu:system:pam:base-pam-services)) + (privileged-programs gnu:system:%default-privileged-programs) + (setuid-programs gnu:system:%setuid-programs) + (sudoers-file sovereign:systems:%sovereign-sudoers-specification) + (location (and=> (current-source-location) + guix:diagnostics:source-properties->location)))) + +(define-public operating-system* system) diff --git a/deployment/system/asakura.scm b/deployment/system/asakura.scm new file mode 100644 index 0000000..51e1610 --- /dev/null +++ b/deployment/system/asakura.scm @@ -0,0 +1,142 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (deployment system asakura) + #:use-module (sovereign bootloader) + #:use-module ((gnu system) #:prefix gnu:system:) + #:use-module ((gnu system file-systems) #:prefix gnu:system:file-systems:) + #:use-module ((gnu system uuid) #:prefix gnu:system:uuid:) + #:use-module ((nongnu packages linux) #:prefix nongnu:packages:linux:) + #:use-module ((nongnu system linux-initrd) #:prefix nongnu:system:linux-initrd:) + #:use-module ((sovereign packages protonmail) #:prefix sovereign:packages:protonmail:) + #:use-module ((sovereign systems) #:prefix sovereign:systems:) + #:use-module ((users id1000) #:prefix users:id1000:)) + +(define efi-filesystem-uuid + (gnu:system:uuid:uuid + "B4FB-CBD9" + 'fat32)) + +(define host-name + "asakura") + +(define (label number) + (gnu:system:file-systems:file-system-label + (string-append host-name + "-swap" + number))) + +(define root-filesystem-uuid + (gnu:system:uuid:uuid + "615a98cd-a632-4ee5-a6f4-e5ebcaa6fb8c")) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(define efi-partition + (gnu:system:file-systems:file-system + (mount-point "/boot") + (device efi-filesystem-uuid) + (type "vfat"))) + +(define keyboard-layout + ((@ (gnu system keyboard) keyboard-layout) + "pl")) + +(define (libvirt-service) + (use-modules (gnu services virtualization)) + ((@ (gnu services) service) + libvirt-service-type)) + +(define (virtlog-service) + (use-modules (gnu services virtualization)) + ((@ (gnu services) service) + virtlog-service-type)) + +(define root-partition + (gnu:system:file-systems:file-system + (mount-point "/") + (device root-filesystem-uuid) + (type "ext4"))) + +(define (swap-label number) + (let ((target-label (label number))) + (gnu:system:file-systems:swap-space + (target target-label)))) + +(define (system-packages-service) + (use-modules (gnu packages gnupg) + (gnu packages kde-pim) + (gnu services)) + (simple-service 'system-packages + profile-service-type + (list kgpg + pinentry-qt + pinentry-tty))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(define (file-systems) + (append gnu:system:file-systems:%base-file-systems + (list root-partition + efi-partition))) + +(define services + (let* + ( (l-guix-homes (list users:id1000:named-home-environment)) + (l-guix-home-service (sovereign:systems:guix-home-service l-guix-homes))) + (append sovereign:systems:%sovereign-services + (list sovereign:packages:protonmail:nogui-profile + l-guix-home-service + (system-packages-service))))) + +(define swap-device-1 + (swap-label "-1")) + +(define swap-device-2 + (swap-label "-2")) + +(define (users) + (use-modules (gnu system accounts)) + (append (@ (gnu system shadow) %base-user-accounts) + (list users:id1000:uid1000-account))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(define-public system + (gnu:system:operating-system + (kernel nongnu:packages:linux:linux) + (bootloader (custom-bootloader-configuration (list))) + (label (sovereign:systems:operating-system-label* host-name + gnu:system:this-operating-system)) + (keyboard-layout keyboard-layout) + (initrd nongnu:system:linux-initrd:microcode-initrd) + (firmware (list nongnu:packages:linux:linux-firmware)) + (host-name host-name) + (file-systems (file-systems)) + (swap-devices (list swap-device-1 + swap-device-2)) + (users (users)) + (timezone "Europe/Warsaw") + (locale sovereign:systems:pl-locale) + (locale-definitions sovereign:systems:%sovereign-locale-definitions) + (services services) + (sudoers-file sovereign:systems:%sovereign-sudoers-specification))) + +(define-public operating-system* system) diff --git a/deployment/system/ayase.scm b/deployment/system/ayase.scm new file mode 100644 index 0000000..ea4f595 --- /dev/null +++ b/deployment/system/ayase.scm @@ -0,0 +1,36 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (deployment system ayase) + #:export (bootloader + kernel) + #:use-module (gnu bootloader) + #:use-module ((mnt-reform rk3588) + #:prefix mnt-reform:rk3588:) + #:use-module ((sovereign packages linux) + #:prefix sovereign:packages:linux:)) + +(define bootloader + (bootloader-configuration + (targets (list "/dev/mmcblk0" + "/dev/nvme0n1")) + (bootloader mnt-reform:rk3588:pocket-rk3588-u-boot-bootloader))) + +(define kernel sovereign:packages:linux:linux-mnt-rk3588) diff --git a/deployment/system/cokolwiek.scm b/deployment/system/cokolwiek.scm new file mode 100644 index 0000000..e591e28 --- /dev/null +++ b/deployment/system/cokolwiek.scm @@ -0,0 +1,124 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (deployment system cokolwiek) + #:use-module (sovereign bootloader) + #:use-module ( (deployment services vpn) + #:prefix deployment:services:vpn:) + #:use-module ( (gnu packages package-management) + #:prefix gnu:packages:package-management:) + #:use-module ( (gnu services) + #:prefix gnu:services:) + #:use-module ( (gnu services base) + #:prefix gnu:services:base:) + #:use-module ( (gnu services guix) + #:prefix gnu:services:guix:) + #:use-module ( (gnu system) + #:prefix gnu:system:) + #:use-module ( (gnu system file-systems) + #:prefix gnu:system:file-systems:) + #:use-module ( (gnu system linux-initrd) + #:prefix gnu:system:linux-initrd:) + #:use-module ( (gnu system shadow) + #:prefix gnu:system:shadow:) + #:use-module ( (nongnu packages linux) + #:prefix nongnu:packages:linux:) + #:use-module ( (nongnu system linux-initrd) + #:prefix nongnu:system:linux-initrd:) + #:use-module ( (sovereign channels) + #:prefix sovereign:channels:) + #:use-module ( (sovereign packages protonmail) + #:prefix sovereign:packages:protonmail:) + #:use-module ( (sovereign system file-systems) + #:prefix sovereign:system:file-systems:) + #:use-module ( (sovereign systems) + #:prefix sovereign:systems:) + #:use-module ( (users id1000) + #:prefix users:id1000:) + #:use-module ( (users id1001) + #:prefix users:id1001:)) + +(define system-name + "cokolwiek") + +(define file-system-efi + (let* + ( (l-system-name (string-upcase system-name)) + (l-device (sovereign:system:file-systems:file-system-label* "BOOT"))) + (gnu:system:file-systems:file-system + (inherit sovereign:system:file-systems:file-system/efi) + (device l-device)))) + +(define file-system-root + (let + ( (l-device (sovereign:system:file-systems:file-system-label* system-name + "root"))) + (gnu:system:file-systems:file-system + (inherit sovereign:system:file-systems:file-system/root) + (device l-device)))) + +(define swap + (let + ( (l-target (sovereign:system:file-systems:file-system-label* system-name + "swap"))) + (gnu:system:file-systems:swap-space + (inherit sovereign:system:file-systems:swap/no-trim) + (target l-target)))) + +(define-public system + (let* + ( (l-guix-homes (list users:id1000:named-home-environment + users:id1001:named-home-environment)) + (l-guix-home-service (sovereign:systems:guix-home-service l-guix-homes)) + (l-bootloader (custom-bootloader-configuration (list "/dev/sda"))) + (l-file-systems (cons* file-system-root + file-system-efi + gnu:system:file-systems:%base-file-systems)) + (l-firmware (list nongnu:packages:linux:linux-firmware)) + (l-initrd-modules (cons* "mei_me" + gnu:system:linux-initrd:%base-initrd-modules)) + (l-services (cons* l-guix-home-service + sovereign:packages:protonmail:nogui-profile + deployment:services:vpn:wireguard-service-giewont + sovereign:systems:%sovereign-services)) + (l-swap-devices (list swap)) + (l-users (cons* users:id1000:uid1000-account + users:id1001:user-account + gnu:system:shadow:%base-user-accounts))) + (gnu:system:operating-system + (kernel nongnu:packages:linux:linux) + (bootloader l-bootloader) + (label (sovereign:systems:operating-system-label* system-name + gnu:system:this-operating-system)) + (keyboard-layout sovereign:systems:keyboard-layout) + (initrd nongnu:system:linux-initrd:microcode-initrd) + (initrd-modules l-initrd-modules) + (firmware l-firmware) + (host-name system-name) + (file-systems l-file-systems) + (swap-devices l-swap-devices) + (users l-users) + (timezone "Europe/Warsaw") + (locale sovereign:systems:pl-locale) + (locale-definitions sovereign:systems:%sovereign-locale-definitions) + (services l-services) + (sudoers-file sovereign:systems:%sovereign-sudoers-specification)))) + +(define-public operating-system* system) diff --git a/deployment/system/file-systems.scm b/deployment/system/file-systems.scm new file mode 100644 index 0000000..2c36849 --- /dev/null +++ b/deployment/system/file-systems.scm @@ -0,0 +1,39 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (deployment system file-systems) + #:export (file-system-dokumenty + file-system-szablony) + #:use-module (gnu system file-systems) + #:use-module (sovereign system file-systems)) + +(define file-system-dokumenty + (file-system + (inherit %file-system-nfs) + (mount-point "/mnt/dokumenty") + (device "10.0.0.1:/home/marek/Dokumenty"))) + +(define file-system-szablony + (file-system + (inherit %file-system-nfs) + (mount-point "/mnt/szablony") + (device "10.0.0.1:/home/marek/Szablony"))) + +;;; EOF diff --git a/deployment/system/git-ignore.conf b/deployment/system/git-ignore.conf new file mode 100644 index 0000000..73a9355 --- /dev/null +++ b/deployment/system/git-ignore.conf @@ -0,0 +1,68 @@ +# SPDX-License-Identifier: GPL-3.0-or-later +# SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +# COPYRIGHT NOTICE +# +# Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +# LICENSE NOTICE +# +# This library 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 library 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 library. +# If not, see <https://www.gnu.org/licenses/>. + +# -*- mode: gitignore; -*- +*~ +\#*\# +/.emacs.desktop +/.emacs.desktop.lock +*.elc +auto-save-list +tramp +.\#* + +# Org-mode +.org-id-locations +*_archive + +# flymake-mode +*_flymake.* + +# eshell files +/eshell/history +/eshell/lastdir + +# elpa packages +/elpa/ + +# reftex files +*.rel + +# AUCTeX auto folder +/auto/ + +# cask packages +.cask/ +dist/ + +# Flycheck +flycheck_*.el + +# server auth directory +/server/ + +# projectiles files +.projectile + +# directory configuration +.dir-locals.el + +# network security +/network-security.data diff --git a/deployment/system/gitconfig b/deployment/system/gitconfig new file mode 100644 index 0000000..b1a384e --- /dev/null +++ b/deployment/system/gitconfig @@ -0,0 +1,30 @@ +# SPDX-License-Identifier: GPL-3.0-or-later +# SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +# COPYRIGHT NOTICE +# +# Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +# LICENSE NOTICE +# +# This library 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 library 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 library. +# If not, see <https://www.gnu.org/licenses/>. + +[commit] + gpgsign = true + +[user] + email = marek@marekpasnikowski.pl + name = Marek Paśnikowski + signingkey = 6D81B1207711899F + +[push] + autoSetupRemote = true diff --git a/deployment/system/mcdowell.scm b/deployment/system/mcdowell.scm new file mode 100644 index 0000000..d9f2ba8 --- /dev/null +++ b/deployment/system/mcdowell.scm @@ -0,0 +1,138 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (deployment system mcdowell) + #:use-module (guix gexp) + #:use-module (sovereign bootloader) + #:use-module ( (deployment gexp) + #:prefix deployment:gexp:) + #:use-module ( (gnu packages package-management) + #:prefix gnu:packages:package-management:) + #:use-module ( (gnu services) + #:prefix gnu:services:) + #:use-module ( (gnu services base) + #:prefix gnu:services:base:) + #:use-module ( (gnu services guix) + #:prefix gnu:services:guix:) + #:use-module ( (gnu system) + #:prefix gnu:system:) + #:use-module ( (gnu system file-systems) + #:prefix gnu:system:file-systems:) + #:use-module ( (gnu system linux-initrd) + #:prefix gnu:system:linux-initrd:) + #:use-module ( (gnu system shadow) + #:prefix gnu:system:shadow:) + #:use-module ( (nongnu packages linux) + #:prefix nongnu:packages:linux:) + #:use-module ( (nongnu system linux-initrd) + #:prefix nongnu:system:linux-initrd:) + #:use-module ( (sovereign channels) + #:prefix sovereign:channels:) + #:use-module ( (sovereign packages protonmail) + #:prefix sovereign:packages:protonmail:) + #:use-module ( (sovereign system file-systems) + #:prefix sovereign:system:file-systems:) + #:use-module ( (sovereign systems) + #:prefix sovereign:systems:) + #:use-module ( (users id1000) + #:prefix users:id1000:)) + +(define system-name + "mcdowell") + +(define file-system-efi + (let* + ( (l-system-name (string-upcase system-name)) + (l-device (sovereign:system:file-systems:file-system-label* system-name))) + (gnu:system:file-systems:file-system + (inherit sovereign:system:file-systems:file-system/efi) + (device l-device) + (mount-point "/boot/EFI")))) + +(define file-system-root + (let + ( (l-device (sovereign:system:file-systems:file-system-label* system-name + "root"))) + (gnu:system:file-systems:file-system + (inherit sovereign:system:file-systems:file-system/root) + (device l-device)))) + +(define swap + (let + ( (l-target (sovereign:system:file-systems:file-system-label* system-name + "swap"))) + (gnu:system:file-systems:swap-space + (inherit sovereign:system:file-systems:swap/no-trim) + (target l-target)))) + +(define rakan-machine + #~(build-machine + (name "rakan") + (systems (list "x86_64-linux" + "i686-linux")) + (user "marek") + (host-key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFxlIhNlkWCNA+l/RiOJztB+VWhuJtDTUvSwwlE3MpgJ root@mcdowell") + (private-key "/home/marek/.ssh/id_ed25519"))) + +(define guix-offload-rakan + (gnu:services:base:guix-extension + (authorized-keys (list deployment:gexp:rakan-guix-key)) + (build-machines (list rakan-machine)))) + +(define-public system + (let* + ( (l-guix-homes (list users:id1000:named-home-environment)) + (l-guix-home-service (sovereign:systems:guix-home-service l-guix-homes)) + (l-bootloader (custom-bootloader-configuration (list "/dev/sdb"))) + (l-file-systems (cons* file-system-root + file-system-efi + gnu:system:file-systems:%base-file-systems)) + (l-firmware (list nongnu:packages:linux:linux-firmware)) + (l-initrd-modules (cons* "mei_me" + gnu:system:linux-initrd:%base-initrd-modules)) + (l-services (cons* l-guix-home-service + sovereign:packages:protonmail:nogui-profile + (gnu:services:simple-service 'offload-rakan + gnu:services:base:guix-service-type + guix-offload-rakan) + sovereign:systems:%sovereign-services)) + (l-swap-devices (list swap)) + (l-users (cons* users:id1000:uid1000-account + gnu:system:shadow:%base-user-accounts))) + (gnu:system:operating-system + (kernel nongnu:packages:linux:linux) + (bootloader l-bootloader) + (label (sovereign:systems:operating-system-label* system-name + gnu:system:this-operating-system)) + (keyboard-layout sovereign:systems:keyboard-layout) + (initrd nongnu:system:linux-initrd:microcode-initrd) + (initrd-modules l-initrd-modules) + (firmware l-firmware) + (host-name system-name) + (file-systems l-file-systems) + (swap-devices l-swap-devices) + (users l-users) + (timezone "Europe/Warsaw") + (locale sovereign:systems:pl-locale) + (locale-definitions sovereign:systems:%sovereign-locale-definitions) + (services l-services) + (sudoers-file sovereign:systems:%sovereign-sudoers-specification)))) + +(define-public operating-system* system) diff --git a/deployment/system/rakan.scm b/deployment/system/rakan.scm new file mode 100644 index 0000000..8edfa4a --- /dev/null +++ b/deployment/system/rakan.scm @@ -0,0 +1,299 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (deployment system rakan) + #:export (bootloader-configuration-targets-rakan) + #:use-module (guix gexp) + #:use-module (sovereign bootloader) + #:use-module ( (deployment gexp) + #:prefix deployment:gexp:) + #:use-module ( (deployment services) + #:prefix deployment:services:) + #:use-module ( (deployment services nfs) + #:prefix deployment:services:nfs:) + #:use-module ( (deployment services vpn) + #:prefix deployment:services:vpn:) + #:use-module ( (deployment system file-systems) + #:prefix deployment:system:file-systems:) + #:use-module ( (gnu home) + #:prefix gnu:home:) + #:use-module ( (gnu home services) + #:prefix gnu:home:services:) + #:use-module ( (gnu packages libreoffice) + #:prefix gnu:packages:libreoffice:) + #:use-module ( (gnu packages mail) + #:prefix gnu:packages:mail:) + #:use-module ( (gnu services) + #:prefix gnu:services:) + #:use-module ( (gnu services base) + #:prefix gnu:services:base:) + #:use-module ( (gnu services guix) + #:prefix gnu:services:guix:) + #:use-module ( (gnu services samba) + #:prefix gnu:services:samba:) + #:use-module ( (gnu system) + #:prefix gnu:system:) + #:use-module ( (gnu system file-systems) + #:prefix gnu:system:file-systems:) + #:use-module ( (gnu system linux-initrd) + #:prefix gnu:system:linux-initrd:) + #:use-module ( (gnu system locale) + #:prefix gnu:system:locale:) + #:use-module ( (gnu system nss) + #:prefix gnu:system:nss:) + #:use-module ( (gnu system pam) + #:prefix gnu:system:pam:) + #:use-module ( (gnu system shadow) + #:prefix gnu:system:shadow:) + #:use-module ( (guix diagnostics) + #:prefix guix:diagnostics:) + #:use-module ( (nongnu packages linux) + #:prefix nongnu:packages:linux:) + #:use-module ( (nongnu system linux-initrd) + #:prefix nongnu:system:linux-initrd:) + #:use-module ( (gnu home-services mail) + #:prefix rde/gnu:home-services:mail:) + #:use-module ( (sovereign packages emacs) + #:prefix sovereign:packages:emacs:) + #:use-module ( (sovereign packages protonmail) + #:prefix sovereign:packages:protonmail:) + #:use-module ( (sovereign services) + #:prefix sovereign:services:) + #:use-module ( (sovereign system file-systems) + #:prefix sovereign:system:file-systems:) + #:use-module ( (sovereign systems) + #:prefix sovereign:systems:) + #:use-module ( (users id1000) + #:prefix users:id1000:)) + +(define system-name + "rakan") + +(define file-system-efi + (let* + ( (l-system-name (string-upcase system-name)) + (l-device (sovereign:system:file-systems:file-system-label* "BOOT"))) + (gnu:system:file-systems:file-system + (inherit sovereign:system:file-systems:file-system/efi) + (device l-device)))) + +(define file-system-root + (let + ( (l-device (sovereign:system:file-systems:file-system-label* system-name + "root"))) + (gnu:system:file-systems:file-system + (inherit sovereign:system:file-systems:file-system/root) + (device l-device)))) + +(define file-system/root-btrfs + (gnu:system:file-systems:file-system + (type "btrfs") + (mount-point "/") + (device (sovereign:system:file-systems:file-system-label* system-name + "raid10")) + (flags (list)) + (options #f) + (mount? #t) + (needed-for-boot? #t) + (skip-check-if-clean? #f) + (repair #t) + (create-mount-point? #f) + (mount-may-fail? #f) + (dependencies (list)) + (shepherd-requirements (list)))) + +(define swap + (let + ( (l-target (sovereign:system:file-systems:file-system-label* system-name + "swap"))) + (gnu:system:file-systems:swap-space + (inherit sovereign:system:file-systems:swap/no-trim) + (target l-target)))) + +(define guix-offload-authorizations + (gnu:services:base:guix-extension + (authorized-keys (list deployment:gexp:aisaka-guix-key)))) + +(define (l2md-maildir name) + (string-append "~/Publiczne/l2md/" + name)) + +(define l2md-repo-guile-user + (rde/gnu:home-services:mail:l2md-repo + (name "guile-user") + (urls "https://yhetil.org/guile-user/0") + (maildir (l2md-maildir name)) + (pipe "") + (initial-import 0) + (sync-enabled? #t))) + +(define l2md-repo-guix-devel + (rde/gnu:home-services:mail:l2md-repo + (name "guix-devel") + (urls "https://yhetil.org/guix-devel/0") + (maildir (l2md-maildir name)) + (pipe "") + (initial-import 0) + (sync-enabled? #t))) + +(define l2md-repo-guix-user + (rde/gnu:home-services:mail:l2md-repo + (name "guix-user") + (urls "https://yhetil.org/guix-user/0") + (maildir (l2md-maildir name)) + (pipe "") + (initial-import 0) + (sync-enabled? #t))) + +(define l2md-configuration + (rde/gnu:home-services:mail:home-l2md-configuration + (l2md gnu:packages:mail:l2md) + (autostart? #t) + (period 180) + (oneshot 0) + (maildir "") + (pipe "") + (base "~/Publiczne/l2md") + (repos (list l2md-repo-guile-user + l2md-repo-guix-devel + l2md-repo-guix-user)))) + +(define home-l2md + (gnu:services:service + rde/gnu:home-services:mail:home-l2md-service-type + l2md-configuration)) + +(define samba-configuration + (gnu:services:samba:samba-configuration + (enable-smbd? #t) + (config-file (mixed-text-file "smb.conf" + "[global]\n" + "map to guest = Bad User\n" + "logging = syslog@1\n" + "\n" + "[public]\n" + "browsable = yes\n" + "path = /tmp\n" + "read only = no\n" + "guest ok = yes\n" + "guest only = yes\n")))) + +(define samba-service + (gnu:services:service + gnu:services:samba:samba-service-type + samba-configuration)) + +(define named-home-environment-1000 + (let + ( (named-home-environment- users:id1000:named-home-environment)) + (let + ( (home-environment- (car (cdr named-home-environment-))) + (name- (car named-home-environment-))) + (let* + ( (services- (gnu:home:home-environment-user-services home-environment-)) + (packages- (gnu:home:home-environment-packages home-environment-)) + (home-environment-* (gnu:home:home-environment + (inherit home-environment-) + (packages packages-) + (services (cons* home-l2md + services-))))) + (list name- + home-environment-*))))) + +(define guix-homes + (list named-home-environment-1000)) + +(define guix-home-service + (sovereign:systems:guix-home-service guix-homes)) + +(define offload-auth + (gnu:services:simple-service 'offload-authorizations + gnu:services:base:guix-service-type + guix-offload-authorizations)) + +(define guix-publish-configuration + (gnu:services:base:guix-publish-configuration + (host "0.0.0.0") + (port 8080) + (advertise? #t))) + +(define-public guix-publish-service + (sovereign:services:guix-publish-service guix-publish-configuration)) + +(define bootloader-configuration-targets-rakan + (list "/dev/sda" + "/dev/nvme0n1" + "/dev/nvme1n1" + "/dev/nvme2n1" + "/dev/nvme3n1")) + +(define-public system + (gnu:system:operating-system + (kernel nongnu:packages:linux:linux) + (kernel-loadable-modules (list)) + (kernel-arguments gnu:system:%default-kernel-arguments) + (hurd #f) + (bootloader (custom-bootloader-configuration bootloader-configuration-targets-rakan)) + (label (sovereign:systems:operating-system-label* system-name + gnu:system:this-operating-system)) + (keyboard-layout sovereign:systems:keyboard-layout) + (initrd nongnu:system:linux-initrd:microcode-initrd) + (initrd-modules (cons* "mei_me" + gnu:system:linux-initrd:%base-initrd-modules)) + (firmware (list nongnu:packages:linux:linux-firmware)) + (host-name system-name) + (hosts-file #f) + (mapped-devices (list)) + (file-systems (cons* file-system/root-btrfs + file-system-efi + deployment:system:file-systems:file-system-dokumenty + deployment:system:file-systems:file-system-szablony + gnu:system:file-systems:%base-file-systems)) + (swap-devices (list swap)) + (users (cons* users:id1000:uid1000-account + gnu:system:shadow:%base-user-accounts)) + (groups gnu:system:shadow:%base-groups) + (skeletons (gnu:system:shadow:default-skeletons)) + (issue (@@ (gnu system) %default-issue)) + (packages (cons* gnu:packages:libreoffice:libreoffice + gnu:system:%base-packages)) + (timezone "Europe/Warsaw") + (locale sovereign:systems:pl-locale) + (locale-definitions sovereign:systems:%sovereign-locale-definitions) + (locale-libcs gnu:system:locale:%default-locale-libcs) + (name-service-switch gnu:system:nss:%default-nss) + (essential-services (gnu:system:operating-system-default-essential-services gnu:system:this-operating-system)) + (services (cons* deployment:services:nfs:autofs-rakan_service-record + guix-home-service + guix-publish-service + deployment:services:nfs:nfs-rakan_service-record + sovereign:packages:protonmail:nogui-profile + offload-auth + deployment:services:qemu-binfmt_rakan-record + samba-service + deployment:services:vpn:wireguard-service-rakan + sovereign:systems:%sovereign-services)) + (pam-services (gnu:system:pam:base-pam-services)) + (privileged-programs gnu:system:%default-privileged-programs) + (sudoers-file sovereign:systems:%sovereign-sudoers-specification) + (location (and=> (current-source-location) + guix:diagnostics:source-properties->location)))) + +(define-public operating-system* system) diff --git a/machines/inspiron.scm b/machines/inspiron.scm deleted file mode 100644 index ff7f8bc..0000000 --- a/machines/inspiron.scm +++ /dev/null @@ -1,66 +0,0 @@ -(define-module (machines inspiron) - ;; bootloader-configuration - #:use-module (gnu bootloader) - - ;; grub-bootloader - #:use-module (gnu bootloader grub) - - ;; file-system - ;; swap-space - #:use-module (gnu system file-systems) - - ;; linux - ;; linux-firmware - #:use-module (nongnu packages linux) - - ;; microcode-initrd - #:use-module (nongnu system linux-initrd)) - -;; bootloader-configuration -(define-public (bootloader-configuration* keyboard-layout*) - (let ((bootloader* grub-bootloader) - (bootloader-targets (list "/dev/sda")) ; TODO: generalize the target - ) - (bootloader-configuration (bootloader bootloader*) - (targets bootloader-targets) - (keyboard-layout keyboard-layout*)))) - -;; string -> -;; (list record* file-system) -(define-public (file-systems* host-name*) - (let* ((root-device-string (string-append host-name* "-root")) - - (root-device (file-system-label root-device-string)) - - (file-system-root (file-system (type "ext4") - (mount-point "/") - (device root-device)))) - (list file-system-root))) - -;; (list record* package) -(define-public firmware* - (list linux-firmware)) - -;; (list string) -(define-public hardware-groups - (list "audio" - "netdev" - "video")) - -;; record* package -(define-public initrd* - microcode-initrd) - -;; record* package -(define-public kernel* - linux) - -;; string -> -;; (list record* swap-space) -(define-public (swap-devices* host-name*) - (let* ((label* (string-append host-name* "-swap")) - - (target* (file-system-label label*)) - - (swap-space* (swap-space (target target*)))) - (list swap-space*))) diff --git a/machines/portable-bios.scm b/machines/portable-bios.scm deleted file mode 100644 index 5364300..0000000 --- a/machines/portable-bios.scm +++ /dev/null @@ -1,60 +0,0 @@ -(define-module (machines portable-bios) - ;; bootloader-configuration - #:use-module (gnu bootloader) - - ;; grub-bootloader - #:use-module (gnu bootloader grub) - - ;; file-system - ;; swap-space - #:use-module (gnu system file-systems) - - ;; linux - ;; linux-firmware - #:use-module (nongnu packages linux) - - ;; microcode-initrd - #:use-module (nongnu system linux-initrd)) - -;; bootloader-configuration -(define-public (bootloader-configuration* keyboard-layout*) - (let ((bootloader* grub-bootloader) - (bootloader-targets (list "/dev/sdb")) ; TODO: generalize the target - ) - (bootloader-configuration (bootloader bootloader*) - (targets bootloader-targets) - (keyboard-layout keyboard-layout*)))) - -;; string -> -;; (list record* file-system) -(define-public (file-systems* host-name*) - (let* ((root-device-string (string-append host-name* "-root")) - - (root-device (file-system-label root-device-string)) - - (file-system-root (file-system (type "ext4") - (mount-point "/") - (device root-device)))) - (list file-system-root))) - -;; (list record* package) -(define-public firmware* - (list linux-firmware)) - -;; record* package -(define-public initrd* - microcode-initrd) - -;; record* package -(define-public kernel* - linux) - -;; string -> -;; (list record* swap-space) -(define-public (swap-devices* host-name*) - (let* ((label* (string-append host-name* "-swap")) - - (target* (file-system-label label*)) - - (swap-space* (swap-space (target target*)))) - (list swap-space*))) diff --git a/machines/thinkpad-x200.scm b/machines/thinkpad-x200.scm deleted file mode 100644 index faca5b0..0000000 --- a/machines/thinkpad-x200.scm +++ /dev/null @@ -1,60 +0,0 @@ -(define-module (machines thinkpad-x200) - ;; bootloader-configuration - #:use-module (gnu bootloader) - - ;; grub-bootloader - #:use-module (gnu bootloader grub) - - ;; file-system - ;; swap-space - #:use-module (gnu system file-systems) - - ;; linux - ;; linux-firmware - #:use-module (nongnu packages linux) - - ;; microcode-initrd - #:use-module (nongnu system linux-initrd)) - -;; bootloader-configuration -(define-public (bootloader-configuration* keyboard-layout*) - (let ((bootloader* grub-bootloader) - (bootloader-targets (list "/dev/sda")) ; TODO: generalize the target - ) - (bootloader-configuration (bootloader bootloader*) - (targets bootloader-targets) - (keyboard-layout keyboard-layout*)))) - -;; string -> -;; (list record* file-system) -(define-public (file-systems* host-name*) - (let* ((root-device-string (string-append host-name* "-root")) - - (root-device (file-system-label root-device-string)) - - (file-system-root (file-system (type "ext4") - (mount-point "/") - (device root-device)))) - (list file-system-root))) - -;; (list record* package) -(define-public firmware* - (list linux-firmware)) - -;; record* package -(define-public initrd* - microcode-initrd) - -;; record* package -(define-public kernel* - linux) - -;; string -> -;; (list record* swap-space) -(define-public (swap-devices* host-name*) - (let* ((label* (string-append host-name* "-swap")) - - (target* (file-system-label label*)) - - (swap-space* (swap-space (target target*)))) - (list swap-space*))) diff --git a/packages/reproducible-build.patch b/packages/reproducible-build.patch deleted file mode 100644 index 963f07c..0000000 --- a/packages/reproducible-build.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/babosa.gemspec b/babosa.gemspec -index 502c217..492be89 100644 ---- a/babosa.gemspec -+++ b/babosa.gemspec -@@ -28,8 +28,4 @@ Gem::Specification.new do |s| - - s.required_ruby_version = ">= 2.6.0" - -- s.cert_chain = [File.expand_path("certs/parndt.pem", __dir__)] -- if $PROGRAM_NAME.end_with?("gem") && ARGV.include?("build") && ARGV.include?(__FILE__) -- s.signing_key = File.expand_path("~/.ssh/gem-private_key.pem") -- end - end diff --git a/packages/ruby-nano-bots.scm b/packages/ruby-nano-bots.scm deleted file mode 100644 index d98f79e..0000000 --- a/packages/ruby-nano-bots.scm +++ /dev/null @@ -1,591 +0,0 @@ -(define-module (packages ruby-nano-bots) - #:use-module (gnu packages) - #:use-module (gnu packages curl) - #:use-module (gnu packages ruby) - #:use-module (guix build-system ruby) - #:use-module (guix download) - #:use-module ((guix licenses) - #:prefix license:) - #:use-module (guix packages)) - -;;; ABSTRACTION -4 - -(define ruby-google-style - (package - (name "ruby-google-style") - (version "1.27.1") - (source - (origin - (uri - (rubygems-uri "google-style" "1.27.1")) - (method url-fetch) - (hash - (content-hash "1h7il47mn160idh8gjliy597n31gn9cq77jq65gkd93kcrszjpxa")))) - (build-system ruby-build-system) - (arguments - '(#:phases - (modify-phases - %standard-phases - (delete 'check)))) - (inputs - (list ruby-rubocop)) - (synopsis "A spec-compliant event stream parser") - (description - (string-append - "It only deals with the parsing of events and not any of the" - " client/transport aspects. This is not a Server-sent Events (SSE)" - " client.")) - (license license:expat) - (home-page "https://github.com/norman/babosa"))) - -;;; ABSTRACTION -3 - -(define ruby-google-cloud-env - (package - (name "ruby-google-cloud-env") - (version "2.1.1") - (source - (origin - (uri - (rubygems-uri "google-cloud-env" "2.1.1")) - (method url-fetch) - (hash - (content-hash "16b9yjbrzal1cjkdbn29fl06ikjn1dpg1vdsjak1xvhpsp3vhjyg")))) - (build-system ruby-build-system) - (arguments - '(#:phases - (modify-phases - %standard-phases - (delete 'check)))) - (inputs - (list ruby-faraday)) - (synopsis "A spec-compliant event stream parser") - (description - (string-append - "It only deals with the parsing of events and not any of the" - " client/transport aspects. This is not a Server-sent Events (SSE)" - " client.")) - (license license:expat) - (home-page "https://github.com/norman/babosa"))) - -(define ruby-os - (package - (name "ruby-os") - (version "1.1.4") - (source - (origin - (uri - (rubygems-uri "os" "1.1.4")) - (method url-fetch) - (hash - (content-hash "0gwd20smyhxbm687vdikfh1gpi96h8qb1x28s2pdcysf6dm6v0ap")))) - (build-system ruby-build-system) - (arguments - '(#:phases - (modify-phases - %standard-phases - (delete 'check)))) - (native-inputs - (list ruby-rake ruby-rspec ruby-test-unit)) - (synopsis "A spec-compliant event stream parser") - (description - (string-append - "It only deals with the parsing of events and not any of the" - " client/transport aspects. This is not a Server-sent Events (SSE)" - " client.")) - (license license:expat) - (home-page "https://github.com/norman/babosa"))) - -(define ruby-signet - (package - (name "ruby-signet") - (version "0.18.0") - (source - (origin - (uri - (rubygems-uri "signet" "0.18.0")) - (method url-fetch) - (hash - (content-hash "0fzakk5y7zzii76zlkynpp1c764mzkkfg4mpj18f5pf2xp1aikb6")))) - (build-system ruby-build-system) - (arguments - '(#:phases - (modify-phases - %standard-phases - (delete 'check)))) - (inputs - (list ruby-addressable ruby-faraday ruby-jwt ruby-multi-json)) - (native-inputs - (list - ruby-google-style - ruby-kramdown - ruby-launchy - ruby-rake - ruby-redcarpet - ruby-rspec - ruby-yard)) - (synopsis "A spec-compliant event stream parser") - (description - (string-append - "It only deals with the parsing of events and not any of the" - " client/transport aspects. This is not a Server-sent Events (SSE)" - " client.")) - (license license:expat) - (home-page "https://github.com/norman/babosa"))) - -;;; ABSTRACTION -2 - -(define ruby-event_stream_parser - (package - (name "ruby-event_stream_parser") - (version "1.0.0") - (source - (origin - (uri - (rubygems-uri "event_stream_parser" "1.0.0")) - (method url-fetch) - (hash - (content-hash "1j73glgif3f97q3znq9ih67h5i7zd1wqzj2d33w8cqhjf2mkns52")))) - (build-system ruby-build-system) - (arguments - '(#:phases - (modify-phases - %standard-phases - (delete 'check)))) - (synopsis "A spec-compliant event stream parser") - (description - (string-append - "It only deals with the parsing of events and not any of the" - " client/transport aspects. This is not a Server-sent Events (SSE)" - " client.")) - (license license:expat) - (home-page "https://github.com/norman/babosa"))) - -(define ruby-faraday-typhoeus - (package - (name "ruby-faraday-typhoeus") - (version "1.1.0") - (source - (origin - (uri - (rubygems-uri "faraday-typhoeus" "1.1.0")) - (method url-fetch) - (hash - (content-hash "1rwhd2f78vqj0wkkdah395apx6igp5xf82n5xgixs61q45y19ii4")))) - (build-system ruby-build-system) - (arguments - '(#:phases - (modify-phases - %standard-phases - (delete 'check)))) - (inputs - (list ruby-faraday ruby-typhoeus-1.4.1)) - (synopsis "A library for creating slugs.") - (description - (string-append - "Babosa is an extraction and improvement of the string code from" - " FriendlyId, intended to help developers create similar libraries or" - " plugins.")) - (license license:expat) - (home-page "https://github.com/norman/babosa"))) - -(define ruby-googleauth - (package - (name "ruby-googleauth") - (version "1.9.2") - (source - (origin - (uri - (rubygems-uri "googleauth" "1.9.2")) - (method url-fetch) - (hash - (content-hash "1qpvsvcag90nw2fjws12m96hsicpmcv04v35j9aiik9rmxxvlk9h")))) - (build-system ruby-build-system) - (arguments - '(#:phases - (modify-phases - %standard-phases - (delete 'check)))) - (inputs - (list - ruby-faraday - ruby-google-cloud-env - ruby-jwt - ruby-multi-json - ruby-os - ruby-signet)) - (synopsis "A library for creating slugs.") - (description - (string-append - "Babosa is an extraction and improvement of the string code from" - " FriendlyId, intended to help developers create similar libraries or" - " plugins.")) - (license license:expat) - (home-page "https://github.com/norman/babosa"))) - -(define ruby-typhoeus-1.4.1 - (package - (inherit ruby-typhoeus) - (version "1.4.1") - (source - (origin - (uri - (rubygems-uri "typhoeus" "1.4.1")) - (method url-fetch) - (hash - (content-hash "0z7gamf6s83wy0yqms3bi4srirn3fc0lc7n65lqanidxcj1xn5qw")))))) - -;;; ABSTRACTION -1 - -(define ruby-babosa - (package - (name "ruby-babosa") - (version "2.0.0") - (source - (origin - (uri - (rubygems-uri "babosa" "2.0.0")) - (method url-fetch) - (hash - (content-hash "19mqrnyizr1ipdp26vhrg0hwb851bwyvrs6xc29dk3ywljw8s8d6")))) - (build-system ruby-build-system) - (native-inputs - (list - ruby-rubocop - ruby-rspec - ruby-simplecov)) - (synopsis "A library for creating slugs.") - (description - (string-append - "Babosa is an extraction and improvement of the string code from" - " FriendlyId, intended to help developers create similar libraries or" - " plugins.")) - (license license:expat) - (home-page "https://github.com/norman/babosa"))) - -(define ruby-cohere-ai - (package - (name "ruby-cohere-ai") - (version "1.0.2") - (source - (origin - (uri - (rubygems-uri "cohere-ai" "1.0.2")) - (method url-fetch) - (hash - (content-hash "03nni5ab1zh176zrqfjkn34hy1xhwdjkqybjr8ih1pnwf9c94dbm")))) - (build-system ruby-build-system) - (arguments - '(#:phases - (modify-phases - %standard-phases - (delete 'check)))) - (inputs - (list ruby-faraday)) - (synopsis "A Ruby gem for interacting with Cohere AI platform.") - (description - (string-append - "This Gem is designed to provide low-level access to Cohere AI, enabling" - " people to build abstractions on top of it. If you are interested in more" - " high-level abstractions or more user-friendly tools, you may want to" - " consider Nano Bots.")) - (license license:expat) - (home-page "https://rubygems.org/gems/cohere-ai"))) - -(define ruby-faraday-2.9 - (package - (inherit ruby-faraday) - (version "2.9.0") - (source - (origin - (uri - (rubygems-uri "faraday" "2.9.0")) - (method url-fetch) - (hash - (content-hash "1qqb1rmk0f9m82iijjlqadh5yby1bhnr6svjk9vxdvh6f181988s")))) - (arguments - '(#:phases - (modify-phases - %standard-phases - (delete 'check)))) - (inputs - (list ruby-faraday-net-http)))) - -(define ruby-gemini-ai - (package - (name "ruby-gemini-ai") - (version "3.2.0") - (source - (origin - (uri - (rubygems-uri "gemini-ai" "3.2.0")) - (method url-fetch) - (hash - (content-hash "1fbk135pf99i20hnxn50rzsv5ln9b7ibifcnya40blbbxcsxk01q")))) - (build-system ruby-build-system) - (arguments - '(#:phases - (modify-phases - %standard-phases - (delete 'check)))) - (inputs - (list - ruby-event_stream_parser - ruby-faraday - ruby-faraday-typhoeus - ruby-googleauth - ruby-typhoeus-1.4.1)) - (synopsis - (string-append - "A Ruby Gem for interacting with Gemini through Vertex AI, Generative" - " Language API, or AI Studio, Google's generative AI services.")) - (description - (string-append - "This Gem is designed to provide low-level access to Gemini, enabling" - " people to build abstractions on top of it. If you are interested in more" - " high-level abstractions or more user-friendly tools, you may want to" - " consider Nano Bots.")) - (license license:expat) - (home-page "https://rubygems.org/gems/gemini-ai"))) - -(define ruby-maritaca-ai - (package - (name "ruby-maritaca-ai") - (version "1.0.1") - (source - (origin - (uri - (rubygems-uri "maritaca-ai" "1.0.1")) - (method url-fetch) - (hash - (content-hash "1n2a9197l8zvwg3m5837qs8m1dd562zs703gqc28c5za09qfgxcb")))) - (build-system ruby-build-system) - (arguments - '(#:phases - (modify-phases - %standard-phases - (delete 'check)))) - (inputs - (list ruby-faraday)) - (synopsis - "A Ruby gem for interacting with Maritaca AI's large language models.") - (description - (string-append - "This Gem is designed to provide low-level access to MariTalk, enabling" - " people to build abstractions on top of it. If you are interested in more" - " high-level abstractions or more user-friendly tools, you may want to" - " consider Nano Bots.")) - (license license:expat) - (home-page "https://rubygems.org/gems/gemini-ai"))) - -(define ruby-mistral-ai - (package - (name "ruby-mistral-ai") - (version "1.1.2") - (source - (origin - (uri - (rubygems-uri "mistral-ai" "1.1.2")) - (method url-fetch) - (hash - (content-hash "1yvzg4aqlh2kfg7s1ai67q47z29pq8qcg2qzv2cmrycw2pzcr4c7")))) - (build-system ruby-build-system) - (arguments - '(#:phases - (modify-phases - %standard-phases - (delete 'check)))) - (inputs - (list ruby-event_stream_parser ruby-faraday)) - (synopsis - "A Ruby gem for interacting with Mistral AI's large language models.") - (description - (string-append - "This Gem is designed to provide low-level access to Mistral, enabling" - " people to build abstractions on top of it. If you are interested in more" - " high-level abstractions or more user-friendly tools, you may want to" - " consider Nano Bots.")) - (license license:expat) - (home-page "https://rubygems.org/gems/gemini-ai"))) - -(define ruby-ollama-ai - (package - (name "ruby-ollama-ai") - (version "1.0.1") - (source - (origin - (uri - (rubygems-uri "ollama-ai" "1.0.1")) - (method url-fetch) - (hash - (content-hash "05f0ir94j4qjgrnq7alsss2g3njlxf9b404i2jc8y4vd16450sy6")))) - (build-system ruby-build-system) - (arguments - '(#:phases - (modify-phases - %standard-phases - (delete 'check)))) - (inputs - (list ruby-faraday)) - (synopsis - (string-append - "A Ruby gem for interacting with Ollama's API that allows you to run open" - " source AI LLMs (Large Language Models) locally.")) - (description - (string-append - "This Gem is designed to provide low-level access to Ollama, enabling" - " people to build abstractions on top of it. If you are interested in more" - " high-level abstractions or more user-friendly tools, you may want to" - " consider Nano Bots")) - (license license:expat) - (home-page "https://rubygems.org/gems/gemini-ai"))) - -(define ruby-rainbow-3.1 - (package - (inherit ruby-rainbow) - (version "3.1.1") - (source - (origin - (uri - (rubygems-uri "rainbow" "3.1.1")) - (method url-fetch) - (hash - (content-hash "0smwg4mii0fm38pyb5fddbmrdpifwv22zv3d3px2xx497am93503")))))) - -(define ruby-redcarpet-3.6 - (package - (inherit ruby-redcarpet) - (version "3.6.0") - (source - (origin - (uri - (rubygems-uri "redcarpet" "3.6.0")) - (method url-fetch) - (hash - (content-hash "1sg9sbf9pm91l7lac7fs4silabyn0vflxwaa2x3lrzsm0ff8ilca")))))) - -(define ruby-openai - (package - (name "ruby-openai") - (version "6.3.1") - (source - (origin - (uri - (rubygems-uri "ruby-openai" "6.3.1")) - (method url-fetch) - (hash - (content-hash "06jc0zn69gcriw103f2knmzba7zv57md3m4wb9jgdf5d06iyjmwb")))) - (build-system ruby-build-system) - (arguments - '(#:phases - (modify-phases - %standard-phases - (delete 'check)))) - (inputs - (list - ruby-event_stream_parser - ruby-faraday - ruby-faraday-multipart - ruby-rspec-core)) - (synopsis "OpenAI API + Ruby!") - (description - (string-append - "Stream text with GPT-4, transcribe and translate audio with Whisper, or" - " create images with DALL·E...")) - (license license:expat) - (home-page "https://rubygems.org/gems/gemini-ai"))) - -(define ruby-sweet-moon - (package - (name "ruby-sweet-moon") - (version "0.0.7") - (source - (origin - (uri - (rubygems-uri "sweet-moon" "0.0.7")) - (method url-fetch) - (hash - (content-hash "16kdf7hfxci6iljw7fmq2xc7dyqpb81rzfdqjgw00p0p7sckgwz9")))) - (build-system ruby-build-system) - (arguments - '(#:phases - (modify-phases - %standard-phases - (delete 'check)))) - (synopsis "Lua / Fennel from Ruby and vice versa.") - (description - (string-append - "Lua / Fennel from Ruby and vice versa. Support to LuaJIT, Lua 5.0, and" - " 5.1. Lua C API for Lua 5, 4, and 3. LuaRocks and fnx integration.")) - (license license:expat) - (home-page "https://rubygems.org/gems/sweet-moon"))) - -;;; ABSTRACTION 0 - -(define-public ruby-nano-bots - (package - (name "ruby-nano-bots") - (version "3.0.1") - (source - (origin - (uri - (rubygems-uri "nano-bots" "3.0.1")) - (method url-fetch) - (hash - (content-hash "14cnllgxl0w6jj1kcmh6vskl17k42skarsrld4r2f9ajnxxd1avk")))) - (build-system ruby-build-system) - (arguments - '(#:phases - (modify-phases - %standard-phases - (delete 'check) - (add-after - 'wrap - 'include-curl - (lambda* (#:key inputs outputs #:allow-other-keys) - (wrap-program - (search-input-file outputs "bin/nb") - `("LD_LIBRARY_PATH" - suffix - ,(list - (dirname - (search-input-file inputs "lib/libcurl.so")))))))))) - (inputs - (list - curl - ruby-addressable - ruby-babosa - ruby-cohere-ai - ruby-concurrent-ruby - ruby-dotenv - ruby-event_stream_parser - ruby-faraday-2.9 - ruby-faraday-multipart - ruby-faraday-typhoeus - ruby-gemini-ai - ruby-googleauth - ruby-google-cloud-env - ruby-jwt - ruby-maritaca-ai - ruby-mistral-ai - ruby-multi-json - ruby-ollama-ai - ruby-os - ruby-pry - ruby-rainbow-3.1 - ruby-rbnacl - ruby-redcarpet-3.6 - ruby-signet - ruby-typhoeus-1.4.1 - ruby-openai - ruby-sweet-moon)) - (synopsis "Ruby Nano Bots") - (description - (string-append - "Ruby Implementation of Nano Bots: small, AI-powered bots that can be" - " easily shared as a single file, designed to support multiple providers" - " such as Cohere Command, Google Gemini, Maritaca AI MariTalk, Mistral AI," - " Ollama, OpenAI ChatGPT, and others, with support for calling tools" - " (functions).")) - (license license:expat) - (home-page "https://rubygems.org/gems/nano-bots"))) diff --git a/systems/aisaka.scm b/systems/aisaka.scm deleted file mode 100644 index b5db185..0000000 --- a/systems/aisaka.scm +++ /dev/null @@ -1,67 +0,0 @@ -(define-module (systems aisaka) - ;; service - #:use-module (gnu services) - - ;; guix-home-service-type - #:use-module (gnu services guix) - - ;; keyboard-layout - #:use-module (gnu system keyboard) - - ;; bootloader-configuration* - ;; file-systems* - ;; firmware* - ;; hardware-groups - ;; initrd* - ;; kernel* - ;; swap-devices* - #:use-module (machines inspiron) - - ;; %suweren-operating-system - #:use-module (suweren system) - - ;; uid1000-account - ;; uid1000-home-environment - ;; uid1000-name - #:use-module (users id1000) - - ;; uid1001-account - ;; uid1001-home-environment - ;; uid1001-name - #:use-module (users id1001)) - -;; string -(define host-name* - "aisaka") - -;; (record user-account) -(define users* - (list uid1000-account - uid1001-account)) - -;; record operating-system -(define-public operating-system* - (let* ((home-environments `((,uid1000-name ,(uid1000-home-environment host-name*)) - (,uid1001-name ,(uid1001-home-environment host-name*)))) - - (guix-home (service guix-home-service-type - home-environments)) - - (keyboard-layout* (keyboard-layout "pl")) - (services* (list guix-home)) - (timezone* "Europe/Warsaw") - (locale* "pl_PL.utf8")) - (%suweren-operating-system kernel* - (bootloader-configuration* keyboard-layout*) - keyboard-layout* - initrd* - firmware* - host-name* - (file-systems* host-name*) - (swap-devices* host-name*) - users* - timezone* - locale* - services*))) - -operating-system* diff --git a/systems/aisaka/.bash_profile b/systems/aisaka/.bash_profile deleted file mode 100644 index 37ea25c..0000000 --- a/systems/aisaka/.bash_profile +++ /dev/null @@ -1,2 +0,0 @@ -# Honor per-interactive-shell startup file -if [ -f ~/.bashrc ]; then . ~/.bashrc; fi diff --git a/systems/aisaka/.bashrc b/systems/aisaka/.bashrc deleted file mode 100644 index 78e9cea..0000000 --- a/systems/aisaka/.bashrc +++ /dev/null @@ -1,31 +0,0 @@ -# Bash initialization for interactive non-login shells and -# for remote shells (info "(bash) Bash Startup Files"). - -# Export 'SHELL' to child processes. Programs such as 'screen' -# honor it and otherwise use /bin/sh. -export SHELL - -if [[ $- != *i* ]] -then - # We are being invoked from a non-interactive shell. If this - # is an SSH session (as in "ssh host command"), source - # /etc/profile so we get PATH and other essential variables. - [[ -n "$SSH_CLIENT" ]] && source /etc/profile - - # Don't do anything else. - return -fi - -# Source the system-wide file. -source /etc/bashrc - -# Adjust the prompt depending on whether we're in 'guix environment'. -if [ -n "$GUIX_ENVIRONMENT" ] -then - PS1='\n\u@\h [env]\$ ' -else - PS1='\n\u@\h \$ ' -fi -alias ls='ls -p --color=auto' -alias ll='ls -l' -alias grep='grep --color=auto' diff --git a/systems/aisaka/aisaka.org b/systems/aisaka/aisaka.org deleted file mode 100644 index 8fc2986..0000000 --- a/systems/aisaka/aisaka.org +++ /dev/null @@ -1,657 +0,0 @@ -#+title: Configuration of the Aisaka computer -*- mode: org -*- -#+startup: overview -#+property: header-args:scheme :noweb yes -#+property: header-args:scheme+ :noweb-prefix yes -#+property: header-args:shell :noweb yes -#+property: Header-args:shell+ :noweb-prefix yes - -* TODO Guix - -https://guix.gnu.org/en/manual/en/html_node/ - -** TODO Installation - -https://guix.gnu.org/en/manual/en/html_node/Installation.html - -*** TODO Invoking guix-daemon - -https://guix.gnu.org/en/manual/en/html_node/Invoking-guix_002ddaemon.html - -#+begin_src scheme :noweb-ref guix-options - "--gc-keep-derivations=yes" - "--gc-keep-outputs=yes" -#+end_src - -** TODO System configuration - -https://guix.gnu.org/en/manual/en/html_node/System-Configuration.html - -#+begin_src scheme :noweb-ref system-dump :tangle system-configuration.scm - (define-module (systems aisaka system-configuration) - #:use-module (gnu) - #:use-module (gnu packages commencement) - #:use-module (gnu packages cups) - #:use-module (gnu packages finance) - #:use-module (gnu services cups) - #:use-module (gnu services configuration) - #:use-module (gnu services desktop) - #:use-module (gnu services networking) - #:use-module (gnu services nix) - #:use-module (gnu services ssh) - #:use-module (gnu services version-control) - #:use-module (gnu services xorg)) - - (define keyboard-layout - (keyboard-layout "pl")) - - (operating-system - (locale "pl_PL.utf8") - (timezone "Europe/Warsaw") - (keyboard-layout keyboard-layout) - (host-name "aisaka") - (users (cons* (user-account (name "marek") - (comment "Marek Paśnikowski") - (group "users") - (home-directory "/home/marek") - (supplementary-groups '("audio" - "netdev" - "tor" - "video" - "wheel"))) - %base-user-accounts)) - (packages - (append - (map - <<to-package+output>> - '(;; "netcat-openbsd" - "ntfs-3g")) - ( map - <<to-package+output>> - ( list ) ) - %base-packages)) - (services - <<system-services>>) - (bootloader (bootloader-configuration (bootloader grub-bootloader) - (targets '("/dev/sda")) - (keyboard-layout keyboard-layout))) - (swap-devices - (list - <<swap>>)) - (mapped-devices - (list - <<luks>>)) - (file-systems - (append %base-file-systems - (list - <<rootfs>> - <<bootfs>>)))) -#+end_src - -*** TODO Services - -https://guix.gnu.org/en/manual/en/html_node/Services.html - -#+begin_src scheme :noweb-ref system-services - (append - (list - (extra-special-file - "/lib64/ld-linux-x86-64.so.2" - (file-append (canonical-package glibc) "/lib/ld-linux-x86-64.so.2")) - (extra-special-file - "/lib64/libstdc++.so.6" - (file-append (canonical-package gcc-toolchain) "/lib/libstdc++.so.6")) - (extra-special-file - "/usr/lib64/libstdc++.so.6" - (file-append (canonical-package gcc-toolchain) "/lib/libstdc++.so.6")) - <<ssh-system-service>> - <<system-base-services>> - <<system-miscellaneous-services>> - <<trezor-system-packages>> - (service - cups-service-type - (cups-configuration - (extensions - (list - cups-filters - epson-inkjet-printer-escpr)) - (web-interface? #t))) - (service git-daemon-service-type - (git-daemon-configuration - (export-all? #t))) - (service gnome-desktop-service-type) - (service plasma-desktop-service-type) - (service - tor-service-type - (tor-configuration - (control-socket? #t)))) - (modify-services - %desktop-services - (elogind-service-type - configuration => - (elogind-configuration - (inherit configuration) - (handle-lid-switch 'ignore))) - (gdm-service-type - configuration => - (gdm-configuration - (inherit configuration) - (wayland? #t))) - (delete guix-service-type))) -#+end_src - -**** TODO Base Services - -https://guix.gnu.org/en/manual/en/html_node/Base-Services.html - -#+begin_src scheme :noweb-ref system-base-services - <<trezor-udev-rules>> - (service - guix-service-type - (guix-configuration - (extra-options - (list - <<guix-options>>)))) -#+end_src - -**** TODO Miscellaneous Services - -https://guix.gnu.org/en/manual/en/html_node/Miscellaneous-Services.html - -#+begin_src scheme :noweb-ref system-miscellaneous-services - (service nix-service-type) -#+end_src - -** TODO Home configuration - -https://guix.gnu.org/en/manual/devel/en/html_node/Home-Configuration.html - -#+begin_src scheme :noweb-ref home-dump :tangle home-configuration.scm - (define-module (systems aisaka home-configuration) - #:use-module (gnu home) - #:use-module (gnu home services) - #:use-module (gnu home services shells) - #:use-module (gnu packages) - #:use-module (gnu services) - #:use-module (guix gexp)) - - (define allow-downgrades - "--allow-downgrades ") - - (define config-prefix - "/home/marek/Publiczny/src/deployment/systems/aisaka/") - - (define pull-guix - "guix pull ") - - (define pull-guix- - (string-append pull-guix - allow-downgrades - "--disable-authentication ")) - - (define guix-home - "guix home reconfigure ") - - (define home-configuration - "home-configuration.scm ") - - (define reconfigure-home - (string-append guix-home - config-prefix - home-configuration)) - - (define reconfigure-home- - (string-append reconfigure-home - allow-downgrades)) - - (define guix-system - "sudo guix system reconfigure ") - - (define system-configuration - "system-configuration.scm ") - - (define reconfigure-system - (string-append guix-system - config-prefix - system-configuration)) - - (define reconfigure-system- - (string-append reconfigure-system - allow-downgrades)) - - (define and - "&& ") - - (define system-update - (string-append pull-guix - and - reconfigure-system - and - reconfigure-home - and - "sudo guix gc -d 7d")) - - (define system-update- - (string-append pull-guix- - and - reconfigure-system- - and - reconfigure-home- - and - "sudo guix gc -d 7d")) - - (home-environment - (packages - (map - <<to-package+output>> - '("adwaita-icon-theme" - "alacritty" - "clamav" - "dconf-editor" - "emacs-next" - "emacs-aggressive-indent" - "emacs-eldoc" - "emacs-geiser" - "emacs-geiser-guile" - "emacs-nix-mode" - "emacs-nov-el" - "emacs-org-contacts" - "emacs-org-contrib" - "emacs-paredit" - "font-google-noto" - "git" - "git-lfs" - "gnome-tweaks" - "gnupg" - "hicolor-icon-theme" - "icecat" - "jami" - "libadwaita" - "libreoffice" - "nm-tray" - "pwgen" - "seahorse" - "sicp" - "strace" - "unzip" - "zip"))) - (services - (list - <<flashrom-package>> - <<git-sendemail-packages>> - (service - (service-type - (name 'org-fc-tn-package) - (extensions - (list - (service-extension home-profile-service-type - (lambda (_) - (map specification->package - (list - ;; "emacs-org-fc-tn" - )))))) - (description "Custom version of ORG-FC.") - (default-value #f))) - <<ssh-user-configuration>> - ;; <<trezor-user-packages>> - (service home-bash-service-type - (home-bash-configuration - (environment-variables '(("EDITOR" . "emacs -nw") - ("GUILE_AUTO_COMPILE" . "0") - ("PATH" . "$PATH:/home/marek/.nix-profile/bin"))) - (aliases `(("grep" . "grep --color=auto ") - ("ll" . "ls -l ") - ("ls" . "ls -p --color=auto ") - ("nix" . "nix --extra-experimental-features flakes --extra-experimental-features nix-command") - ("pull-guix" . ,pull-guix) - ("pull-guix-" . ,pull-guix-) - ("reconfigure-home" . ,reconfigure-home) - ("reconfigure-home-" . ,reconfigure-home-) - ("reconfigure-system" . ,reconfigure-system) - ("reconfigure-system-" . ,reconfigure-system-) - ("system-update" . ,system-update) - ("system-update-" . ,system-update-))) - (bashrc (list - (local-file "data/bashrc"))))) - ;; (service - ;; home-channels-service-type - ;; (list - ;; (channel - ;; (name 'guix) - ;; (url "https://git.savannah.gnu.org/git/guix.git")) - ;; (channel - ;; (name 'jeko) - ;; (url "https://framagit.org/Jeko/guix-jeko-channel.git")) - ;; (channel - ;; (name 'nonguix) - ;; (url "https://gitlab.com/nonguix/nonguix") - ;; ;; Enable signature verification: - ;; (introduction - ;; (make-channel-introduction - ;; "897c1a470da759236cc11798f4e0a5f7d4d59fbc" - ;; (openpgp-fingerprint "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5")))) - ;; (channel (name 'org-fc-tn) - ;; (url "file:///home/marek/src/org-fc") - ;; (branch "repository")) - ;; (channel (name 'packages) - ;; (url "file:///home/marek/src/packages") - ;; (branch "master")) - ;; (channel (name 'channel) - ;; (url "https://git.marekpasnikowski.pl/git/channel.git") - ;; (branch "wip-channel") - ;; ( introduction - ;; ( make-channel-introduction - ;; "f8ccfe8f3e5c8bafe06665cbd4b0c9301e1a64b6" - ;; ( openpgp-fingerprint - ;; "590E 500F E39D 26B3 E60B 743B 6D81 B120 7711 899F" ) ) )))) - (simple-service 'configuration-files - home-files-service-type - `((".config/git/config" ,(local-file "data/git-config")) - (".emacs" ,(local-file "data/emacs-config"))))))) -#+end_src - -*** TODO bashrc - -#+begin_src shell :tangle data/bashrc - export LD_LIBRARY_PATH=$LIBRARY_PATH -#+end_src - -*** TODO emacs - -#+begin_src elisp :tangle data/emacs-config - ;;; Disable auto-backup - (setq-default make-backup-files nil) - - ;;; https://github.com/fimblo/dot.emacs - ;;; Theme Activation - (load-theme 'manoj-dark) - - ;;; Enable ParEdit - (add-hook 'prog-mode-hook 'enable-paredit-mode) - - ;;; https://elpa.gnu.org/packages/aggressive-indent.html - ;;; Automatic Activation of Aggressive Indent - (global-aggressive-indent-mode) - - ;; Highlight the pair of delimiters under the cursor - (setq-default show-paren-mode 1 - show-paren-delay 0) - - ;;; https://guix.gnu.org/manual/en/html_node/The-Perfect-Setup.html - ;;; Copyright Information - (setq-default user-full-name "Marek Paśnikowski" - user-mail-address "marekpasnikowski@protonmail.com") - - ;;; Startup Screen Inhibition - (setq-default inhibit-startup-screen t) - - ;; Enable the column-80 line - (setq-default display-fill-column-indicator 1 - display-fill-column-indicator-column 80) - (global-display-fill-column-indicator-mode) - - ;; Prepare Literate Programming - (setq-default - org-startup-indented t - org-confirm-babel-evaluate nil - org-src-fontify-natively t - org-src-tab-acts-natively t) - (org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . t) - (scheme . t ) - (shell . t ))) - - (add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode)) - - ;; Monospace Font in Ebook Reader - (setq-default nov-variable-pitch nil) - - ;; Disable Toolbar - (tool-bar-mode -1) - - ;; GNUS Configuration - (setq-default gnus-auto-select-first nil - gnus-select-method '(nnnil "") - gnus-secondary-select-methods '((nnimap "outlook" - (nnimap-address "outlook.office365.com") - (nnimap-server-port 993) - (nnimap-stream ssl) - (nnimap-authinfo-file "~/.authinfo")) - (nnimap "home" - (nnimap-address "serwer1930490.home.pl") - (nnimap-server-port 993) - (nnimap-stream ssl) - (nnimap-authinfo-file "~/.authinfo"))) - nnmail-split-method 'nnmail-split-fancy - nnmail-split-fancy '(| "normal")) - (add-hook 'gnus-group-mode-hook 'gnus-topic-mode) - - ;; Org Configuration - (setq-default org-contacts-files '("~/Dokumenty/UWM/filia w Ełku/Samorząd 2022/starostowie.org")) - - ;; ORG-FC Configuration - (require 'org-fc-hydra) - (setq-default - org-fc-algorithm 'tn - org-fc-directories '("~/Dokumenty/fiszki")) - - ;; Nix Mode - (require 'nix-mode) - (add-to-list 'auto-mode-alist '("\\.nix\\'" . nix-mode)) -#+end_src - -*** TODO git-config - -#+begin_src shell :tangle data/git-config - <<git-sendemail-config>> - <<git-user-config>> -#+end_src - -**** TODO User Configuration - -#+begin_src shell :noweb-ref git-user-config - [user] - name = "Marek Paśnikowski" - email = "marekpasnikowski@protonmail.com" -#+end_src - -* TODO Git Send Email - -https://git-send-email.io/ - -** TODO Installation - -https://git-send-email.io/#step-1 - -#+begin_src scheme :noweb-ref git-sendemail-packages - (service - (service-type - (name 'git-sendemail-packages) - (extensions - (list - (service-extension home-profile-service-type - (lambda (_) - (map - <<to-package+output>> - (list - "git" - "git:send-email")))))) - (description "Git Send Email") - (default-value #f))) -#+end_src - -** TODO Configuration - -https://git-send-email.io/#step-2 - -#+begin_src shell :noweb-ref git-sendemail-config - [sendemail] - smtpencryption = tls - smtpserver = localhost - smtpserverport = 1025 - smtpsslcertpath = "" - smtpuser = marekpasnikowski@protonmail.com -#+end_src - -* TODO LIBREBOOT - -The first layer of computing is the firmware. The Lenovo Thinkpad X200 has -a free Libreboot firmware installed. It is a good idea to keep it up to date. - -** TODO Flashrom - -Flashrom program is needed to write the computer firmware. The -program needs a relaxed kernel security feature. - -#+begin_src scheme :noweb-ref flashrom-package - (service - (service-type - (name 'flashrom-package) - (extensions - `(,(service-extension home-profile-service-type - (lambda (_) - (map specification->package - '("flashrom")))))) - (description "Flashrom installation.") - (default-value #f))) -#+end_src - -* TODO File Systems - -This system has a very simple file system - a boot partition, main partition -for everything else and swap. The main partition is encrypted. - -** Mapped Devices - -Data encryption layer, password protected. The LUKS encryption type is -used. - -#+begin_src scheme :noweb-ref luks - (mapped-device - (source (uuid "887ac37f-2919-41a0-a62a-e1ff5ea2d6cc")) - (target "aisaka-root") - (type luks-device-mapping)) -#+end_src - -** File Systems - -The data is split into an unencrypted boot partition and encrypted root -filesystem. - -*** Root File System - -The root filesystem is mounted on the encryption layer. Its type is -BTRFS. - -#+begin_src scheme :noweb-ref rootfs - (file-system - (mount-point "/") - (device "/dev/mapper/aisaka-root") - (type "btrfs") - (dependencies mapped-devices)) -#+end_src - -*** Boot File System - -The boot partition is on EXT4 filesystem. - -#+begin_src scheme :noweb-ref bootfs - (file-system - (mount-point "/boot") - (device (uuid "4f77b5fc-56ad-43ae-b6ec-e5adc8c48587")) - (type "ext4")) -#+end_src - -** Swap Devices - -Swap takes half the storage space in order to facilitate edge cases of -memory without overprovisioning, as well as to prolog the lifetime of SSD. - -#+begin_src scheme :noweb-ref swap - (swap-space (target (uuid "73bed3f9-be07-40ad-a228-577cd24f2e1d"))) -#+end_src - -* TODO System Servers - -** TODO Secure Shell - -*** TODO SSH Installation - -#+begin_src scheme :noweb-ref ssh-system-service - (service openssh-service-type) -#+end_src - -*** TODO SSH Configuration - -#+begin_src scheme :noweb-ref ssh-user-configuration - (simple-service 'ssh-configuration* home-files-service-type - `((".ssh/config" ,(plain-file "ssh-config" "\ - <<ssh-config>>\n")))) -#+end_src - -**** TODO SSH Configuration File - -#+begin_src shell :noweb-ref ssh-config - Host *.onion - ProxyCommand nc -x localhost:9050 -X5 %h %p - - Host kynio.onion - User kynio - Hostname prnpi5oblk35gzcihbgu3227xvanisouxgbejri57bnzjawcksq4l7yd.onion - Port 22 -#+end_src - -* TODO Device Management - -https://www.linuxfromscratch.org/lfs/view/11.1/chapter09/symlinks.html - -** TODO Trezor - -https://trezor.io/trezor-model-t - -*** TODO Trezor System Packages - -#+begin_src scheme :noweb-ref trezor-system-packages - (service - (service-type - (name 'trezor-system-packages) - (extensions - (list - (service-extension profile-service-type - (lambda (_) - (map specification->package - (list - "trezord" - "trezord-udev-rules")))))) - (description "TrezorD packages needed by the system.") - (default-value #f))) -#+end_src - -*** TODO Trezor User Packages - -#+begin_src scheme :noweb-ref trezor-user-packages - (service - (service-type - (name 'trezor-user-packages) - (extensions - (list - (service-extension home-profile-service-type - (lambda (_) - (map specification->package - (list - "trezor-agent")))))) - (description "Trezor packages for the user.") - (default-value #f))) -#+end_src - -*** TODO Trezor Udev Services - -#+begin_src scheme :noweb-ref trezor-udev-rules - (udev-rules-service 'trezord trezord-udev-rules) -#+end_src - -* TODO Helpers -** TODO String to Package - -#+begin_src scheme :noweb-ref to-package+output - (compose list - specification->package+output) -#+end_src diff --git a/systems/aisaka/data/bashrc b/systems/aisaka/data/bashrc deleted file mode 100644 index 6486547..0000000 --- a/systems/aisaka/data/bashrc +++ /dev/null @@ -1 +0,0 @@ -export LD_LIBRARY_PATH=$LIBRARY_PATH diff --git a/systems/aisaka/data/emacs-config b/systems/aisaka/data/emacs-config deleted file mode 100644 index 272c20b..0000000 --- a/systems/aisaka/data/emacs-config +++ /dev/null @@ -1,78 +0,0 @@ -;;; Disable auto-backup -(setq-default make-backup-files nil) - -;;; https://github.com/fimblo/dot.emacs -;;; Theme Activation -(load-theme 'manoj-dark) - -;;; Enable ParEdit -(add-hook 'prog-mode-hook 'enable-paredit-mode) - -;;; https://elpa.gnu.org/packages/aggressive-indent.html -;;; Automatic Activation of Aggressive Indent -(global-aggressive-indent-mode) - -;; Highlight the pair of delimiters under the cursor -(setq-default show-paren-mode 1 - show-paren-delay 0) - -;;; https://guix.gnu.org/manual/en/html_node/The-Perfect-Setup.html -;;; Copyright Information -(setq-default user-full-name "Marek Paśnikowski" - user-mail-address "marekpasnikowski@protonmail.com") - -;;; Startup Screen Inhibition -(setq-default inhibit-startup-screen t) - -;; Enable the column-80 line -(setq-default display-fill-column-indicator 1 - display-fill-column-indicator-column 80) -(global-display-fill-column-indicator-mode) - -;; Prepare Literate Programming -(setq-default - org-startup-indented t - org-confirm-babel-evaluate nil - org-src-fontify-natively t - org-src-tab-acts-natively t) -(org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . t) - (scheme . t ) - (shell . t ))) - -(add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode)) - -;; Monospace Font in Ebook Reader -(setq-default nov-variable-pitch nil) - -;; Disable Toolbar -(tool-bar-mode -1) - -;; GNUS Configuration -(setq-default gnus-auto-select-first nil - gnus-select-method '(nnnil "") - gnus-secondary-select-methods '((nnimap "outlook" - (nnimap-address "outlook.office365.com") - (nnimap-server-port 993) - (nnimap-stream ssl) - (nnimap-authinfo-file "~/.authinfo")) - (nnimap "home" - (nnimap-address "serwer1930490.home.pl") - (nnimap-server-port 993) - (nnimap-stream ssl) - (nnimap-authinfo-file "~/.authinfo"))) - nnmail-split-method 'nnmail-split-fancy - nnmail-split-fancy '(| "normal")) -(add-hook 'gnus-group-mode-hook 'gnus-topic-mode) - -;; Org Configuration -(setq-default org-contacts-files '("~/Dokumenty/UWM/filia w Ełku/Samorząd 2022/starostowie.org")) - -;; ORG-FC Configuration -(require 'org-fc-hydra) -(setq-default - org-fc-algorithm 'tn - org-fc-directories '("~/Dokumenty/fiszki")) - -;; Nix Mode -(require 'nix-mode) -(add-to-list 'auto-mode-alist '("\\.nix\\'" . nix-mode)) diff --git a/systems/aisaka/data/git-config b/systems/aisaka/data/git-config deleted file mode 100644 index e2d58a5..0000000 --- a/systems/aisaka/data/git-config +++ /dev/null @@ -1,9 +0,0 @@ -[sendemail] -smtpencryption = tls -smtpserver = localhost -smtpserverport = 1025 -smtpsslcertpath = "" -smtpuser = marekpasnikowski@protonmail.com -[user] -name = "Marek Paśnikowski" -email = "marekpasnikowski@protonmail.com" diff --git a/systems/aisaka/home-configuration.scm b/systems/aisaka/home-configuration.scm deleted file mode 100644 index 5485103..0000000 --- a/systems/aisaka/home-configuration.scm +++ /dev/null @@ -1,224 +0,0 @@ -(define-module (systems aisaka home-configuration) - #:use-module (gnu home) - #:use-module (gnu home services) - #:use-module (gnu home services shells) - #:use-module (gnu packages) - #:use-module (gnu services) - #:use-module (guix gexp)) - -(define allow-downgrades - "--allow-downgrades ") - -(define config-prefix - "/home/marek/Publiczny/src/deployment/systems/aisaka/") - -(define pull-guix - "guix pull ") - -(define pull-guix- - (string-append pull-guix - allow-downgrades - "--disable-authentication ")) - -(define guix-home - "guix home reconfigure ") - -(define home-configuration - "home-configuration.scm ") - -(define reconfigure-home - (string-append guix-home - config-prefix - home-configuration)) - -(define reconfigure-home- - (string-append reconfigure-home - allow-downgrades)) - -(define guix-system - "sudo guix system reconfigure ") - -(define system-configuration - "system-configuration.scm ") - -(define reconfigure-system - (string-append guix-system - config-prefix - system-configuration)) - -(define reconfigure-system- - (string-append reconfigure-system - allow-downgrades)) - -(define and - "&& ") - -(define system-update - (string-append pull-guix - and - reconfigure-system - and - reconfigure-home - and - "sudo guix gc -d 7d")) - -(define system-update- - (string-append pull-guix- - and - reconfigure-system- - and - reconfigure-home- - and - "sudo guix gc -d 7d")) - -(home-environment - (packages - (map - (compose list - specification->package+output) - '("adwaita-icon-theme" - "alacritty" - "clamav" - "dconf-editor" - "emacs-next" - "emacs-aggressive-indent" - "emacs-eldoc" - "emacs-geiser" - "emacs-geiser-guile" - "emacs-nix-mode" - "emacs-nov-el" - "emacs-org-contacts" - "emacs-org-contrib" - "emacs-paredit" - "font-google-noto" - "git" - "git-lfs" - "gnome-tweaks" - "gnupg" - "hicolor-icon-theme" - "icecat" - "jami" - "libadwaita" - "libreoffice" - "nm-tray" - "pwgen" - "seahorse" - "sicp" - "strace" - "unzip" - "zip"))) - (services - (list - (service - (service-type - (name 'flashrom-package) - (extensions - `(,(service-extension home-profile-service-type - (lambda (_) - (map specification->package - '("flashrom")))))) - (description "Flashrom installation.") - (default-value #f))) - (service - (service-type - (name 'git-sendemail-packages) - (extensions - (list - (service-extension home-profile-service-type - (lambda (_) - (map - (compose list - specification->package+output) - (list - "git" - "git:send-email")))))) - (description "Git Send Email") - (default-value #f))) - (service - (service-type - (name 'org-fc-tn-package) - (extensions - (list - (service-extension home-profile-service-type - (lambda (_) - (map specification->package - (list - ;; "emacs-org-fc-tn" - )))))) - (description "Custom version of ORG-FC.") - (default-value #f))) - (simple-service 'ssh-configuration* home-files-service-type - `((".ssh/config" ,(plain-file "ssh-config" "\ - Host *.onion - ProxyCommand nc -x localhost:9050 -X5 %h %p - - Host kynio.onion - User kynio - Hostname prnpi5oblk35gzcihbgu3227xvanisouxgbejri57bnzjawcksq4l7yd.onion - Port 22\n")))) - ;; (service - ;; (service-type - ;; (name 'trezor-user-packages) - ;; (extensions - ;; (list - ;; (service-extension home-profile-service-type - ;; (lambda (_) - ;; (map specification->package - ;; (list - ;; "trezor-agent")))))) - ;; (description "Trezor packages for the user.") - ;; (default-value #f))) - (service home-bash-service-type - (home-bash-configuration - (environment-variables '(("EDITOR" . "emacs -nw") - ("GUILE_AUTO_COMPILE" . "0") - ("PATH" . "$PATH:/home/marek/.nix-profile/bin"))) - (aliases `(("grep" . "grep --color=auto ") - ("ll" . "ls -l ") - ("ls" . "ls -p --color=auto ") - ("nix" . "nix --extra-experimental-features flakes --extra-experimental-features nix-command") - ("pull-guix" . ,pull-guix) - ("pull-guix-" . ,pull-guix-) - ("reconfigure-home" . ,reconfigure-home) - ("reconfigure-home-" . ,reconfigure-home-) - ("reconfigure-system" . ,reconfigure-system) - ("reconfigure-system-" . ,reconfigure-system-) - ("system-update" . ,system-update) - ("system-update-" . ,system-update-))) - (bashrc (list - (local-file "data/bashrc"))))) - ;; (service - ;; home-channels-service-type - ;; (list - ;; (channel - ;; (name 'guix) - ;; (url "https://git.savannah.gnu.org/git/guix.git")) - ;; (channel - ;; (name 'jeko) - ;; (url "https://framagit.org/Jeko/guix-jeko-channel.git")) - ;; (channel - ;; (name 'nonguix) - ;; (url "https://gitlab.com/nonguix/nonguix") - ;; ;; Enable signature verification: - ;; (introduction - ;; (make-channel-introduction - ;; "897c1a470da759236cc11798f4e0a5f7d4d59fbc" - ;; (openpgp-fingerprint "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5")))) - ;; (channel (name 'org-fc-tn) - ;; (url "file:///home/marek/src/org-fc") - ;; (branch "repository")) - ;; (channel (name 'packages) - ;; (url "file:///home/marek/src/packages") - ;; (branch "master")) - ;; (channel (name 'channel) - ;; (url "https://git.marekpasnikowski.pl/git/channel.git") - ;; (branch "wip-channel") - ;; ( introduction - ;; ( make-channel-introduction - ;; "f8ccfe8f3e5c8bafe06665cbd4b0c9301e1a64b6" - ;; ( openpgp-fingerprint - ;; "590E 500F E39D 26B3 E60B 743B 6D81 B120 7711 899F" ) ) )))) - (simple-service 'configuration-files - home-files-service-type - `((".config/git/config" ,(local-file "data/git-config")) - (".emacs" ,(local-file "data/emacs-config"))))))) diff --git a/systems/aisaka/system-configuration.scm b/systems/aisaka/system-configuration.scm deleted file mode 100644 index 46778ad..0000000 --- a/systems/aisaka/system-configuration.scm +++ /dev/null @@ -1,133 +0,0 @@ -(define-module (systems aisaka system-configuration) - #:use-module (gnu) - #:use-module (gnu packages commencement) - #:use-module (gnu packages cups) - #:use-module (gnu packages finance) - #:use-module (gnu services cups) - #:use-module (gnu services configuration) - #:use-module (gnu services desktop) - #:use-module (gnu services networking) - #:use-module (gnu services nix) - #:use-module (gnu services ssh) - #:use-module (gnu services version-control) - #:use-module (gnu services xorg)) - -(define keyboard-layout - (keyboard-layout "pl")) - -(operating-system - (locale "pl_PL.utf8") - (timezone "Europe/Warsaw") - (keyboard-layout keyboard-layout) - (host-name "aisaka") - (users (cons* (user-account (name "marek") - (comment "Marek Paśnikowski") - (group "users") - (home-directory "/home/marek") - (supplementary-groups '("audio" - "netdev" - "tor" - "video" - "wheel"))) - %base-user-accounts)) - (packages - (append - (map - (compose list - specification->package+output) - '(;; "netcat-openbsd" - "ntfs-3g")) - ( map - (compose list - specification->package+output) - ( list ) ) - %base-packages)) - (services - (append - (list - (extra-special-file - "/lib64/ld-linux-x86-64.so.2" - (file-append (canonical-package glibc) "/lib/ld-linux-x86-64.so.2")) - (extra-special-file - "/lib64/libstdc++.so.6" - (file-append (canonical-package gcc-toolchain) "/lib/libstdc++.so.6")) - (extra-special-file - "/usr/lib64/libstdc++.so.6" - (file-append (canonical-package gcc-toolchain) "/lib/libstdc++.so.6")) - (service openssh-service-type) - (udev-rules-service 'trezord trezord-udev-rules) - (service - guix-service-type - (guix-configuration - (extra-options - (list - "--gc-keep-derivations=yes" - "--gc-keep-outputs=yes")))) - (service nix-service-type) - (service - (service-type - (name 'trezor-system-packages) - (extensions - (list - (service-extension profile-service-type - (lambda (_) - (map specification->package - (list - "trezord" - "trezord-udev-rules")))))) - (description "TrezorD packages needed by the system.") - (default-value #f))) - (service - cups-service-type - (cups-configuration - (extensions - (list - cups-filters - epson-inkjet-printer-escpr)) - (web-interface? #t))) - (service git-daemon-service-type - (git-daemon-configuration - (export-all? #t))) - (service gnome-desktop-service-type) - (service plasma-desktop-service-type) - (service - tor-service-type - (tor-configuration - (control-socket? #t)))) - (modify-services - %desktop-services - (elogind-service-type - configuration => - (elogind-configuration - (inherit configuration) - (handle-lid-switch 'ignore))) - (gdm-service-type - configuration => - (gdm-configuration - (inherit configuration) - (wayland? #t))) - (delete guix-service-type)))) - (bootloader (bootloader-configuration (bootloader grub-bootloader) - (targets '("/dev/sda")) - (keyboard-layout keyboard-layout))) - (swap-devices - (list - (swap-space (target (uuid "73bed3f9-be07-40ad-a228-577cd24f2e1d"))))) - (mapped-devices - (list - (mapped-device - (source (uuid "887ac37f-2919-41a0-a62a-e1ff5ea2d6cc")) - (target "aisaka-root") - (type luks-device-mapping)))) - (file-systems - (append %base-file-systems - (list - (file-system - (mount-point "/") - (device "/dev/mapper/aisaka-root") - (type "btrfs") - (dependencies mapped-devices)) - (file-system - (mount-point "/boot") - (device (uuid "4f77b5fc-56ad-43ae-b6ec-e5adc8c48587")) - (type "ext4")))))) diff --git a/systems/akashi.scm b/systems/akashi.scm deleted file mode 100644 index 57debb5..0000000 --- a/systems/akashi.scm +++ /dev/null @@ -1,59 +0,0 @@ -(define-module (systems akashi) - ;; service - #:use-module (gnu services) - - ;; guix-home-service-type - #:use-module (gnu services guix) - - ;; keyboard-layout - #:use-module (gnu system keyboard) - - ;; bootloader-configuration* - ;; file-systems* - ;; firmware* - ;; initrd* - ;; kernel* - ;; swap-devices* - #:use-module (machines thinkpad-x200) - - ;; %suweren-operating-system - #:use-module (suweren system) - - ;; uid1000-account - ;; uid1000-home-environment - ;; uid1000-name - #:use-module (users id1000)) - -;; string -(define host-name* - "akashi") - -;; (record* user-account) -(define users* - (list uid1000-account)) - -;; record* operating-system -(define-public operating-system* - (let* ((home-environments `((,uid1000-name ,(uid1000-home-environment host-name*)))) - - (guix-home (service guix-home-service-type - home-environments)) - - (keyboard-layout* (keyboard-layout "pl")) - (services* (list guix-home)) - (timezone* "Europe/Warsaw") - (locale* "pl_PL.utf8")) - (%suweren-operating-system kernel* - (bootloader-configuration* keyboard-layout*) - keyboard-layout* - initrd* - firmware* - host-name* - (file-systems* host-name*) - (swap-devices* host-name*) - users* - timezone* - locale* - services*))) - -operating-system* diff --git a/systems/ayase.scm b/systems/ayase.scm deleted file mode 100644 index aef4771..0000000 --- a/systems/ayase.scm +++ /dev/null @@ -1,168 +0,0 @@ -(define-module (systems ayase) - ;; uuid - #:use-module (gnu) - - ;; grub - #:use-module (gnu packages bootloaders) - - ;; gnome-boxes - #:use-module (gnu packages gnome) - - ;; pinentry-qt - ;; pinentry-tty - #:use-module (gnu packages gnupg) - - ;; kgpg - #:use-module (gnu packages kde-pim) - - ;; python-pip - #:use-module (gnu packages python-build) - - ;; ruby - #:use-module (gnu packages ruby) - - ;; profile-service-type - ;; service - ;; simple-service - #:use-module (gnu services) - - ;; guix-home-service-type - #:use-module (gnu services guix) - - ;; tor-service-type - #:use-module (gnu services networking) - - ;; openssh-service-type - #:use-module (gnu services ssh) - - ;; libvirt-service-type - #:use-module (gnu services virtualization) - - ;; uid1000-account - ;; uid1000-home-environment - ;; uid1000-name - #:use-module (users id1000) - - ;; linux - ;; linux-firmware - #:use-module (nongnu packages linux) - - ;; microcode-initrd - #:use-module (nongnu system linux-initrd) - - ;; %sudoers-specification* - #:use-module (suweren commons sudoers) - - ;; %distribution-services - #:use-module (suweren services)) - -;; string -(define host-name - "ayase") - -;;; - -;; (alist string #<home-environment>) -(define home-environments - `((,uid1000-name ,(uid1000-home-environment host-name)))) - -;; #<file-system-label> -(define (swap-label number) - (file-system-label (string-append host-name - "-swap" - number))) - -;; #<service> -(define home-services - (service guix-home-service-type - home-environments)) - -;; #<swap-space> -(define swap-1 - (swap-space (target (swap-label "-1")))) - -;; #<swap-space> -(define swap-2 - (swap-space (target (swap-label "-2")))) - -;; (list #<service>) -(define system-services - (list (service libvirt-service-type) - (service openssh-service-type) - (service tor-service-type) - (simple-service 'gc-workaround - profile-service-type - (list grub - python-pip - ruby)) - (simple-service 'system-packages - profile-service-type - (list gnome-boxes - kgpg - pinentry-qt - pinentry-tty)))) - -;;; - -;; (list #<service>) -(define services - (append %distribution-services - (list ;; (@ (users id1000) - ;; dovecot) - home-services) - system-services)) - -;; (list #<swap-space>) -(define swap-devices - (list swap-1 - swap-2)) - -;; (list #<user-account>) -(define users - (append %base-user-accounts - (list uid1000-account))) - -;;; - -;; #<operating-system> -(define-public operating-system* - (let* ((bootloader-targets (list "/boot/efi")) - (efi-filesystem-id (uuid "B4FB-CBD9" 'fat32)) - (root-filesystem-id (uuid "615a98cd-a632-4ee5-a6f4-e5ebcaa6fb8c")) - - (efi-partition (file-system (mount-point "/boot/efi") - (device efi-filesystem-id) - (type "vfat"))) - (root-partition (file-system (mount-point "/") - (device root-filesystem-id) - (type "ext4"))) - - (ayase-file-systems (list root-partition - efi-partition)) - (keyboard-layout (keyboard-layout "pl")) - (bootloader (bootloader-configuration (bootloader grub-efi-bootloader) - (targets bootloader-targets) - (keyboard-layout keyboard-layout))) - (file-systems (append %base-file-systems - ;; %distribution-file-systems - ayase-file-systems)) - (firmware (list linux-firmware)) - (packages (append %base-packages - ;; %distribution-packages - ;; system-packages - ))) - (operating-system (kernel linux) - (bootloader bootloader) - (keyboard-layout keyboard-layout) - (initrd microcode-initrd) - (firmware firmware) - (host-name host-name) - (file-systems file-systems) - (swap-devices swap-devices) - (users users) - (timezone "Europe/Warsaw") - (locale "pl_PL.utf8") - (services services) - (sudoers-file %sudoers-specification*)))) - -operating-system* diff --git a/systems/izumi/home-configuration.scm b/systems/izumi/home-configuration.scm deleted file mode 100644 index dcb6ace..0000000 --- a/systems/izumi/home-configuration.scm +++ /dev/null @@ -1,189 +0,0 @@ -(define-module (systems izumi home-configuration)) - -(use-modules - ( channels ) - (gnu home) - (gnu home services shells)) - -(use-modules - (gnu) - (gnu home services)) - -(use-package-modules emacs-xyz) - -(use-service-modules) -(use-modules - (gnu) - (gnu home services) - (guix build-system emacs) - (guix git-download) - ((guix licenses) - #:prefix license:) - (guix packages)) - -(use-package-modules base emacs-xyz gawk) -(use-modules - (gnu services) - (gnu home services) - (gnu packages password-utils) - (guix gexp)) -(use-modules - (gnu home services shells) - (gnu services)) - -(home-environment (packages (map specification->package+output - (list "dconf-editor" - "emacs" - "emacs-org-modern" - "emacs-paredit" - "font-google-noto" - "font-google-noto-emoji" - "font-google-noto-sans-cjk" - "font-google-noto-serif-cjk" - "git" - "gnupg" - "gnome-tweaks" - "noweb" - "pinentry" - "pwgen" - "unzip" - "zip"))) - (services (append (list izumi-channels-service-type) - (list - (simple-service - 'emacs-home-profile - home-profile-service-type - (append - (list emacs-guix emacs-nix-mode) - (list - (let - ((commit* "wip-algo-tn")) - (package - (name "emacs-org-fc") - (version (git-version "0.1.2" "0" commit*)) - (source - (origin - (method git-fetch) - (uri - (git-reference - (url "https://git.marekpasnikowski.pl/org-fc.git") - (commit commit*))) - (file-name (git-file-name name version)) - (sha256 (base32 "1i8ii1garx2pdg08a12yzsd0fhwdzcpxp9m97zj8m5s275i8ccaj")))) - (build-system emacs-build-system) - (arguments - (list - #:include #~ (cons* "\\.awk$" "\\.org$" %default-include) - #:exclude #~ (cons "^test/" %default-exclude) - #:tests? #t - #:test-command - #~ - (list - "emacs" - "--batch" - "-L" "." - "-L" "tests/" - "-l" "tests/org-fc-filter-test.el" - "-l" "tests/org-fc-indexer-test.el" - "-l" "tests/org-fc-review-data-test.el" - "-f" "ert-run-tests-batch-and-exit") - #:phases - #~ - (modify-phases - %standard-phases - (add-after - 'unpack - 'qualify-paths - (lambda* - (#:key inputs - #:allow-other-keys) - (substitute* - "org-fc-awk.el" - (("\"find ") - (string-append - "\"" - (search-input-file inputs "/bin/find") - " ")) - (("\"gawk ") - (string-append - "\"" - (search-input-file inputs "/bin/gawk") - " ")) - (("\"xargs ") - (string-append - "\"" - (search-input-file inputs "/bin/xargs") - " ")))))))) - (inputs (list findutils gawk)) - (propagated-inputs (list emacs-hydra)) - (home-page "https://www.leonrische.me/fc/index.html") - (synopsis "Spaced repetition system for Emacs Org mode") - (description - (string-append - "Org-fc is a spaced-repetition system for Emacs' Org mode.\n" - "It allows you to mark headlines in a file as flashcards, turning pieces of\n" - "knowledge you want to learn into a question-answer test. These cards are\n" - "reviewed at regular interval. After each review, the next review interval is\n" - "calculated based on how well you remembered the contents of the card.\n")) - (license license:gpl3+)))))) - (simple-service 'home-files - home-files-service-type - (list (list ".config/emacs/init.el" - (local-file "home-files/emacs-configuration.el" )) - (list ".gnus" - (local-file "home-files/gnus-configuration.el")) - (list ".gitconfig" - (local-file "home-files/gitconfig")) - (list ".config/git/ignore" - ;; https://github.com/github/gitignore/blob/main/Global/Emacs.gitignore - (local-file "home-files/git-ignore.conf")))) - (simple-service - 'environment-variables - home-environment-variables-service-type - `(("EDITOR" . "emacsclient -nw")))) - (list - (let* - ((and "&& ") - (collect-garbage "sudo guix gc -d 7d ") - (configuration-prefix - "/home/marek/Publiczny/src/deployment/systems/izumi/") - (pull-guix "guix pull ") - (reconfigure-home - (string-append - "guix home delete-generations 7d ; " - "guix home reconfigure " - configuration-prefix - "home-configuration.scm ")) - (reconfigure-system - (string-append - "sudo guix system delete-generations 7d ; " - "sudo guix system reconfigure " - configuration-prefix - "system-configuration.scm ")) - (update-system - (string-append - pull-guix - and - reconfigure-system - and - reconfigure-home - and - collect-garbage))) - (simple-service - 'bash-extension - home-bash-service-type - (home-bash-extension - (aliases - `(("collect-garbage" . ,collect-garbage) - ("edit" . "$EDITOR") - ("pull-guix" . ,pull-guix) - ("reconfigure-home" . ,reconfigure-home) - ("reconfigure-system" . ,reconfigure-system) - ("update-system" . ,update-system))) - (bash-profile - (list - (mixed-text-file - "newline-prompt" - "PS1=${PS1%?}\n" - "PS1=${PS1%?}\\n'$ '\n" - "PS1=\"\\n$PS1\"")))))))))) diff --git a/systems/izumi/home-files/emacs-configuration.el b/systems/izumi/home-files/emacs-configuration.el deleted file mode 100644 index e4a1d70..0000000 --- a/systems/izumi/home-files/emacs-configuration.el +++ /dev/null @@ -1,111 +0,0 @@ -;; Disable Backup Files -(setq make-backup-files nil) - -;;; https://github.com/fimblo/dot.emacs -;;; Theme Activation -(load-theme 'modus-vivendi) - -;;; Disable Org Indent Mode -(add-hook 'org-mode-hook (lambda () (org-indent-mode -1))) - -;;; Enable ParEdit -(add-hook 'prog-mode-hook 'enable-paredit-mode) - -;;; https://elpa.gnu.org/packages/aggressive-indent.html -;;; Automatic Activation of Aggressive Indent -;; (global-aggressive-indent-mode) - -;; Highlight the pair of delimiters under the cursor -(setq-default show-paren-mode 1 - show-paren-delay 0) - -;;; https://guix.gnu.org/manual/en/html_node/The-Perfect-Setup.html -;;; Copyright Information -(setq-default user-full-name "Marek Paśnikowski" - user-mail-address "marek@marekpasnikowski.pl") - -(setq-default epg-gpg-program "gpg2") - -;;;https://github.com/redguardtoo/mastering-emacs-in-one-year-guide/blob/master/gnus-guide-en.org#my-gnusel -(setq-default send-mail-function 'smtpmail-send-it - smtpmail-stream-type 'ssl - smtpmail-smtp-server "marekpasnikowski.pl" - smtpmail-smtp-service 465 - ;; smtpmail-local-domain "izumi.lan" - smtpmail-debug-info t) - -(require 'smtpmail) - -;;; https://github.com/redguardtoo/mastering-emacs-in-one-year-guide/blob/master/gnus-guide-en.org#my-gnusel -(add-hook 'message-mode-hook - (lambda () - (flyspell-mode t) - (local-set-key (kbd "TAB") - 'bbdb-complete-name))) - -;;; Startup Screen Inhibition -(setq-default inhibit-startup-screen t) - -;; Enable the column-100 line -(setq-default display-fill-column-indicator-column 100 - fill-column 100 - org-startup-truncated nil) -(set-face-attribute 'fill-column-indicator nil :foreground "green") -(global-display-fill-column-indicator-mode) - -;;; Enable Org Modern Style - ;(with-eval-after-load 'org (global-org-modern-mode)) - -;; Prepare Literate Programming -(setq-default - org-startup-indented t - org-confirm-babel-evaluate nil - org-src-fontify-natively t - org-src-tab-acts-natively t) -(org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . t) - (scheme . t ) - (shell . t ))) - -(add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode)) - -;; Monospace Font in Ebook Reader -(setq-default nov-variable-pitch nil) - -;; Disable Toolbar -(tool-bar-mode -1) - -;; GNUS Configuration -;; (setq-default gnus-auto-select-first nil -;; gnus-select-method '(nnnil "") -;; gnus-secondary-select-methods '((nnimap "outlook" -;; (nnimap-address "outlook.office365.com") -;; (nnimap-server-port 993) -;; (nnimap-stream ssl) -;; (nnimap-authinfo-file "~/.authinfo")) -;; (nnimap "home" -;; (nnimap-address "serwer1930490.home.pl") -;; (nnimap-server-port 993) -;; (nnimap-stream ssl) -;; (nnimap-authinfo-file "~/.authinfo"))) -;; nnmail-split-method 'nnmail-split-fancy -;; nnmail-split-fancy '(| "normal")) -;; (add-hook 'gnus-group-mode-hook 'gnus-topic-mode) - -;; ORG-FC Configuration -(require 'org-fc-hydra) -(setq-default - org-fc-algorithm 'tn - org-fc-shuffle-positions t - org-fc-directories '("~/Dokumenty/fiszki")) - -;; Nix Mode -;; (require 'nix-mode) -;; (add-to-list 'auto-mode-alist '("\\.nix\\'" . nix-mode)) - -;; (setq tramp-remote-path -;; (append tramp-remote-path -;; '(tramp-own-remote-path -;; "~/.guix-profile/bin" -;; "~/.guix-profile/sbin" -;; "/run/current-system/profile/bin" -;; "/run/current-system/profile/sbin"))) diff --git a/systems/izumi/home-files/git-ignore.conf b/systems/izumi/home-files/git-ignore.conf deleted file mode 100644 index 98e588f..0000000 --- a/systems/izumi/home-files/git-ignore.conf +++ /dev/null @@ -1,48 +0,0 @@ -# -*- mode: gitignore; -*- -*~ -\#*\# -/.emacs.desktop -/.emacs.desktop.lock -*.elc -auto-save-list -tramp -.\#* - -# Org-mode -.org-id-locations -*_archive - -# flymake-mode -*_flymake.* - -# eshell files -/eshell/history -/eshell/lastdir - -# elpa packages -/elpa/ - -# reftex files -*.rel - -# AUCTeX auto folder -/auto/ - -# cask packages -.cask/ -dist/ - -# Flycheck -flycheck_*.el - -# server auth directory -/server/ - -# projectiles files -.projectile - -# directory configuration -.dir-locals.el - -# network security -/network-security.data diff --git a/systems/izumi/home-files/gitconfig b/systems/izumi/home-files/gitconfig deleted file mode 100644 index 300f906..0000000 --- a/systems/izumi/home-files/gitconfig +++ /dev/null @@ -1,10 +0,0 @@ -[commit] - gpgsign = true - -[user] - email = marek@marekpasnikowski.pl - name = Marek Paśnikowski - signingkey = 6D81B1207711899F - -[push] - autoSetupRemote = true diff --git a/systems/izumi/home-files/gnus-configuration.el b/systems/izumi/home-files/gnus-configuration.el deleted file mode 100644 index 570b8fd..0000000 --- a/systems/izumi/home-files/gnus-configuration.el +++ /dev/null @@ -1,85 +0,0 @@ -;;; https://github.com/redguardtoo/mastering-emacs-in-one-year-guide/blob/master/gnus-guide-en.org#my-gnusel -;; (require 'nnir) - -;; (setq-default gnus-select-method '(nntp "news.gwene.org")) - -(setq-default epa-file-cache-passphrase-for-symmetric-encryption t) - -(setq-default gnus-select-method - '(nnimap "marekpasnikowski.pl" - (nnimap-address "marekpasnikowski.pl") - (nnimap-server-port 993) - (nnimap-stream ssl) - ;; (nnir-search-engine imap) - (nnmail-expiry-wait 90))) - -(setq-default gnus-thread-sort-functions - '(gnus-thread-sort-by-most-recent-date - (not gnus-thread-sort-by-number))) - -(setq-default gnus-use-cache t) - -(defun my-gnus-group-list-subscribed-groups () - "List all subscribed groups with or without un-read messages" - () - (interactive) - (gnus-group-list-all-groups 5)) - -(define-key gnus-group-mode-map - (kbd "o") 'my-gnus-group-list-subscribed-groups) - -;; (add-to-list 'load-path "~/Dokumenty/bbdb") -;; (require 'bbdb) -;; (bbdb-initialize 'message 'gnus 'sendmail) -;; (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus) -;; (setq-default bbdb/mail-auto-create-p t -;; bbdb/news-auto-create-p t) - -(setq-default gnus-read-active-file 'some) - -(eval-after-load 'mailcap - '(progn (cond ((eq system-type 'darwin)) - ((eq system-type 'windows-nt)) - (t (mailcap-parse-mailcaps))))) - -(add-hook 'gnus-group-mode-hook - 'gnus-topic-mode) - -(setq-default gnus-summary-thread-gathering-function - 'gnus-gather-threads-by-subject) - -(setq-default gnus-thread-hide-subtree t) -(setq-default gnus-thread-ignore-subject t) - -(setq-default gnus-use-correct-string-widths nil) - - -(eval-after-load 'gnus-topic - '(progn (setq-default gnus-message-archive-group - '((format-time-string "sent.%Y"))) - (setq-default gnus-server-alist - '(("archive" - nnfolder - "archive" - (nnfolder-directory "~/Mail/archive") - (nnfolder-active-file "~/Mail/archive/active") - (nnfolder-get-new-mail nil) - (nnfolder-inhibit-expiry t)))) - (setq-default gnus-topic-topology - '(("Gnus" visible) - (("marekpasnikowski.pl" visible nil nil)) - (("misc" visible)))) - (setq-default gnus-topic-alist - '(("marekpasnikowski.pl" - "nnimap+marekpasnikowski.pl:Inbox" - "nnimap+marekpasnikowski.pl:Drafts" - "nnimap+marekpasnikowski.pl:Sent" - "nnimap+marekpasnikowski.pl:Archive" - "nnimap+marekpasnikowski.pl:Junk" - "nnimap+marekpasnikowski.pl:Trash") - ("misc" - "nnfolder+archive:sent.2024" - "nndraft:drafts") - ("Gnus"))) - (gnus-topic-set-parameters "marekpasnikowski.pl" - '((display . 200))))) diff --git a/systems/izumi/izumi.org b/systems/izumi/izumi.org deleted file mode 100644 index afe2fe1..0000000 --- a/systems/izumi/izumi.org +++ /dev/null @@ -1,592 +0,0 @@ -#+TITLE: Configuration of the Izumi computer -#+AUTHOR: Marek Paśnikowski -#+STARTUP: showall -#+PROPERTY: header-args:scheme :noweb yes -#+PROPERTY: header-args:scheme+ :noweb-prefix yes - -* DONE The Monolith - -#+NAME: OPERATING-SYSTEM -#+BEGIN_SRC scheme :tangle system-configuration.scm - (define-module (systems izumi system-configuration) - #:use-module (suweren commons sudoers)) - - (define radicale-keys "/secrets/radicale/keys") - (define dovecot-keys "/secrets/dovecot") - - ( use-modules - ( gnu ) - ( gnu services syncthing ) - ( guix records ) - ( ice-9 match ) - ( nongnu packages linux ) - ( nongnu system linux-initrd ) ) - - ( use-package-modules - admin certs kde-frameworks kde-multimedia kde-pim kde-plasma kde-utils mail - version-control ) - - ( use-service-modules - base certbot cgit desktop mail shepherd ssh version-control web xorg ) - - (define nginx-accounts - (list (user-group (name "nginx") - (system? #t)) - (user-account (name "nginx") - (group "nginx") - (supplementary-groups '("git")) - (system? #t) - (comment "nginx server user") - (home-directory "/var/empty") - (shell (file-append (specification->package "shadow") - "/sbin/nologin"))))) - - (define nginx-service-type* - (service-type (inherit nginx-service-type) - (extensions (map (lambda (extension) - (if (eq? (service-extension-target extension) - account-service-type) - (service-extension account-service-type - (const nginx-accounts)) - extension)) - (service-type-extensions nginx-service-type))))) - - (define hosts-izumi - (local-file "system-files/hosts")) - - ( operating-system - ( bootloader - ( bootloader-configuration - ( bootloader grub-efi-bootloader ) - ( keyboard-layout ( keyboard-layout "pl" ) ) - ( targets ( list "/boot/efi" ) ) ) ) - ( mapped-devices - ( list - ( mapped-device - ( source "/dev/sda2" ) - ( target "izumi" ) - ( type luks-device-mapping ) ) ) ) - ( file-systems - ( append - %base-file-systems - ( list - ( file-system - ( device "/dev/sda1" ) - ( mount-point "/boot/efi" ) - ( type "vfat" ) ) - ( file-system - ( dependencies mapped-devices ) - ( device "/dev/mapper/izumi" ) - ( mount-point "/" ) - ( type "xfs" ) ) ) ) ) - ( firmware ( list linux-firmware ) ) - ( groups - ( append - %base-groups - ( list - ( user-group - ( name "vmail" ) - ( system? #t ) )) ) ) - ( host-name "izumi" ) - (hosts-file hosts-izumi) - ( initrd microcode-initrd ) - ( kernel linux ) - ( keyboard-layout ( keyboard-layout "pl" ) ) - ( locale "pl_PL.utf8" ) - ( services - ( append - ( modify-services - %desktop-services - ( elogind-service-type - configuration => - ( elogind-configuration - ( inherit configuration ) - ( handle-lid-switch 'ignore ) - ( handle-lid-switch-docked 'ignore ) - ( handle-lid-switch-external-power 'ignore ) ) ) - ( gdm-service-type - configuration => - ( gdm-configuration - ( inherit configuration ) - ( auto-suspend? #f ) - ( wayland? #t ) ) ) - ( guix-service-type - configuration => - ( let* - ( ( non-guix.pub - ( string-append - "( public-key ( ecc ( curve Ed25519 )" - "( q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98# ) ) )" ) ) - ( authorized-keys - ( append - %default-authorized-guix-keys - ( list ( plain-file "non-guix.pub" non-guix.pub ) ) ) ) - ( extra-options - ( list "--gc-keep-derivations=yes" "--gc-keep-outputs=yes" ) ) - ( substitute-urls - ( append - %default-substitute-urls - ( list "https://substitutes.nonguix.org" ) ) ) ) - ( guix-configuration - ( inherit configuration ) - ( authorized-keys authorized-keys ) - ( extra-options extra-options ) - ( substitute-urls substitute-urls ) ) ) ) ) - ( list - (@ (users id1000) dkim-service) - (@ (users id1000) dovecot-service) - (@ (users id1000) smtp-service) - (service (service-type (inherit certbot-service-type) - (extensions (map (lambda (extension) - (if (eq? (service-extension-target extension) - nginx-service-type) - (service-extension nginx-service-type* - (@@ (gnu services certbot) - certbot-nginx-server-configurations)) - extension)) - (service-type-extensions certbot-service-type)))) - ( certbot-configuration - ( certificates - ( list - ( certificate-configuration - ( deploy-hook - ( program-file - "nginx-deploy-hook" - #~ - ( let - ( ( pid ( call-with-input-file "/var/run/nginx/pid" read ) ) ) - ( kill pid SIGHUP ) ) ) ) - ( domains - ( list - "marekpasnikowski.pl" - "git.marekpasnikowski.pl" - "radicale.marekpasnikowski.pl" ) ) ) ) ) - ( email "marek@marekpasnikowski.pl" ) - ( webroot "/srv/www/marek/marekpasnikowski.pl" ) ) ) - (service (service-type (inherit cgit-service-type) - (extensions (map (lambda (extension) - (if (eq? (service-extension-target extension) - nginx-service-type) - (service-extension nginx-service-type* - cgit-configuration-nginx-config) - extension)) - (service-type-extensions cgit-service-type)))) - ( cgit-configuration - ( nginx - ( list - ( nginx-server-configuration - ( locations - ( list - ( git-http-nginx-location-configuration - ( git-http-configuration - ( git-root "/var/lib/gitolite/repositories" ) - ( uri-path "/git" ) ) ) - ( nginx-location-configuration - ( body - ( list - "fastcgi_param HTTP_HOST $server_name ;" - "fastcgi_param PATH_INFO $uri ;" - "fastcgi_param QUERY_STRING $args ;" - "fastcgi_param SCRIPT_FILENAME $document_root/lib/cgit/cgit.cgi ;" - "fastcgi_pass 127.0.0.1:9000 ;" ) ) - ( uri "@cgit" ) ) - ( nginx-location-configuration - ( body ( list "root /srv/www/marek/marekpasnikowski.pl/ ;" ) ) - ( uri "/.well-known" ) ) ) ) - ( listen ( list "192.168.10.2:443 ssl" ) ) - ( root cgit ) - ( server-name ( list "git.marekpasnikowski.pl" ) ) - ( ssl-certificate - "/etc/letsencrypt/live/marekpasnikowski.pl/fullchain.pem" ) - ( ssl-certificate-key - "/etc/letsencrypt/live/marekpasnikowski.pl/privkey.pem" ) - ( try-files ( list "$uri" "@cgit" ) ) ) ) ) - ( repositories - ( list - ( repository-cgit-configuration - ( hide? #t ) - ( path "/srv/git/marek/packages" ) ) ) ) - ( repository-directory "/var/lib/gitolite/repositories" ) ) ) - (service fcgiwrap-service-type - (fcgiwrap-configuration (user "git") - (group "git"))) - ( service gitolite-service-type - ( gitolite-configuration - ( rc-file ( gitolite-rc-file ( umask #o0027 ) ) ) - ( admin-pubkey ( plain-file "gitolite-admin.pub" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK4THTYnHCc/ihCJNKJtGTNu1zCnLndbMHnxnrxzJk+N marek@izumi\n") ) ) ) - ( service plasma-desktop-service-type ) - ( service syncthing-service-type ( syncthing-configuration ( user "marek" ) ) ) - (service nginx-service-type* - ( nginx-configuration - ( server-blocks - ( list - ;; Top-Level - ( nginx-server-configuration - ( locations - ( list - ( nginx-location-configuration - ( uri "/.well-known" ) - ( body - ( list "root /srv/www/marek/marekpasnikowski.pl ;" ) ) ) ) ) - ( listen ( list "192.168.10.2:443 ssl" ) ) - ( root "/srv/www/marek/marekpasnikowski.pl" ) - ( server-name ( list "marekpasnikowski.pl" ) ) - ( ssl-certificate - "/etc/letsencrypt/live/marekpasnikowski.pl/fullchain.pem" ) - ( ssl-certificate-key - "/etc/letsencrypt/live/marekpasnikowski.pl/privkey.pem" ) ) - ;; Radicale - ( nginx-server-configuration - ( locations - ( list - ( nginx-location-configuration - ( body - ( list - "proxy_pass http://localhost:5232/ ;" - "proxy_set_header X-Script-Name \"\" ;" - "proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;" - "proxy_set_header Host $http_host ;" - "proxy_pass_header Authorization ;" ) ) - ( uri "/" ) ) - ( nginx-location-configuration - ( body - ( list "root /srv/www/marek/marekpasnikowski.pl ;" ) ) - ( uri "/.well-known" ) ) ) ) - ( listen ( list "192.168.10.2:443 ssl" ) ) - ( server-name ( list "radicale.marekpasnikowski.pl" ) ) ) ) ) ) ) - ( service openssh-service-type ) - ( service radicale-service-type - ( radicale-configuration - ( auth - ( radicale-auth-configuration - ( type 'htpasswd ) - ( htpasswd-filename radicale-keys ) - ( htpasswd-encryption 'plain ) ) ) ) ) - ( simple-service 'base-profile profile-service-type - ( append %base-packages - ( list ) ) ) - ( simple-service - 'nss-profile - profile-service-type - ( list nss-certs ) ) - ( simple-service - 'etc-files - etc-service-type - ( list - `( "mailname" ,( plain-file "mailname" "marekpasnikowski.pl\n" ) ) ) ) ) ) ) - ( sudoers-file %sudoers-specification* ) - ( swap-devices - ( list - ( swap-space - ( target "/dev/sda3" ) ) ) ) - ( timezone "Europe/Warsaw" ) - ( users - ( append - %base-user-accounts - ( list - ( user-account - ( comment "vmail" ) - ( group "vmail" ) - ( home-directory "/home/vmail" ) - ( name "vmail" ) - ( system? #t ) ) - ( user-account - ( comment "Marek Paśnikowski" ) - ( group "users" ) - ( home-directory "/home/marek" ) - ( name "marek" ) - ( supplementary-groups - ( list "audio" "netdev" "video" "wheel" ) ) ) ) ) ) ) -#+END_SRC - -#+NAME: OPENSMTPD-CONFIGURATION-FILE -#+BEGIN_SRC conf :tangle system-files/smtpd.conf - # The prefix on GUIX is not the default one — it is /etc . - table aliases file:/etc/aliases - - # The mail certificates are issued by Let‘s Encrypt and served by NGINX - pki marekpasnikowski.pl cert "/etc/letsencrypt/live/marekpasnikowski.pl/fullchain.pem" - pki marekpasnikowski.pl key "/etc/letsencrypt/live/marekpasnikowski.pl/privkey.pem" - - # Listen for local messages. - listen on lo - - # Listen for messages from the internet. - listen on enp1s0 tls port 25 pki "marekpasnikowski.pl" - listen on enp1s0 smtps port 465 pki "marekpasnikowski.pl" - - # There is no filtering in the design, so the two actions are enough. - action receive maildir alias <aliases> - action send relay - - # Match incoming messages. - match from local for local action receive - match from any for domain "marekpasnikowski.pl" action receive - - # Match outgoing messages. - match for any action send -#+END_SRC - -* [[https://guix.gnu.org/manual/en/html_node/Home-Configuration.html][13 Home Configuration]] - -#+BEGIN_SRC scheme :tangle home-configuration.scm - (define-module (systems izumi home-configuration)) - - (use-modules - ( channels ) - (gnu home) - (gnu home services shells)) - - <<EMACS-GUIX-MODULES>> - <<EMACS-ORG-FC-TN-MODULES>> - <<ESSENTIAL-HOME-MODULES>> - <<SHELLS-MODULES>> - - (home-environment (packages (map specification->package+output - (list "dconf-editor" - "emacs" - "emacs-org-modern" - "emacs-paredit" - "font-google-noto" - "font-google-noto-emoji" - "font-google-noto-sans-cjk" - "font-google-noto-serif-cjk" - "git" - "gnupg" - "gnome-tweaks" - "noweb" - "pinentry" - "pwgen" - "unzip" - "zip"))) - (services (append (list izumi-channels-service-type) - <<ESSENTIAL-HOME-SERVICES>> - <<SHELLS>>))) -#+END_SRC - -** [[https://guix.gnu.org/manual/en/html_node/Home-Services.html][13.3 Home Services]] - -#+NAME: ESSENTIAL-HOME-SERVICES -#+BEGIN_SRC scheme - (list - <<EMACS-HOME-PROFILE>> - <<HOME-FILES-SERVICE-TYPE>> - (simple-service - 'environment-variables - home-environment-variables-service-type - `(("EDITOR" . "emacsclient -nw")))) -#+END_SRC - -#+NAME: SHELLS -#+BEGIN_SRC scheme - (list - <<HOME-BASH-SERVICE-TYPE>>) -#+END_SRC - -*** [[https://guix.gnu.org/manual/en/html_node/Essential-Home-Services.html][13.3.1 Essential Home Services]] - -#+NAME: ESSENTIAL-HOME-MODULES -#+BEGIN_SRC scheme - (use-modules - (gnu services) - (gnu home services) - (gnu packages password-utils) - (guix gexp)) -#+END_SRC - -#+NAME: EMACS-HOME-PROFILE -#+BEGIN_SRC scheme - (simple-service - 'emacs-home-profile - home-profile-service-type - (append - <<EMACS-GUIX-PACKAGES>> - <<EMACS-ORG-FC-TN-PACKAGES>>)) -#+END_SRC - -#+NAME: HOME-FILES-SERVICE-TYPE -#+BEGIN_SRC scheme - (simple-service 'home-files - home-files-service-type - (list (list ".config/emacs/init.el" - (local-file "home-files/emacs-configuration.el" )) - (list ".gnus" - (local-file "home-files/gnus-configuration.el")) - (list ".gitconfig" - (local-file "home-files/gitconfig")) - (list ".config/git/ignore" - ;; https://github.com/github/gitignore/blob/main/Global/Emacs.gitignore - (local-file "home-files/git-ignore.conf")))) -#+END_SRC - -*** [[https://guix.gnu.org/manual/en/html_node/Shells-Home-Services.html][13.3.2 Shells]] - -#+NAME: SHELLS-MODULES -#+BEGIN_SRC scheme - (use-modules - (gnu home services shells) - (gnu services)) -#+END_SRC - -#+NAME: HOME-BASH-SERVICE-TYPE -#+BEGIN_SRC scheme - (let* - ((and "&& ") - (collect-garbage "sudo guix gc -d 7d ") - (configuration-prefix - "/home/marek/Publiczny/src/deployment/systems/izumi/") - (pull-guix "guix pull ") - (reconfigure-home - (string-append - "guix home delete-generations 7d ; " - "guix home reconfigure " - configuration-prefix - "home-configuration.scm ")) - (reconfigure-system - (string-append - "sudo guix system delete-generations 7d ; " - "sudo guix system reconfigure " - configuration-prefix - "system-configuration.scm ")) - (update-system - (string-append - pull-guix - and - reconfigure-system - and - reconfigure-home - and - collect-garbage))) - (simple-service - 'bash-extension - home-bash-service-type - (home-bash-extension - (aliases - `(("collect-garbage" . ,collect-garbage) - ("edit" . "$EDITOR") - ("pull-guix" . ,pull-guix) - ("reconfigure-home" . ,reconfigure-home) - ("reconfigure-system" . ,reconfigure-system) - ("update-system" . ,update-system))) - (bash-profile - (list - (mixed-text-file - "newline-prompt" - "PS1=${PS1%?}\n" - "PS1=${PS1%?}\\n'$ '\n" - "PS1=\"\\n$PS1\"")))))) -#+END_SRC - -* [[https://www.leonrische.me/fc/][Emacs-Org-FC-TN]] - -#+NAME: EMACS-ORG-FC-TN-MODULES -#+BEGIN_SRC scheme - (use-modules - (gnu) - (gnu home services) - (guix build-system emacs) - (guix git-download) - ((guix licenses) - #:prefix license:) - (guix packages)) - - (use-package-modules base emacs-xyz gawk) -#+END_SRC - -#+NAME: EMACS-ORG-FC-TN-PACKAGES -#+BEGIN_SRC scheme - (list - (let - ((commit* "wip-algo-tn")) - (package - (name "emacs-org-fc") - (version (git-version "0.1.2" "0" commit*)) - (source - (origin - (method git-fetch) - (uri - (git-reference - (url "https://git.marekpasnikowski.pl/org-fc.git") - (commit commit*))) - (file-name (git-file-name name version)) - (sha256 (base32 "1i8ii1garx2pdg08a12yzsd0fhwdzcpxp9m97zj8m5s275i8ccaj")))) - (build-system emacs-build-system) - (arguments - (list - #:include #~ (cons* "\\.awk$" "\\.org$" %default-include) - #:exclude #~ (cons "^test/" %default-exclude) - #:tests? #t - #:test-command - #~ - (list - "emacs" - "--batch" - "-L" "." - "-L" "tests/" - "-l" "tests/org-fc-filter-test.el" - "-l" "tests/org-fc-indexer-test.el" - "-l" "tests/org-fc-review-data-test.el" - "-f" "ert-run-tests-batch-and-exit") - #:phases - #~ - (modify-phases - %standard-phases - (add-after - 'unpack - 'qualify-paths - (lambda* - (#:key inputs - #:allow-other-keys) - (substitute* - "org-fc-awk.el" - (("\"find ") - (string-append - "\"" - (search-input-file inputs "/bin/find") - " ")) - (("\"gawk ") - (string-append - "\"" - (search-input-file inputs "/bin/gawk") - " ")) - (("\"xargs ") - (string-append - "\"" - (search-input-file inputs "/bin/xargs") - " ")))))))) - (inputs (list findutils gawk)) - (propagated-inputs (list emacs-hydra)) - (home-page "https://www.leonrische.me/fc/index.html") - (synopsis "Spaced repetition system for Emacs Org mode") - (description - (string-append - "Org-fc is a spaced-repetition system for Emacs' Org mode.\n" - "It allows you to mark headlines in a file as flashcards, turning pieces of\n" - "knowledge you want to learn into a question-answer test. These cards are\n" - "reviewed at regular interval. After each review, the next review interval is\n" - "calculated based on how well you remembered the contents of the card.\n")) - (license license:gpl3+)))) -#+END_SRC - -* [[https://emacs-guix.gitlab.io/website/manual/latest/html_node/index.html][Emacs-Guix]] - -** [[https://emacs-guix.gitlab.io/website/manual/latest/html_node/Installation.html][2. Installation]] - -#+NAME: EMACS-GUIX-MODULES -#+BEGIN_SRC scheme - (use-modules - (gnu) - (gnu home services)) - - (use-package-modules emacs-xyz) - - (use-service-modules) -#+END_SRC - -#+NAME: EMACS-GUIX-PACKAGES -#+BEGIN_SRC scheme - (list emacs-guix emacs-nix-mode) -#+END_SRC - -* EOF diff --git a/systems/izumi/system-configuration.scm b/systems/izumi/system-configuration.scm deleted file mode 100644 index d8f6997..0000000 --- a/systems/izumi/system-configuration.scm +++ /dev/null @@ -1,290 +0,0 @@ -(define-module (systems izumi system-configuration) - #:use-module (suweren commons sudoers)) - -(define radicale-keys "/secrets/radicale/keys") -(define dovecot-keys "/secrets/dovecot") - -( use-modules - ( gnu ) - ( gnu services syncthing ) - ( guix records ) - ( ice-9 match ) - ( nongnu packages linux ) - ( nongnu system linux-initrd ) ) - -( use-package-modules - admin certs kde-frameworks kde-multimedia kde-pim kde-plasma kde-utils mail - version-control ) - -( use-service-modules - base certbot cgit desktop mail shepherd ssh version-control web xorg ) - -(define nginx-accounts - (list (user-group (name "nginx") - (system? #t)) - (user-account (name "nginx") - (group "nginx") - (supplementary-groups '("git")) - (system? #t) - (comment "nginx server user") - (home-directory "/var/empty") - (shell (file-append (specification->package "shadow") - "/sbin/nologin"))))) - -(define nginx-service-type* - (service-type (inherit nginx-service-type) - (extensions (map (lambda (extension) - (if (eq? (service-extension-target extension) - account-service-type) - (service-extension account-service-type - (const nginx-accounts)) - extension)) - (service-type-extensions nginx-service-type))))) - -(define hosts-izumi - (local-file "system-files/hosts")) - -( operating-system - ( bootloader - ( bootloader-configuration - ( bootloader grub-efi-bootloader ) - ( keyboard-layout ( keyboard-layout "pl" ) ) - ( targets ( list "/boot/efi" ) ) ) ) - ( mapped-devices - ( list - ( mapped-device - ( source "/dev/sda2" ) - ( target "izumi" ) - ( type luks-device-mapping ) ) ) ) - ( file-systems - ( append - %base-file-systems - ( list - ( file-system - ( device "/dev/sda1" ) - ( mount-point "/boot/efi" ) - ( type "vfat" ) ) - ( file-system - ( dependencies mapped-devices ) - ( device "/dev/mapper/izumi" ) - ( mount-point "/" ) - ( type "xfs" ) ) ) ) ) - ( firmware ( list linux-firmware ) ) - ( groups - ( append - %base-groups - ( list - ( user-group - ( name "vmail" ) - ( system? #t ) )) ) ) - ( host-name "izumi" ) - (hosts-file hosts-izumi) - ( initrd microcode-initrd ) - ( kernel linux ) - ( keyboard-layout ( keyboard-layout "pl" ) ) - ( locale "pl_PL.utf8" ) - ( services - ( append - ( modify-services - %desktop-services - ( elogind-service-type - configuration => - ( elogind-configuration - ( inherit configuration ) - ( handle-lid-switch 'ignore ) - ( handle-lid-switch-docked 'ignore ) - ( handle-lid-switch-external-power 'ignore ) ) ) - ( gdm-service-type - configuration => - ( gdm-configuration - ( inherit configuration ) - ( auto-suspend? #f ) - ( wayland? #t ) ) ) - ( guix-service-type - configuration => - ( let* - ( ( non-guix.pub - ( string-append - "( public-key ( ecc ( curve Ed25519 )" - "( q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98# ) ) )" ) ) - ( authorized-keys - ( append - %default-authorized-guix-keys - ( list ( plain-file "non-guix.pub" non-guix.pub ) ) ) ) - ( extra-options - ( list "--gc-keep-derivations=yes" "--gc-keep-outputs=yes" ) ) - ( substitute-urls - ( append - %default-substitute-urls - ( list "https://substitutes.nonguix.org" ) ) ) ) - ( guix-configuration - ( inherit configuration ) - ( authorized-keys authorized-keys ) - ( extra-options extra-options ) - ( substitute-urls substitute-urls ) ) ) ) ) - ( list - (@ (users id1000) dkim-service) - (@ (users id1000) dovecot-service) - (@ (users id1000) smtp-service) - (service (service-type (inherit certbot-service-type) - (extensions (map (lambda (extension) - (if (eq? (service-extension-target extension) - nginx-service-type) - (service-extension nginx-service-type* - (@@ (gnu services certbot) - certbot-nginx-server-configurations)) - extension)) - (service-type-extensions certbot-service-type)))) - ( certbot-configuration - ( certificates - ( list - ( certificate-configuration - ( deploy-hook - ( program-file - "nginx-deploy-hook" - #~ - ( let - ( ( pid ( call-with-input-file "/var/run/nginx/pid" read ) ) ) - ( kill pid SIGHUP ) ) ) ) - ( domains - ( list - "marekpasnikowski.pl" - "git.marekpasnikowski.pl" - "radicale.marekpasnikowski.pl" ) ) ) ) ) - ( email "marek@marekpasnikowski.pl" ) - ( webroot "/srv/www/marek/marekpasnikowski.pl" ) ) ) - (service (service-type (inherit cgit-service-type) - (extensions (map (lambda (extension) - (if (eq? (service-extension-target extension) - nginx-service-type) - (service-extension nginx-service-type* - cgit-configuration-nginx-config) - extension)) - (service-type-extensions cgit-service-type)))) - ( cgit-configuration - ( nginx - ( list - ( nginx-server-configuration - ( locations - ( list - ( git-http-nginx-location-configuration - ( git-http-configuration - ( git-root "/var/lib/gitolite/repositories" ) - ( uri-path "/git" ) ) ) - ( nginx-location-configuration - ( body - ( list - "fastcgi_param HTTP_HOST $server_name ;" - "fastcgi_param PATH_INFO $uri ;" - "fastcgi_param QUERY_STRING $args ;" - "fastcgi_param SCRIPT_FILENAME $document_root/lib/cgit/cgit.cgi ;" - "fastcgi_pass 127.0.0.1:9000 ;" ) ) - ( uri "@cgit" ) ) - ( nginx-location-configuration - ( body ( list "root /srv/www/marek/marekpasnikowski.pl/ ;" ) ) - ( uri "/.well-known" ) ) ) ) - ( listen ( list "192.168.10.2:443 ssl" ) ) - ( root cgit ) - ( server-name ( list "git.marekpasnikowski.pl" ) ) - ( ssl-certificate - "/etc/letsencrypt/live/marekpasnikowski.pl/fullchain.pem" ) - ( ssl-certificate-key - "/etc/letsencrypt/live/marekpasnikowski.pl/privkey.pem" ) - ( try-files ( list "$uri" "@cgit" ) ) ) ) ) - ( repositories - ( list - ( repository-cgit-configuration - ( hide? #t ) - ( path "/srv/git/marek/packages" ) ) ) ) - ( repository-directory "/var/lib/gitolite/repositories" ) ) ) - (service fcgiwrap-service-type - (fcgiwrap-configuration (user "git") - (group "git"))) - ( service gitolite-service-type - ( gitolite-configuration - ( rc-file ( gitolite-rc-file ( umask #o0027 ) ) ) - ( admin-pubkey ( plain-file "gitolite-admin.pub" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK4THTYnHCc/ihCJNKJtGTNu1zCnLndbMHnxnrxzJk+N marek@izumi\n") ) ) ) - ( service plasma-desktop-service-type ) - ( service syncthing-service-type ( syncthing-configuration ( user "marek" ) ) ) - (service nginx-service-type* - ( nginx-configuration - ( server-blocks - ( list - ;; Top-Level - ( nginx-server-configuration - ( locations - ( list - ( nginx-location-configuration - ( uri "/.well-known" ) - ( body - ( list "root /srv/www/marek/marekpasnikowski.pl ;" ) ) ) ) ) - ( listen ( list "192.168.10.2:443 ssl" ) ) - ( root "/srv/www/marek/marekpasnikowski.pl" ) - ( server-name ( list "marekpasnikowski.pl" ) ) - ( ssl-certificate - "/etc/letsencrypt/live/marekpasnikowski.pl/fullchain.pem" ) - ( ssl-certificate-key - "/etc/letsencrypt/live/marekpasnikowski.pl/privkey.pem" ) ) - ;; Radicale - ( nginx-server-configuration - ( locations - ( list - ( nginx-location-configuration - ( body - ( list - "proxy_pass http://localhost:5232/ ;" - "proxy_set_header X-Script-Name \"\" ;" - "proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;" - "proxy_set_header Host $http_host ;" - "proxy_pass_header Authorization ;" ) ) - ( uri "/" ) ) - ( nginx-location-configuration - ( body - ( list "root /srv/www/marek/marekpasnikowski.pl ;" ) ) - ( uri "/.well-known" ) ) ) ) - ( listen ( list "192.168.10.2:443 ssl" ) ) - ( server-name ( list "radicale.marekpasnikowski.pl" ) ) ) ) ) ) ) - ( service openssh-service-type ) - ( service radicale-service-type - ( radicale-configuration - ( auth - ( radicale-auth-configuration - ( type 'htpasswd ) - ( htpasswd-filename radicale-keys ) - ( htpasswd-encryption 'plain ) ) ) ) ) - ( simple-service 'base-profile profile-service-type - ( append %base-packages - ( list ) ) ) - ( simple-service - 'nss-profile - profile-service-type - ( list nss-certs ) ) - ( simple-service - 'etc-files - etc-service-type - ( list - `( "mailname" ,( plain-file "mailname" "marekpasnikowski.pl\n" ) ) ) ) ) ) ) - ( sudoers-file %sudoers-specification* ) - ( swap-devices - ( list - ( swap-space - ( target "/dev/sda3" ) ) ) ) - ( timezone "Europe/Warsaw" ) - ( users - ( append - %base-user-accounts - ( list - ( user-account - ( comment "vmail" ) - ( group "vmail" ) - ( home-directory "/home/vmail" ) - ( name "vmail" ) - ( system? #t ) ) - ( user-account - ( comment "Marek Paśnikowski" ) - ( group "users" ) - ( home-directory "/home/marek" ) - ( name "marek" ) - ( supplementary-groups - ( list "audio" "netdev" "video" "wheel" ) ) ) ) ) ) ) diff --git a/systems/izumi/system-files/hosts b/systems/izumi/system-files/hosts deleted file mode 100644 index bc92c36..0000000 --- a/systems/izumi/system-files/hosts +++ /dev/null @@ -1,4 +0,0 @@ -127.0.0.1 localhost izumi -::1 localhost izumi - -81.190.248.246 marekpasnikowski git.marekpasnikowski.pl
\ No newline at end of file diff --git a/systems/izumi/system-files/smtpd.conf b/systems/izumi/system-files/smtpd.conf deleted file mode 100644 index 9fe7503..0000000 --- a/systems/izumi/system-files/smtpd.conf +++ /dev/null @@ -1,24 +0,0 @@ -# The prefix on GUIX is not the default one — it is /etc . -table aliases file:/etc/aliases - -# The mail certificates are issued by Let‘s Encrypt and served by NGINX -pki marekpasnikowski.pl cert "/etc/letsencrypt/live/marekpasnikowski.pl/fullchain.pem" -pki marekpasnikowski.pl key "/etc/letsencrypt/live/marekpasnikowski.pl/privkey.pem" - -# Listen for local messages. -listen on lo - -# Listen for messages from the internet. -listen on enp1s0 tls port 25 pki "marekpasnikowski.pl" -listen on enp1s0 smtps port 465 pki "marekpasnikowski.pl" - -# There is no filtering in the design, so the two actions are enough. -action receive maildir alias <aliases> -action send relay - -# Match incoming messages. -match from local for local action receive -match from any for domain "marekpasnikowski.pl" action receive - -# Match outgoing messages. -match for any action send diff --git a/systems/izumi/system-files/sudoers b/systems/izumi/system-files/sudoers deleted file mode 100644 index 6af6e3b..0000000 --- a/systems/izumi/system-files/sudoers +++ /dev/null @@ -1,3 +0,0 @@ -root ALL=(ALL) ALL -%wheel ALL=(ALL) ALL -Defaults passwd_timeout=0 diff --git a/systems/mcdowell.scm b/systems/mcdowell.scm deleted file mode 100644 index ecf4407..0000000 --- a/systems/mcdowell.scm +++ /dev/null @@ -1,50 +0,0 @@ -(define-module (systems mcdowell) - #:use-module (gnu services) ; service - #:use-module (gnu services guix) ; guix-home-service-type - #:use-module (gnu system keyboard) ; keyboard-layout - #:use-module (machines portable-bios) ; bootloader-configuration* - ; file-systems* - ; firmware* - ; hardware-groups - ; initrd* - ; kernel* - ; swap-devices* - #:use-module (suweren system) ; %suweren-operating-system - #:use-module (users id1000) ; uid1000-account - ; uid1000-home-environment - ; uid1000-name - ) - -;; string -(define host-name* - "mcdowell") - -;; (record user-account) -(define users* - (list uid1000-account)) - -;; record operating-system -(define-public operating-system* - (let* ((home-environments `((,uid1000-name ,(uid1000-home-environment host-name*)))) - - (guix-home (service guix-home-service-type - home-environments)) - - (keyboard-layout* (keyboard-layout "pl")) - (services* (list guix-home)) - (timezone* "Europe/Warsaw") - (locale* "pl_PL.utf8")) - (%suweren-operating-system kernel* - (bootloader-configuration* keyboard-layout*) - keyboard-layout* - initrd* - firmware* - host-name* - (file-systems* host-name*) - (swap-devices* host-name*) - users* - timezone* - locale* - services*))) - -operating-system* diff --git a/users/id1000.scm b/users/id1000.scm index cfc4827..6a9a9f8 100644 --- a/users/id1000.scm +++ b/users/id1000.scm @@ -1,298 +1,66 @@ -(define-module (users id1000) - ;; home-environment - #:use-module (gnu home) - - ;; home-profile-service-type - ;; home-xdg-configuration-files-service-type - #:use-module (gnu home services) - - ;; gparted - #:use-module (gnu packages disk) - - ;; emacs - #:use-module (gnu packages emacs) - - ;; emacs-org-roam - ;; emacs-paredit - #:use-module (gnu packages emacs-xyz) +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> - ;; git - #:use-module (gnu packages version-control) - - ;; simple-service - #:use-module (gnu services) +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> - ;; user-account - #:use-module (gnu system shadow) +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. - ;; local-file +(define-module (users id1000) #:use-module (guix gexp) - - ;; %suweren-home-services - #:use-module (suweren home) - - #:use-module (guix records) - #:use-module (ice-9 match)) - -(define-record-type* <dkimproxy-out-signature-configuration> - dkimproxy-out-signature-configuration - make-dkimproxy-out-signature-configuration - dkimproxy-out-signature-configuration? - (type dkimproxy-out-signature-configuration-type - (default 'dkim)) - (key dkimproxy-out-signature-configuration-key - (default #f)) - (algorithm dkimproxy-out-signature-configuration-algorithm - (default #f)) - (method dkimproxy-out-signature-configuration-method - (default #f)) - (domain dkimproxy-out-signature-configuration-domain - (default #f)) - (identity dkimproxy-out-signature-configuration-identity - (default #f)) - (selector dkimproxy-out-signature-configuration-selector - (default #f))) - -(define-public generate-dkimproxy-out-signature-configuration - (match-lambda - (($ - <dkimproxy-out-signature-configuration> - type - key - algorithm - method - domain - identity - selector ) - (string-append - (match type - ('dkim "dkim") - ('domainkeys "domainkeys")) - (if (or key algorithm method domain identity selector) - (string-append - "(" - (string-join - `(,@ (if key - (list (string-append "key=" key)) - '()) - ,@ (if algorithm - (list (string-append "a=" algorithm)) - '()) - ,@ (if method - (list (string-append "c=" method)) - '()) - ,@ (if domain - (list (string-append "d=" domain)) - '()) - ,@ (if identity - (list (string-append "i=" identity)) - '()) - ,@ (if selector - (list (string-append "s=" selector)) - '())) - ",") - ")") - ""))))) - -(define-record-type* <dkimproxy-out-configuration> - dkimproxy-out-configuration - make-dkimproxy-out-configuration - dkimproxy-out-configuration? - (package dkimproxy-out-configuration-package - (default (@ (gnu packages mail) dkimproxy))) - (listen dkimproxy-out-configuration-listen - (default #f)) - (relay dkimproxy-out-configuration-relay - (default #f)) - (list-id-map dkimproxy-out-configuration-list-id-map - (default '())) - (sender-map dkimproxy-out-configuration-sender-map - (default '())) - (reject-error? dkimproxy-out-configuration-sender-reject-error? - (default #f)) - (config-file dkimproxy-out-configuration-config-file - (default #f))) - -(define (generate-map-file config filename) - (apply - plain-file - filename - (map (lambda (config) - (match config - ((selector (config ...)) - (string-append - selector " " - (string-join - (map - generate-dkimproxy-out-signature-configuration - config) - "\n"))) - ((selector config) - (string-append - selector " " - (generate-dkimproxy-out-signature-configuration - config))))) - config))) - -(define dkimproxy-out-shepherd-service - (match-lambda - (($ - <dkimproxy-out-configuration> - package - listen - relay - list-id-map - sender-map - reject-error? - config-file) - (list - ((@ (gnu services shepherd) shepherd-service) - (provision '(dkimproxy-out)) - (requirement '(loopback)) - (documentation "Outbound DKIM proxy.") - (start - (let ((proxy (file-append package "/bin/dkimproxy.out"))) - (if config-file - #~ - (make-forkexec-constructor - (list - #$ - proxy - (string-append "--conf_file=" #$ config-file) - "--pidfile=/var/run/dkimproxy.out.pid" - "--user=dkimproxy" "--group=dkimproxy") - #:pid-file "/var/run/dkimproxy.out.pid") - (let* - ((first-signature - (match sender-map - (((sender (signature _ ...)) _ ...) signature) - (((sender signature) _ ...) signature))) - (domains - (apply append - (map - (lambda (sender) - (match sender - (((domains ...) config) domains) - ((domain config) domain))) - sender-map))) - (sender-map - (generate-map-file sender-map "sender.map")) - (listid-map - (if (null? list-id-map) - #f - (generate-map-file list-id-map "listid.map"))) - (keyfile - (dkimproxy-out-signature-configuration-key - first-signature)) - (selector - (dkimproxy-out-signature-configuration-selector - first-signature)) - (method - (dkimproxy-out-signature-configuration-method - first-signature)) - (signature - (match (dkimproxy-out-signature-configuration-type - first-signature) - ('dkim "dkim") - ('domainkeys "domainkeys")))) - #~ - (make-forkexec-constructor - `(,#$ - proxy - "--pidfile=/var/run/dkimproxy.out.pid" - "--user=dkimproxy" "--group=dkimproxy" - ,(string-append "--listen=" #$ listen) - ,(string-append "--relay=" #$ relay) - ,(string-append "--sender_map=" #$ sender-map) - ,@ (if #$ listid-map - (list - (string-append "--listid_map=" #$ listid-map)) - '()) - ,(string-append "--domain=" #$ domains) - ,(string-append "--keyfile=" #$ keyfile) - ,(string-append "--selector=" #$ selector) - ,@ (if #$ method - (list - (string-append "--method=" #$ method)) - '()) - ,@ (if #$ reject-error? - '("--reject_error") - '()) - ,@ (if #$ signature - (list - (string-append "--signature=" #$ signature)) - '()))))))) - (stop #~ (make-kill-destructor))))))) - -(define %dkimproxy-accounts - (list (user-group (name "dkimproxy") - (system? #t)) - (user-account (name "dkimproxy") - (group "dkimproxy") - (system? #t) - (comment "Dkimproxy user") - (home-directory "/var/empty") - (shell (file-append (@ (gnu packages admin) - shadow) - "/sbin/nologin"))))) - -(define dkimproxy-out-service-type - (service-type - (name 'dkimproxy-out) - (description "stub") - (extensions - (list - (service-extension - account-service-type - (const %dkimproxy-accounts)) - (service-extension - (@ (gnu services shepherd) shepherd-root-service-type) - dkimproxy-out-shepherd-service))))) - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(define dkimproxy-signature-dkim - (dkimproxy-out-signature-configuration - (algorithm "rsa-sha256") - (key "/etc/mail/dkim/marekpasnikowski.pl.key") - (method "relaxed") - (selector "dkim") - (type 'dkim))) - -(define dkimproxy-signature-domainkeys - (dkimproxy-out-signature-configuration - (method "mofws") - (type 'domainkeys))) - -;;;;; - -(define aliases-file - ((@ (guix gexp) mixed-text-file) - "aliases" - "@ vmail\n")) - -(define blacklist-file - ((@ (guix gexp) mixed-text-file) - "blacklist" - "@yahoo.com.cn\n" - "@qq.com\n" - "@fnac.com\n" - "@just-aero.us\n" - "@elitetorrent1.com\n")) - -(define dkimproxy-signatures-marekpasnikowski - (list dkimproxy-signature-dkim - dkimproxy-signature-domainkeys)) + #:use-module (sovereign services mail) + #:use-module ( (gnu home) + #:prefix gnu:home:) + #:use-module ( (gnu home services) + #:prefix gnu:home:services:) + #:use-module ( (gnu home services desktop) + #:prefix gnu:home:services:desktop:) + #:use-module ( (gnu home services shepherd) + #:prefix gnu:home:services:shepherd:) + #:use-module ( (gnu home services sound) + #:prefix gnu:home:services:sound:) + #:use-module ( (gnu home services ssh) + #:prefix gnu:home:services:ssh:) + #:use-module ( (gnu packages audio) + #:prefix gnu:packages:audio:) + #:use-module ( (gnu packages disk) + #:prefix gnu:packages:disk:) + #:use-module ( (gnu packages version-control) + #:prefix gnu:packages:version-control:) + #:use-module ( (gnu services) + #:prefix gnu:services:) + #:use-module ( (gnu system accounts) + #:prefix gnu:system:accounts:) + #:use-module ( (sovereign packages emacs) + #:prefix sovereign:packages:emacs:) + #:use-module ( (sovereign services admin) + #:prefix sovereign:services:admin:) + #:use-module ( (sovereign services fontutils) + #:prefix sovereign:services:fontutils:) + #:use-module ( (sovereign systems) + #:prefix sovereign:systems:)) (define dovecot-imap-login-inet-configuration ((@ (gnu services mail) inet-listener-configuration) - (address "192.168.10.2") + (address "192.168.1.2") (port 993) (protocol "imaps"))) (define dovecot-lmtp-inet-configuration ((@ (gnu services mail) inet-listener-configuration) - (address "192.168.10.2 127.0.0.1") + (address "192.168.1.2 127.0.0.1") (port 24) (protocol "lmtp"))) @@ -333,20 +101,8 @@ (auto "subscribe") (special-use (list "\\Trash")))) -(define relays-file - ((@ (guix gexp) mixed-text-file) - "other-relays" - "mx1.forwardemail.net\n" - "mx2.forwardemail.net\n")) - -(define smtpd-keys - "/secrets/smtpd") - ;;; -(define dkimproxy-sender-marekpasnikowski - `("marekpasnikowski.pl" ,dkimproxy-signatures-marekpasnikowski)) - (define dovecot-imap ((@ (gnu services mail) protocol-configuration) (name "imap"))) @@ -389,76 +145,6 @@ "uid=vmail")) (driver "static"))) -(define (opensmtpd-config interface - domain) - ((@ (guix gexp) mixed-text-file) - "smtpd.conf" - "# This is the smtpd server system-wide configuration file.\n" - "# See smtpd.conf(5) for more information.\n" - "\n" - "# My TLS certificate and key\n" - "pki marekpasnikowski.pl cert \"/etc/letsencrypt/live/" domain "/fullchain.pem\"\n" - "pki marekpasnikowski.pl key \"/etc/letsencrypt/live/" domain "/privkey.pem\"\n" - "\n" - "# Edit this file to add add more virtual users (passwords are read in that file\n" - "# instead of /etc/passwd\n" - "table passwd file:" smtpd-keys "\n" - "\n" - "table other-relays file:" relays-file "\n" - "table blacklist file:" blacklist-file "\n" - "\n" - "# A simple spam filter\n" - "# filter spam-filter phase mail-from match mail-from <blacklist> reject \"555\"\n" - "\n" - "# port 25 is used only for receiving from external servers, and they may start\n" - "# a TLS session if they want.\n" - "listen on " interface " port 25 # tls pki marekpasnikowski.pl filter spam-filter\n" - "\n" - "# For sending messages from outside of this server, you need to authenticate and\n" - "# use TLS.\n" - "listen on " interface " port 465 smtps pki marekpasnikowski.pl mask-src auth <passwd>\n" - "\n" - "# Localhost is used by the .onion, so we use the same configuration for \n" - "# local connections." - "listen on lo port 25 tls pki marekpasnikowski.pl filter spam-filter\n" - "# Since incoming connection uses tor, we don't need tls, but still require\n" - "# authentication; we're not a relay\n" - "# listen on lo port 587 tls pki marekpasnikowski.pl mask-src auth <passwd>\n" - "\n" - "# DKIMproxy\n" - "listen on lo port 10028 tag DKIM_OUT\n" - "\n" - "# The socket is considered an internal connection\n" - "listen on socket mask-src\n" - "\n" - "# Maybe it'll work better if we connect to gmail only with v4?\n" - "# limit mta for domain gmail.com inet4\n" - "\n" - "# TODO: manage these files directly in the configuration?\n" - "# If you edit the file, you have to run \"smtpctl update table aliases\"\n" - "table aliases file:" aliases-file "\n" - "\n" - "# We define some actions\n" - "action receive lmtp \"/var/run/dovecot/lmtp\" rcpt-to virtual <aliases>\n" - "action outbound relay helo \"" domain "\"\n" - "action godkim relay host smtp://127.0.0.1:10027\n" - "\n" - "# We accept to relay any mail from authenticated users\n" - "match for any from any auth action godkim\n" - "match tag DKIM_OUT for any action outbound\n" - "\n" - "# Then, we reject on some other conditions:\n" - "\n" - "# If the mail tries to impersonate us\n" - "# match !from src <other-relays> mail-from \"@marekpasnikowski.pl\" for any reject\n" - "\n" - "# If it comes from someone on the blacklist\n" - "match from any mail-from <blacklist> reject\n" - "\n" - "# Finally, if we accept incoming messages\n" - "match from any for domain \"marekpasnikowski.pl\" action receive\n" - "match for local action receive\n" )) - (define ssl-cert-path (string-append "</etc/letsencrypt/live/" "marekpasnikowski.pl" @@ -471,12 +157,6 @@ ;;; -(define dkimproxy-out-configuration* - (dkimproxy-out-configuration - (listen "127.0.0.1:10027") - (relay "172.0.0.1:10028") - (sender-map `(,dkimproxy-sender-marekpasnikowski)))) - (define dovecot-configuration* ((@ (gnu services mail) dovecot-configuration) (disable-plaintext-auth? #t) @@ -494,76 +174,123 @@ (userdbs (list dovecot-userdb-static-configuration)))) (define groups - (list "kvm" + (list "audio" + ;; "libvirt" + "netdev" + "video" "wheel")) -(define opensmtpd-configuration* - ((@ (gnu services mail) opensmtpd-configuration) - (config-file (opensmtpd-config "enp1s0" - "marekpasnikowski.pl")))) - ;;; -(define-public dkim-service - (service dkimproxy-out-service-type - dkimproxy-out-configuration*)) +(define environment-variables + (let + ( (l-variables (list '("EDITOR" . "kate -s sesja -b")))) + (gnu:services:simple-service 'id1000-environment-variables + gnu:home:services:home-environment-variables-service-type + l-variables))) (define-public dovecot-service - (service (@ (gnu services mail) dovecot-service-type) + (gnu:services:service (@ (gnu services mail) dovecot-service-type) dovecot-configuration*)) -(define-public smtp-service - (service (@ (gnu services mail) opensmtpd-service-type) - opensmtpd-configuration*)) +(define openssh-host/* + (gnu:home:services:ssh:openssh-host + (name "top-level") + (host-name "*") + (extra-content (string-append "ServerAliveInterval 5\n" + "ServerAliveCountMax 11\n")))) + +(define openssh-configuration + (let + ( (l-aisaka (mixed-text-file "aisaka-openssh-keys" + "aisaka ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM0Eh0q54myeSEironEP9DEKl+ownYuH7oSgAVuLIDNt\n" + "[git.marekpasnikowski.pl]:23 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM0Eh0q54myeSEironEP9DEKl+ownYuH7oSgAVuLIDNt\n" + "[www.marekpasnikowski.pl]:23 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM0Eh0q54myeSEironEP9DEKl+ownYuH7oSgAVuLIDNt\n")) + (l-akashi (mixed-text-file "akashi-openssh-keys" + "akashi ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICtEYtiph2TwshHHSQhLL7A2ZvFMCogWuI8vfS3jLQsm\n")) + (l-ayase (mixed-text-file "ayase-openssh-keys" + "ayase ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIC9WLFRywGMc2Il35oLTSlG6VwdOreoMcj7SbiEt75i\n")) + (l-marek (mixed-text-file "marek-openssh-keys" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK4THTYnHCc/ihCJNKJtGTNu1zCnLndbMHnxnrxzJk+N marek@aisaka\n" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFzC1VvW6TB4pMuGyfTM36T7Ar7FZqSXc7kCoVDNwtUX marek@akashi\n" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMefVFbVR/yQ639LnmVacvaifYFJSocxi9wWJKUQJ/Vz marek@ayase\n" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJew7ti1qr545Z6OUZ/xcNUg7ib6P0pTbSZqFpSvNhKU marek@mcdowell\n" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICBo2coChmWHQn9BEbp0dA7DQG7CPEweVcsmnaIVmXyR marek@rakan\n")) + (l-mcdowell (mixed-text-file "mcdowell-openssh-keys" + "mcdowell ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP/EueZjfqWhdML17z+Da7+KWHofXBpP020ff1vKedOr\n")) + (l-rakan (mixed-text-file "rakan-openssh-keys" + "rakan ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFxlIhNlkWCNA+l/RiOJztB+VWhuJtDTUvSwwlE3MpgJ\n" + "[www.marekpasnikowski.pl]:24 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFxlIhNlkWCNA+l/RiOJztB+VWhuJtDTUvSwwlE3MpgJ\n"))) + (gnu:home:services:ssh:home-openssh-configuration + (hosts (list openssh-host/*)) + (known-hosts (list l-aisaka + l-akashi + l-mcdowell + l-rakan)) + (authorized-keys (list l-marek))))) + +(define openssh + (gnu:services:service + gnu:home:services:ssh:home-openssh-service-type + openssh-configuration)) (define-public uid1000-name "marek") (define-public uid1000-account - (user-account (name uid1000-name) - (group "users") - (supplementary-groups groups) - (uid 1000) - (comment "Marek Paśnikowski") - (home-directory "/home/marek"))) + (gnu:system:accounts:user-account + (name uid1000-name) + (password #f) + (uid 1000) + (group "users") + (supplementary-groups groups) + (comment "Marek Paśnikowski") + (home-directory "/home/marek"))) (define-public uid1000-home-environment - (lambda (host-name*) - (let* ((gitconfig-file (local-file "uid1000-gitconfig")) ; TODO modularize - (gitignore-file (local-file "uid1000-gitignore")) ; TODO review the contents - - (gitconfig (list "git/config" - gitconfig-file)) - (gitignore (list "git/ignore" - gitignore-file)) - - (emacs-packages (list emacs - emacs-org-roam - emacs-paredit)) - (git-configuration-files (list gitconfig - gitignore)) - (git-packages (list git)) - (packages (list gparted)) - - (emacs-software (simple-service 'emacs-packages - home-profile-service-type - emacs-packages)) - (git-configuration (simple-service 'git-configuration - home-xdg-configuration-files-service-type - git-configuration-files)) - (git-software (simple-service 'git-packages - home-profile-service-type - git-packages)) - (profile (simple-service 'user-packages - home-profile-service-type - packages)) - - (%suweren-home-services* (%suweren-home-services host-name*)) - (user-services (list emacs-software - git-configuration - git-software - profile)) + (let + ( (l-gitconfig-file (local-file "uid1000-gitconfig")) ; TODO modularize + (l-gitignore-file (local-file "uid1000-gitignore")) ; TODO review the contents + (l-home-dbus-service (gnu:services:service gnu:home:services:desktop:home-dbus-service-type)) + (l-home-files `( (".test-channels.scm" ,(local-file "./uid1000-test-channels.scm")))) + (l-home-pipewire-service (gnu:services:service gnu:home:services:sound:home-pipewire-service-type)) + (l-home-shepherd-service (gnu:services:service gnu:home:services:shepherd:home-shepherd-service-type))) + (let + ( (l-gitconfig (list "git/config" + l-gitconfig-file)) + (l-gitignore (list "git/ignore" + l-gitignore-file)) + (l-fontconfig (sovereign:services:fontutils:home-fontconfig-service-type #t + #t + "Noto")) + (l-home-files-service (gnu:services:simple-service 'home-files + gnu:home:services:home-files-service-type + l-home-files))) + (let* + ( (l-git-configuration-files (list l-gitconfig + l-gitignore)) + (l-git-configuration (gnu:services:simple-service 'git-configuration + gnu:home:services:home-xdg-configuration-files-service-type + l-git-configuration-files)) + (l-user-services (list sovereign:systems:bash-configuration + environment-variables + l-git-configuration + l-home-files-service + l-fontconfig))) + (gnu:home:home-environment + (packages (cons* gnu:packages:version-control:git + gnu:packages:disk:gparted + sovereign:systems:common-home-environment-packages)) + (services (cons* sovereign:services:admin:update-commands + l-home-dbus-service + l-home-pipewire-service + l-home-shepherd-service + openssh + sovereign:packages:emacs:spacemacs-home-files + sovereign:packages:emacs:spacemacs-home-profile + sovereign:packages:emacs:spacemacs-variables + l-user-services))))))) - (services* (append %suweren-home-services* - user-services))) - (home-environment (services services*))))) +(define-public named-home-environment + (list uid1000-name + uid1000-home-environment)) diff --git a/users/id1001.scm b/users/id1001.scm index 26a76f6..8a2110e 100644 --- a/users/id1001.scm +++ b/users/id1001.scm @@ -1,45 +1,63 @@ -(define-module (users id1001) - ;; home-environment - #:use-module (gnu home) - - ;; home-profile-service-type - ;; home-xdg-configuration-files-service-type - #:use-module (gnu home services) - - ;; simple-service - #:use-module (gnu services) +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> - ;; user-account - #:use-module (gnu system shadow) +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> - ;; %suweren-home-services - #:use-module (suweren home)) +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. -;; string -(define-public uid1001-name - "lilia") - -;; (string) -> -;; record user-account -(define-public uid1001-account - (user-account (name uid1001-name) - (group "users") - (uid 1001) - (comment "Liliana Ruszuk") - (home-directory "/home/lilia"))) +(define-module (users id1001) + #:use-module ( (gnu home) + #:prefix gnu:home:) + #:use-module ( (gnu packages libreoffice) + #:prefix gnu:packages:libreoffice:) + #:use-module ( (gnu system accounts) + #:prefix gnu:system:accounts:) + #:use-module ( (nongnu packages mozilla) + #:prefix nongnu:packages:mozilla:) + #:use-module ( (sovereign services admin) + #:prefix sovereign:services:admin:) + #:use-module ( (sovereign services fontutils) + #:prefix sovereign:services:fontutils:) + #:use-module ( (sovereign systems) + #:prefix sovereign:systems:)) -;; record home-environment -(define-public uid1001-home-environment - (lambda (host-name*) - (let* ((packages (list )) +(define name + "janusz") - (profile (simple-service 'user-packages - home-profile-service-type - packages)) +(define home-environment + (let + ( (l-fontconfig (sovereign:services:fontutils:home-fontconfig-service-type #t + #t + "Noto"))) + (let + ( (l-services (list sovereign:systems:bash-configuration + sovereign:services:admin:update-commands + l-fontconfig))) + (gnu:home:home-environment + (packages (cons* gnu:packages:libreoffice:libreoffice + sovereign:systems:common-home-environment-packages)) + (services l-services))))) - (%suweren-home-services* (%suweren-home-services host-name*)) - (user-services (list profile)) +(define-public named-home-environment + (list name + home-environment)) - (services* (append %suweren-home-services* - user-services))) - (home-environment (services services*))))) +(define-public user-account + (gnu:system:accounts:user-account + (name name) + (password #f) + (group "users") + (supplementary-groups (list "wheel")))) diff --git a/users/uid1000-gitconfig b/users/uid1000-gitconfig index 300f906..c040d80 100644 --- a/users/uid1000-gitconfig +++ b/users/uid1000-gitconfig @@ -1,10 +1,36 @@ +# SPDX-License-Identifier: GPL-3.0-or-later +# SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +# COPYRIGHT NOTICE +# +# Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +# LICENSE NOTICE +# +# This library 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 library 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 library. +# If not, see <https://www.gnu.org/licenses/>. + +[core] +quotePath = false + [commit] - gpgsign = true +gpgsign = true [user] - email = marek@marekpasnikowski.pl - name = Marek Paśnikowski - signingkey = 6D81B1207711899F +email = marek@marekpasnikowski.pl +name = Marek Paśnikowski +signingkey = 6D81B1207711899F [push] - autoSetupRemote = true +autoSetupRemote = true + +[safe] +directory = * diff --git a/users/uid1000-gitignore b/users/uid1000-gitignore index 98e588f..73a9355 100644 --- a/users/uid1000-gitignore +++ b/users/uid1000-gitignore @@ -1,3 +1,23 @@ +# SPDX-License-Identifier: GPL-3.0-or-later +# SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +# COPYRIGHT NOTICE +# +# Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +# LICENSE NOTICE +# +# This library 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 library 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 library. +# If not, see <https://www.gnu.org/licenses/>. + # -*- mode: gitignore; -*- *~ \#*\# diff --git a/users/uid1000-test-channels.scm b/users/uid1000-test-channels.scm new file mode 100644 index 0000000..adce628 --- /dev/null +++ b/users/uid1000-test-channels.scm @@ -0,0 +1,55 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (users uid1000-test-channels) + #:use-module ( (guix channels) + #:prefix guix:channels:) + #:use-module ( (sovereign channels) + #:prefix sovereign:channels:)) + +(define test-deployment-channel + (guix:channels:channel + (inherit sovereign:channels:deployment-channel) + (branch "test"))) + +(define test-guix-channel + (guix:channels:channel + (inherit sovereign:channels:default-guix-channel) + (branch "test"))) + +(define test-nonguix-channel + (guix:channels:channel + (inherit sovereign:channels:nonguix-channel) + (branch "test"))) + +(define test-rde-channel + (guix:channels:channel + (inherit sovereign:channels:rde-channel))) + +(define test-sovereign-channel + (guix:channels:channel + (inherit sovereign:channels:sovereign-channel) + (branch "test"))) + +(list test-deployment-channel + test-guix-channel + test-nonguix-channel + test-rde-channel + test-sovereign-channel) diff --git a/users/vmail.scm b/users/vmail.scm new file mode 100644 index 0000000..41454f1 --- /dev/null +++ b/users/vmail.scm @@ -0,0 +1,34 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl> + +;;; LICENSE NOTICE +;;; +;;; This library 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 library 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 library. +;;; If not, see <https://www.gnu.org/licenses/>. + +(define-module (users vmail) + #:use-module ((gnu system accounts) + #:prefix gnu:system:accounts:)) + +(define vmail-name + "vmail") + +(define-public vmail-account + (gnu:system:accounts:user-account + (name vmail-name) + (group vmail-name) + (comment "used to own and manage mailboxes") + (home-directory "/home/vmail") + (system? #t))) |
