├── LICENSE.md ├── README.org ├── flake.lock ├── flake.nix ├── home ├── atabey │ └── home.nix ├── cyrus │ └── home.nix ├── dotfiles │ ├── alacritty.toml │ ├── alacritty.yml │ ├── config.nu │ ├── config_papis │ ├── config_qtile.py │ ├── env.nu │ ├── happiness.trans │ ├── helpers_xfce.rc │ ├── images │ │ ├── PiN_EFOehme.jpg │ │ ├── cc_tram.jpg │ │ ├── cfd_DWudN.png │ │ ├── haskell_20.xpm │ │ ├── my_shells.png │ │ ├── python_icon.png │ │ ├── some_apps.png │ │ └── tc_feyn.png │ ├── init.trans │ ├── init.vim │ ├── ipython_config.py │ ├── matplotlibrc │ ├── pyproject.toml │ ├── randr_conf.sh │ ├── rc.conf │ ├── rofi_browser │ ├── set_emacs.sh │ ├── termux.properties │ ├── trayer_padding.sh │ ├── vimrc │ ├── xmobarrc │ ├── xmonad.hs │ ├── xonshrc │ └── zshextra └── modules │ ├── bash │ └── default.nix │ ├── bqn386 │ └── default.nix │ ├── cbqn │ └── default.nix │ ├── dconf │ └── default.nix │ ├── default.nix │ ├── emacs │ └── default.nix │ ├── fish │ └── default.nix │ └── zsh │ └── default.nix ├── systems └── cyrus │ ├── configuration.nix │ └── hardware-configuration.nix └── utils ├── flakes ├── array_langs.nix ├── greenx_flake.nix ├── mach_nix │ └── flake_fypp.nix ├── papis-zotero-flake.nix └── qiskit-flake.nix └── shells ├── fortran └── shell_fypp.nix └── python ├── shell_RISE.nix ├── shell_basic.nix ├── shell_cplot.nix ├── shell_fortls.nix └── shell_jedhy.nix /LICENSE.md: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.org: -------------------------------------------------------------------------------- 1 | #+BEGIN_HTML 2 | 3 | GPLv3 4 | 5 | 6 | 7 | Build with Nix 8 | 9 | #+END_HTML 10 | 11 | * Panadestein's Nix/NixOS Configuration 12 | 13 | #+BEGIN_HTML 14 |
15 | 16 | 17 |
18 | #+END_HTML 19 | 20 | Welcome to my personal flake [[https://nixos.org/][Nix/NixOS]] configuration, powered by [[https://nix-community.github.io/home-manager/][home-manager]]. This configuration 21 | is designed to be production-ready (according to my personal requirements) and comes with the [[https://xmonad.org/][xmonad]] and [[https://qtile.org/screenshots/][Qtile]] 22 | tiling window managers. Additionally, I have a declarative configuration for the [[https://release.gnome.org/][gnome]] 23 | desktop environment, although it's not my primary environment. 24 | 25 | ** Remarks: 26 | 27 | This configuration is specifically tailored for AMD hardware, hence, modifications might 28 | be necessary to suit other machines. 29 | 30 | *** Using flakes 31 | 32 | Nix [[https://www.tweag.io/blog/2020-07-31-nixos-flakes/][flakes]] is the preferred way to utilize this configuration. The use of flakes enhances the reproducibility 33 | of the system and enables seamless support for multiple machines via the =flake.nix= file. 34 | 35 | **** NixOS 36 | 37 | My NixOS machine is called [[https://en.wikipedia.org/wiki/Cyrus_Smith][cyrus]]. Here I build the home and system configuration together as follows: 38 | 39 | #+begin_src bash 40 | sudo nixos-rebuild --flake .# switch 41 | #+end_src 42 | 43 | Upgrading the system implies updating the inputs one at the time: 44 | 45 | #+begin_src bash 46 | sudo nix flake lock --update-input 47 | #+end_src 48 | 49 | or all of them together: 50 | 51 | #+begin_src bash 52 | nix flake update 53 | #+end_src 54 | 55 | **** Non-NixOS 56 | 57 | I maintain a second configuration for non-NixOS hosts (tested in Guix System so far), which is 58 | called [[https://en.wikipedia.org/wiki/Atabey_(goddess)][atabey]]. Here I build only the home configuration: 59 | 60 | #+begin_src bash 61 | nix build .# 62 | ./result/activate 63 | #+end_src 64 | 65 | *** Using nix-channels 66 | 67 | The flake configuration can be easily transformed into a non-flake, channel based one. 68 | For example, if you want to use the =nixos-unstable= you could do: 69 | 70 | #+begin_src bash 71 | sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos 72 | sudo nixos-rebuild switch --upgrade 73 | #+end_src 74 | 75 | When using a hybrid workflow (e.g. to keep using =nix-shell= in a flake system) 76 | it is important to update the channels without rebuilding: 77 | 78 | #+begin_src bash 79 | nix-channel --update 80 | #+end_src 81 | -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "crane": { 4 | "flake": false, 5 | "locked": { 6 | "lastModified": 1727316705, 7 | "narHash": "sha256-/mumx8AQ5xFuCJqxCIOFCHTVlxHkMT21idpbgbm/TIE=", 8 | "owner": "ipetkov", 9 | "repo": "crane", 10 | "rev": "5b03654ce046b5167e7b0bccbd8244cb56c16f0e", 11 | "type": "github" 12 | }, 13 | "original": { 14 | "owner": "ipetkov", 15 | "ref": "v0.19.0", 16 | "repo": "crane", 17 | "type": "github" 18 | } 19 | }, 20 | "dream2nix": { 21 | "inputs": { 22 | "nixpkgs": [ 23 | "nix-inspect", 24 | "nci", 25 | "nixpkgs" 26 | ], 27 | "purescript-overlay": "purescript-overlay", 28 | "pyproject-nix": "pyproject-nix" 29 | }, 30 | "locked": { 31 | "lastModified": 1732214960, 32 | "narHash": "sha256-ViyEMSYwaza6y55XTDrsRi2K4YKCLsefMTorjWSE27s=", 33 | "owner": "nix-community", 34 | "repo": "dream2nix", 35 | "rev": "a8dac99db44307fdecead13a39c584b97812d0d4", 36 | "type": "github" 37 | }, 38 | "original": { 39 | "owner": "nix-community", 40 | "repo": "dream2nix", 41 | "type": "github" 42 | } 43 | }, 44 | "emacs-overlay": { 45 | "inputs": { 46 | "nixpkgs": "nixpkgs", 47 | "nixpkgs-stable": "nixpkgs-stable" 48 | }, 49 | "locked": { 50 | "lastModified": 1748309015, 51 | "narHash": "sha256-NVgo/saT8uehYYwwhzWrTTFlpH0icR2E3tHHKsUouJ4=", 52 | "owner": "nix-community", 53 | "repo": "emacs-overlay", 54 | "rev": "0fba546d9aa235fc726fe9c8c3bb703e918c14c4", 55 | "type": "github" 56 | }, 57 | "original": { 58 | "owner": "nix-community", 59 | "repo": "emacs-overlay", 60 | "type": "github" 61 | } 62 | }, 63 | "flake-compat": { 64 | "flake": false, 65 | "locked": { 66 | "lastModified": 1696426674, 67 | "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", 68 | "owner": "edolstra", 69 | "repo": "flake-compat", 70 | "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", 71 | "type": "github" 72 | }, 73 | "original": { 74 | "owner": "edolstra", 75 | "repo": "flake-compat", 76 | "type": "github" 77 | } 78 | }, 79 | "flake-utils": { 80 | "inputs": { 81 | "systems": "systems" 82 | }, 83 | "locked": { 84 | "lastModified": 1731533236, 85 | "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", 86 | "owner": "numtide", 87 | "repo": "flake-utils", 88 | "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", 89 | "type": "github" 90 | }, 91 | "original": { 92 | "owner": "numtide", 93 | "repo": "flake-utils", 94 | "type": "github" 95 | } 96 | }, 97 | "home-manager": { 98 | "inputs": { 99 | "nixpkgs": [ 100 | "nixpkgs" 101 | ] 102 | }, 103 | "locked": { 104 | "lastModified": 1748227609, 105 | "narHash": "sha256-SaSdslyo6UGDpPUlmrPA4dWOEuxCy2ihRN9K6BnqYsA=", 106 | "owner": "nix-community", 107 | "repo": "home-manager", 108 | "rev": "d23d20f55d49d8818ac1f1b2783671e8a6725022", 109 | "type": "github" 110 | }, 111 | "original": { 112 | "owner": "nix-community", 113 | "repo": "home-manager", 114 | "type": "github" 115 | } 116 | }, 117 | "mk-naked-shell": { 118 | "flake": false, 119 | "locked": { 120 | "lastModified": 1681286841, 121 | "narHash": "sha256-3XlJrwlR0nBiREnuogoa5i1b4+w/XPe0z8bbrJASw0g=", 122 | "owner": "yusdacra", 123 | "repo": "mk-naked-shell", 124 | "rev": "7612f828dd6f22b7fb332cc69440e839d7ffe6bd", 125 | "type": "github" 126 | }, 127 | "original": { 128 | "owner": "yusdacra", 129 | "repo": "mk-naked-shell", 130 | "type": "github" 131 | } 132 | }, 133 | "nci": { 134 | "inputs": { 135 | "crane": "crane", 136 | "dream2nix": "dream2nix", 137 | "mk-naked-shell": "mk-naked-shell", 138 | "nixpkgs": [ 139 | "nix-inspect", 140 | "nixpkgs" 141 | ], 142 | "parts": "parts", 143 | "rust-overlay": "rust-overlay", 144 | "treefmt": "treefmt" 145 | }, 146 | "locked": { 147 | "lastModified": 1732342495, 148 | "narHash": "sha256-7qfvmnJQByEtl5bS+rTydLCe3Saz9kMRaJxPCdqb1wQ=", 149 | "owner": "yusdacra", 150 | "repo": "nix-cargo-integration", 151 | "rev": "ae9de2d06519a3bb26b649e1c0d1cfa22c20dc0e", 152 | "type": "github" 153 | }, 154 | "original": { 155 | "owner": "yusdacra", 156 | "repo": "nix-cargo-integration", 157 | "type": "github" 158 | } 159 | }, 160 | "nix-inspect": { 161 | "inputs": { 162 | "nci": "nci", 163 | "nixpkgs": "nixpkgs_2", 164 | "parts": "parts_2" 165 | }, 166 | "locked": { 167 | "lastModified": 1733357226, 168 | "narHash": "sha256-ArwdTtlIje7yOTblkZs4aQ1+HBtEwJKkfKOiA9tY8nA=", 169 | "owner": "bluskript", 170 | "repo": "nix-inspect", 171 | "rev": "2938c8e94acca6a7f1569f478cac6ddc4877558e", 172 | "type": "github" 173 | }, 174 | "original": { 175 | "owner": "bluskript", 176 | "repo": "nix-inspect", 177 | "type": "github" 178 | } 179 | }, 180 | "nixpkgs": { 181 | "locked": { 182 | "lastModified": 1748190013, 183 | "narHash": "sha256-R5HJFflOfsP5FBtk+zE8FpL8uqE7n62jqOsADvVshhE=", 184 | "owner": "NixOS", 185 | "repo": "nixpkgs", 186 | "rev": "62b852f6c6742134ade1abdd2a21685fd617a291", 187 | "type": "github" 188 | }, 189 | "original": { 190 | "owner": "NixOS", 191 | "ref": "nixos-unstable", 192 | "repo": "nixpkgs", 193 | "type": "github" 194 | } 195 | }, 196 | "nixpkgs-stable": { 197 | "locked": { 198 | "lastModified": 1748037224, 199 | "narHash": "sha256-92vihpZr6dwEMV6g98M5kHZIttrWahb9iRPBm1atcPk=", 200 | "owner": "NixOS", 201 | "repo": "nixpkgs", 202 | "rev": "f09dede81861f3a83f7f06641ead34f02f37597f", 203 | "type": "github" 204 | }, 205 | "original": { 206 | "owner": "NixOS", 207 | "ref": "nixos-24.11", 208 | "repo": "nixpkgs", 209 | "type": "github" 210 | } 211 | }, 212 | "nixpkgs-stable_2": { 213 | "locked": { 214 | "lastModified": 1704290814, 215 | "narHash": "sha256-LWvKHp7kGxk/GEtlrGYV68qIvPHkU9iToomNFGagixU=", 216 | "owner": "nixos", 217 | "repo": "nixpkgs", 218 | "rev": "70bdadeb94ffc8806c0570eb5c2695ad29f0e421", 219 | "type": "github" 220 | }, 221 | "original": { 222 | "owner": "nixos", 223 | "ref": "nixos-23.05", 224 | "repo": "nixpkgs", 225 | "type": "github" 226 | } 227 | }, 228 | "nixpkgs_2": { 229 | "locked": { 230 | "lastModified": 1732014248, 231 | "narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=", 232 | "owner": "nixos", 233 | "repo": "nixpkgs", 234 | "rev": "23e89b7da85c3640bbc2173fe04f4bd114342367", 235 | "type": "github" 236 | }, 237 | "original": { 238 | "owner": "nixos", 239 | "ref": "nixos-unstable", 240 | "repo": "nixpkgs", 241 | "type": "github" 242 | } 243 | }, 244 | "nixpkgs_3": { 245 | "locked": { 246 | "lastModified": 1748190013, 247 | "narHash": "sha256-R5HJFflOfsP5FBtk+zE8FpL8uqE7n62jqOsADvVshhE=", 248 | "owner": "nixos", 249 | "repo": "nixpkgs", 250 | "rev": "62b852f6c6742134ade1abdd2a21685fd617a291", 251 | "type": "github" 252 | }, 253 | "original": { 254 | "owner": "nixos", 255 | "ref": "nixos-unstable", 256 | "repo": "nixpkgs", 257 | "type": "github" 258 | } 259 | }, 260 | "nixpkgs_4": { 261 | "locked": { 262 | "lastModified": 1742069588, 263 | "narHash": "sha256-C7jVfohcGzdZRF6DO+ybyG/sqpo1h6bZi9T56sxLy+k=", 264 | "owner": "NixOS", 265 | "repo": "nixpkgs", 266 | "rev": "c80f6a7e10b39afcc1894e02ef785b1ad0b0d7e5", 267 | "type": "github" 268 | }, 269 | "original": { 270 | "owner": "NixOS", 271 | "ref": "nixos-unstable", 272 | "repo": "nixpkgs", 273 | "type": "github" 274 | } 275 | }, 276 | "nixpkgs_5": { 277 | "locked": { 278 | "lastModified": 1746300365, 279 | "narHash": "sha256-thYTdWqCRipwPRxWiTiH1vusLuAy0okjOyzRx4hLWh4=", 280 | "owner": "NixOS", 281 | "repo": "nixpkgs", 282 | "rev": "f21e4546e3ede7ae34d12a84602a22246b31f7e0", 283 | "type": "github" 284 | }, 285 | "original": { 286 | "owner": "NixOS", 287 | "ref": "nixpkgs-unstable", 288 | "repo": "nixpkgs", 289 | "type": "github" 290 | } 291 | }, 292 | "papis": { 293 | "inputs": { 294 | "flake-utils": "flake-utils", 295 | "nixpkgs": "nixpkgs_4", 296 | "pyproject-nix": "pyproject-nix_2" 297 | }, 298 | "locked": { 299 | "lastModified": 1747417459, 300 | "narHash": "sha256-ftf0tgf8swt4NqTEwLbit1VCrmcdSUVgaKhKmoZJaQk=", 301 | "owner": "papis", 302 | "repo": "papis", 303 | "rev": "0e3ffff4bd1b62cdf0a9fdc7f54d6a2e2ab90082", 304 | "type": "github" 305 | }, 306 | "original": { 307 | "owner": "papis", 308 | "repo": "papis", 309 | "type": "github" 310 | } 311 | }, 312 | "parts": { 313 | "inputs": { 314 | "nixpkgs-lib": [ 315 | "nix-inspect", 316 | "nci", 317 | "nixpkgs" 318 | ] 319 | }, 320 | "locked": { 321 | "lastModified": 1730504689, 322 | "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=", 323 | "owner": "hercules-ci", 324 | "repo": "flake-parts", 325 | "rev": "506278e768c2a08bec68eb62932193e341f55c90", 326 | "type": "github" 327 | }, 328 | "original": { 329 | "owner": "hercules-ci", 330 | "repo": "flake-parts", 331 | "type": "github" 332 | } 333 | }, 334 | "parts_2": { 335 | "inputs": { 336 | "nixpkgs-lib": [ 337 | "nix-inspect", 338 | "nixpkgs" 339 | ] 340 | }, 341 | "locked": { 342 | "lastModified": 1730504689, 343 | "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=", 344 | "owner": "hercules-ci", 345 | "repo": "flake-parts", 346 | "rev": "506278e768c2a08bec68eb62932193e341f55c90", 347 | "type": "github" 348 | }, 349 | "original": { 350 | "owner": "hercules-ci", 351 | "repo": "flake-parts", 352 | "type": "github" 353 | } 354 | }, 355 | "purescript-overlay": { 356 | "inputs": { 357 | "flake-compat": "flake-compat", 358 | "nixpkgs": [ 359 | "nix-inspect", 360 | "nci", 361 | "dream2nix", 362 | "nixpkgs" 363 | ], 364 | "slimlock": "slimlock" 365 | }, 366 | "locked": { 367 | "lastModified": 1728546539, 368 | "narHash": "sha256-Sws7w0tlnjD+Bjck1nv29NjC5DbL6nH5auL9Ex9Iz2A=", 369 | "owner": "thomashoneyman", 370 | "repo": "purescript-overlay", 371 | "rev": "4ad4c15d07bd899d7346b331f377606631eb0ee4", 372 | "type": "github" 373 | }, 374 | "original": { 375 | "owner": "thomashoneyman", 376 | "repo": "purescript-overlay", 377 | "type": "github" 378 | } 379 | }, 380 | "pyproject-nix": { 381 | "flake": false, 382 | "locked": { 383 | "lastModified": 1702448246, 384 | "narHash": "sha256-hFg5s/hoJFv7tDpiGvEvXP0UfFvFEDgTdyHIjDVHu1I=", 385 | "owner": "davhau", 386 | "repo": "pyproject.nix", 387 | "rev": "5a06a2697b228c04dd2f35659b4b659ca74f7aeb", 388 | "type": "github" 389 | }, 390 | "original": { 391 | "owner": "davhau", 392 | "ref": "dream2nix", 393 | "repo": "pyproject.nix", 394 | "type": "github" 395 | } 396 | }, 397 | "pyproject-nix_2": { 398 | "inputs": { 399 | "nixpkgs": [ 400 | "papis", 401 | "nixpkgs" 402 | ] 403 | }, 404 | "locked": { 405 | "lastModified": 1741648141, 406 | "narHash": "sha256-jQEZCSCgm60NGmBg3JPu290DDhNVI1GVVEd0P8VCnME=", 407 | "owner": "nix-community", 408 | "repo": "pyproject.nix", 409 | "rev": "7747e5a058245c7abe033a798f818f0572d8e155", 410 | "type": "github" 411 | }, 412 | "original": { 413 | "owner": "nix-community", 414 | "repo": "pyproject.nix", 415 | "type": "github" 416 | } 417 | }, 418 | "qchem-overlay": { 419 | "inputs": { 420 | "nixpkgs": "nixpkgs_5" 421 | }, 422 | "locked": { 423 | "lastModified": 1747047619, 424 | "narHash": "sha256-p0Keb6nAZf5zCG1lG/vQ0SYxycx2D7rMnKTEys71qAY=", 425 | "owner": "Nix-QChem", 426 | "repo": "NixOS-QChem", 427 | "rev": "0fe242c917d6521887f7c99fef3f6f0cf910cd7a", 428 | "type": "github" 429 | }, 430 | "original": { 431 | "owner": "Nix-QChem", 432 | "repo": "NixOS-QChem", 433 | "type": "github" 434 | } 435 | }, 436 | "qtile-flake": { 437 | "inputs": { 438 | "nixpkgs": [ 439 | "nixpkgs" 440 | ] 441 | }, 442 | "locked": { 443 | "lastModified": 1748305669, 444 | "narHash": "sha256-WT0P80j7ZEJwdQe4yucsEVJHBs1wZZJLQg/44iOZDag=", 445 | "owner": "qtile", 446 | "repo": "qtile", 447 | "rev": "0de69c706ebdb8a4889e6df0cd915e31d5f1e8fb", 448 | "type": "github" 449 | }, 450 | "original": { 451 | "owner": "qtile", 452 | "repo": "qtile", 453 | "type": "github" 454 | } 455 | }, 456 | "root": { 457 | "inputs": { 458 | "emacs-overlay": "emacs-overlay", 459 | "home-manager": "home-manager", 460 | "nix-inspect": "nix-inspect", 461 | "nixpkgs": "nixpkgs_3", 462 | "nixpkgs-stable": "nixpkgs-stable_2", 463 | "papis": "papis", 464 | "qchem-overlay": "qchem-overlay", 465 | "qtile-flake": "qtile-flake" 466 | } 467 | }, 468 | "rust-overlay": { 469 | "inputs": { 470 | "nixpkgs": [ 471 | "nix-inspect", 472 | "nci", 473 | "nixpkgs" 474 | ] 475 | }, 476 | "locked": { 477 | "lastModified": 1732328983, 478 | "narHash": "sha256-RHt12f/slrzDpSL7SSkydh8wUE4Nr4r23HlpWywed9E=", 479 | "owner": "oxalica", 480 | "repo": "rust-overlay", 481 | "rev": "ed8aa5b64f7d36d9338eb1d0a3bb60cf52069a72", 482 | "type": "github" 483 | }, 484 | "original": { 485 | "owner": "oxalica", 486 | "repo": "rust-overlay", 487 | "type": "github" 488 | } 489 | }, 490 | "slimlock": { 491 | "inputs": { 492 | "nixpkgs": [ 493 | "nix-inspect", 494 | "nci", 495 | "dream2nix", 496 | "purescript-overlay", 497 | "nixpkgs" 498 | ] 499 | }, 500 | "locked": { 501 | "lastModified": 1688756706, 502 | "narHash": "sha256-xzkkMv3neJJJ89zo3o2ojp7nFeaZc2G0fYwNXNJRFlo=", 503 | "owner": "thomashoneyman", 504 | "repo": "slimlock", 505 | "rev": "cf72723f59e2340d24881fd7bf61cb113b4c407c", 506 | "type": "github" 507 | }, 508 | "original": { 509 | "owner": "thomashoneyman", 510 | "repo": "slimlock", 511 | "type": "github" 512 | } 513 | }, 514 | "systems": { 515 | "locked": { 516 | "lastModified": 1681028828, 517 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 518 | "owner": "nix-systems", 519 | "repo": "default", 520 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 521 | "type": "github" 522 | }, 523 | "original": { 524 | "owner": "nix-systems", 525 | "repo": "default", 526 | "type": "github" 527 | } 528 | }, 529 | "treefmt": { 530 | "inputs": { 531 | "nixpkgs": [ 532 | "nix-inspect", 533 | "nci", 534 | "nixpkgs" 535 | ] 536 | }, 537 | "locked": { 538 | "lastModified": 1732292307, 539 | "narHash": "sha256-5WSng844vXt8uytT5djmqBCkopyle6ciFgteuA9bJpw=", 540 | "owner": "numtide", 541 | "repo": "treefmt-nix", 542 | "rev": "705df92694af7093dfbb27109ce16d828a79155f", 543 | "type": "github" 544 | }, 545 | "original": { 546 | "owner": "numtide", 547 | "repo": "treefmt-nix", 548 | "type": "github" 549 | } 550 | } 551 | }, 552 | "root": "root", 553 | "version": 7 554 | } 555 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "My Nix/NixOS configuration"; 3 | 4 | inputs = { 5 | # The nixpkgs channels 6 | nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.05"; 7 | nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; 8 | 9 | # Home-manager following the unstable channel 10 | home-manager = { 11 | url = "github:nix-community/home-manager"; 12 | inputs.nixpkgs.follows = "nixpkgs"; 13 | }; 14 | 15 | # The Emacs overlay 16 | emacs-overlay.url = "github:nix-community/emacs-overlay"; 17 | 18 | # The QChem flake. Contains several quantum chemistry packages 19 | qchem-overlay.url = "github:Nix-QChem/NixOS-QChem"; 20 | 21 | # Ranger-like nix config inspector 22 | nix-inspect.url = "github:bluskript/nix-inspect"; 23 | 24 | # The best bibliography manager ever 25 | papis.url = "github:papis/papis"; 26 | 27 | # The best window manager I know 28 | qtile-flake = { 29 | url = "github:qtile/qtile"; 30 | inputs.nixpkgs.follows = "nixpkgs"; 31 | }; 32 | }; 33 | 34 | outputs = { self, nixpkgs, home-manager, qtile-flake, ... }@inputs: 35 | let 36 | system = "x86_64-linux"; 37 | pkgs = import nixpkgs { 38 | inherit system; 39 | config = { allowUnfree = true; }; 40 | }; 41 | # Nest stable channel into default unstable 42 | overlay-stable = final: prev: { 43 | nixpkgs-stable = import inputs.nixpkgs-stable { 44 | inherit system; 45 | config.allowUnfree = true; 46 | }; 47 | }; 48 | 49 | # Systems and users (Bergman's reference here) 50 | persona = "loren"; 51 | rechnerNixOS = "cyrus"; 52 | rechnerNonNixOS = "atabey"; 53 | in 54 | { 55 | nixosConfigurations = { 56 | ${rechnerNixOS} = nixpkgs.lib.nixosSystem { 57 | inherit system; 58 | specialArgs = { inherit inputs; }; 59 | modules = [ 60 | ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-stable qtile-flake.overlays.default ]; }) 61 | ./systems/${rechnerNixOS}/configuration.nix 62 | home-manager.nixosModules.home-manager 63 | { 64 | home-manager.useGlobalPkgs = true; 65 | home-manager.users.${persona} = ./home/${rechnerNixOS}/home.nix; 66 | } 67 | ]; 68 | }; 69 | }; 70 | 71 | homeConfigurations.${persona} = home-manager.lib.homeManagerConfiguration { 72 | inherit pkgs; 73 | extraSpecialArgs = { inherit inputs; }; 74 | modules = [ 75 | ./home/${rechnerNonNixOS}/home.nix 76 | ]; 77 | }; 78 | 79 | packages.${system}.${persona} = self.homeConfigurations.${persona}.activationPackage; 80 | }; 81 | } 82 | -------------------------------------------------------------------------------- /home/atabey/home.nix: -------------------------------------------------------------------------------- 1 | # Home manager configuration 2 | { inputs, config, lib, pkgs, ... }: 3 | let 4 | hm = inputs.home-manager.lib.hm; 5 | in 6 | { 7 | # Non NixOS setup 8 | home.username = "loren"; 9 | home.homeDirectory = "/home/atabey"; 10 | 11 | # Let home-manager manage itself 12 | programs.home-manager.enable = true; 13 | 14 | # Import home-manager modules 15 | imports = builtins.concatMap import [ 16 | ../modules 17 | ]; 18 | 19 | # User packages 20 | home.packages = with pkgs; [ 21 | # General utilities 22 | asciidoctor 23 | bat 24 | bc 25 | brightnessctl 26 | calcurse 27 | ccls 28 | code-minimap 29 | cowsay 30 | dconf2nix 31 | fd 32 | figlet 33 | fortune 34 | fzf 35 | guake 36 | htop 37 | lolcat 38 | poppler_utils 39 | qemu 40 | tmate 41 | tmux 42 | trayer 43 | ueberzug 44 | universal-ctags 45 | volumeicon 46 | xclip 47 | xdg-utils 48 | xdotool 49 | # Windowm manager utilities 50 | dmenu 51 | nitrogen 52 | picom 53 | xmobar 54 | # GTK packages 55 | arc-theme 56 | cairo 57 | glib 58 | gnome.eog 59 | gnome.gnome-screenshot 60 | gnome.simple-scan 61 | gobject-introspection 62 | gtk3 63 | # Xfce packages 64 | xfce.exo 65 | xfce.thunar 66 | xfce.thunar-archive-plugin 67 | xfce.xfconf 68 | # Terminal based apps 69 | alacritty 70 | ranger 71 | # Text editors 72 | neovim 73 | # Science 74 | avogadro2 75 | gnuplot 76 | molden 77 | nodePackages.insect 78 | pymol 79 | zotero 80 | # Office 81 | calibre 82 | djvulibre 83 | evince 84 | libreoffice-fresh 85 | pandoc 86 | translate-shell 87 | xournalpp 88 | # Videos 89 | ffmpeg 90 | mpv 91 | youtube-dl 92 | # Image editing 93 | gimp 94 | imagemagick 95 | inkscape 96 | pdftk 97 | # Programming utilities 98 | cmake 99 | exercism 100 | fortran-language-server 101 | neovide 102 | shellcheck 103 | valgrind 104 | # Programming languages 105 | chez 106 | clojure 107 | gcc 108 | gdb 109 | ghc 110 | gnumake 111 | jdk11 112 | leiningen 113 | mpich 114 | nodejs 115 | racket 116 | sbcl 117 | # Internet and communications 118 | brave 119 | firefox 120 | mattermost-desktop 121 | nyxt 122 | qutebrowser 123 | skypeforlinux 124 | slack 125 | tdesktop 126 | whatsapp-for-linux 127 | zoom-us 128 | # Leisure 129 | retroarch 130 | # Web 131 | bundler 132 | hugo 133 | # Latex 134 | (texlive.combine { 135 | scheme-full = pkgs.texlive.scheme-full // { 136 | pkgs = pkgs.lib.filter 137 | (x: (x.pname != "xindy")) 138 | pkgs.texlive.scheme-full.pkgs; 139 | }; 140 | }) 141 | # Spell checkers and dictionaries 142 | aspell 143 | aspellDicts.de 144 | aspellDicts.en 145 | aspellDicts.es 146 | aspellDicts.fr 147 | hunspell 148 | hunspellDicts.de_DE 149 | hunspellDicts.de_DE 150 | hunspellDicts.en_US 151 | hunspellDicts.fr-moderne 152 | languagetool 153 | ]; 154 | 155 | # Git 156 | programs.git = { 157 | enable = true; 158 | userName = "Panadestein"; 159 | userEmail = "rpana92@gmail.com"; 160 | extraConfig = { 161 | credential.helper = "${ 162 | pkgs.git.override { withLibsecret = true; } 163 | }/bin/git-credential-libsecret";}; 164 | }; 165 | 166 | # VScode configuration 167 | programs.vscode = { 168 | enable = true; 169 | package = pkgs.vscode.fhsWithPackages (ps: with ps; [ fortran-language-server ]); 170 | }; 171 | 172 | # Rofi 173 | programs.rofi = { 174 | enable = true; 175 | package = pkgs.rofi.override { plugins = [ pkgs.rofi-file-browser ]; }; 176 | terminal = "${pkgs.alacritty}/bin/alacritty"; 177 | theme = "arthur"; 178 | extraConfig = { 179 | modi = "window,drun,run,ssh,file-browser-extended"; 180 | }; 181 | }; 182 | xdg.configFile."rofi/file-browser".source = ../dotfiles/rofi_browser; 183 | 184 | # Alacritty 185 | xdg.configFile."alacritty/alacritty.yml".source = ../dotfiles/alacritty.yml; 186 | programs.alacritty = { 187 | enable = true; 188 | }; 189 | 190 | # Xmobar 191 | xdg.configFile."xmobar/.xmobarrc".source = ../dotfiles/xmobarrc; 192 | home.file.".xmonad/xpm/haskell_20.xpm".source = ../dotfiles/images/haskell_20.xpm; 193 | home.file.".xmonad/trayer_padding.sh".source = ../dotfiles/trayer_padding.sh; 194 | programs.xmobar = { 195 | enable = true; 196 | }; 197 | 198 | # Vim and Neovim 199 | home.file.".vimrc".source = ../dotfiles/vimrc; 200 | xdg.configFile."nvim/init.vim".source = ../dotfiles/init.vim; 201 | 202 | # Ranger 203 | xdg.configFile."ranger/rc.conf".source = ../dotfiles/rc.conf; 204 | 205 | # Thunar 206 | xdg.configFile."xfce4/helpers.rc".source = ../dotfiles/helpers_xfce.rc; 207 | 208 | # Ipython 209 | home.file.".ipython/profile_default/ipython_config.py".source = ../dotfiles/ipython_config.py; 210 | 211 | # Matplotlib (ensure Qt backend) 212 | home.file.".config/matplotlib/matplotlibrc".source = ../dotfiles/matplotlibrc; 213 | 214 | # Translate Shell 215 | xdg.configFile."translate-shell/init.trans".source = ../dotfiles/init.trans; 216 | home.file.".config/translate-shell/happiness.trans".source = ../dotfiles/happiness.trans; 217 | 218 | # Picom, disables if not using a WM 219 | services.picom = { 220 | enable = true; 221 | activeOpacity = 1.0; 222 | inactiveOpacity = 1.0; 223 | menuOpacity = 1.0; 224 | wintypes = { 225 | dock = { shadow = false; }; 226 | dnd = { shadow = false; }; 227 | }; 228 | opacityRules = [ 229 | "90:class_g = 'Alacritty'" 230 | ]; 231 | backend = "glx"; 232 | }; 233 | 234 | # Extra Xsession config 235 | xsession = { 236 | windowManager = { 237 | xmonad = { 238 | enable = true; 239 | enableContribAndExtras = true; 240 | config = ../dotfiles/xmonad.hs; 241 | }; 242 | }; 243 | }; 244 | 245 | # Pointer cursor 246 | home.pointerCursor = { 247 | x11.enable = true; 248 | name = "Adwaita"; 249 | package = pkgs.gnome.adwaita-icon-theme; 250 | size = 25; 251 | }; 252 | 253 | # Qtile configuration 254 | xdg.configFile."qtile/config.py".source = ../dotfiles/config_qtile.py; 255 | home.file.".config/qtile/python_icon.png".source = ../dotfiles/images/python_icon.png; 256 | home.file.".config/qtile/tc_feyn.png".source = ../dotfiles/images/tc_feyn.png; 257 | home.file.".config/qtile/cc_tram.jpg".source = ../dotfiles/images/cc_tram.jpg; 258 | 259 | # Set LightDM avatar (https://wiki.archlinux.org/title/LightDM#Changing_your_avatar) 260 | home.file.".face".source = ../dotfiles/images/cfd_DWudN.png; 261 | 262 | # Script to control plugged monitors 263 | home.file.".config/scripts/randr_conf.sh".source = ../dotfiles/randr_conf.sh; 264 | 265 | # GTk theme, disabled if using Gnome 266 | gtk = { 267 | enable = true; 268 | iconTheme = { 269 | name = "Adwaita"; 270 | package = pkgs.gnome.adwaita-icon-theme; 271 | }; 272 | cursorTheme = { 273 | name = "Adwaita"; 274 | package = pkgs.gnome.adwaita-icon-theme; 275 | size = 25; 276 | }; 277 | theme = { 278 | name = "Arc-Dark"; 279 | package = pkgs.arc-theme; 280 | }; 281 | }; 282 | 283 | # Removable devices 284 | services.udiskie = { 285 | enable = true; 286 | tray = "always"; 287 | }; 288 | 289 | # State version 290 | home.stateVersion = "22.05"; 291 | } 292 | -------------------------------------------------------------------------------- /home/cyrus/home.nix: -------------------------------------------------------------------------------- 1 | # Home manager configuration 2 | { inputs, config, lib, pkgs, ... }: 3 | let 4 | hm = inputs.home-manager.lib.hm; 5 | cbqn = pkgs.callPackage ../modules/cbqn/default.nix { }; 6 | bqn386_git = pkgs.callPackage ../modules/bqn386/default.nix { }; 7 | in 8 | { 9 | # Import home-manager modules 10 | imports = builtins.concatMap import [ 11 | ../modules 12 | ]; 13 | 14 | # User packages 15 | home.packages = with pkgs; [ 16 | # General utilities 17 | any-nix-shell 18 | asciidoctor 19 | bat 20 | bc 21 | bottom 22 | brightnessctl 23 | calcurse 24 | ccls 25 | code-minimap 26 | cowsay 27 | dconf2nix 28 | dysk 29 | eza 30 | fd 31 | figlet 32 | fortune 33 | fzf 34 | grc 35 | htop 36 | lolcat 37 | nvtopPackages.amd 38 | poppler_utils 39 | qemu 40 | ripgrep 41 | sd 42 | tmate 43 | tmux 44 | trayer 45 | tree 46 | nix-prefetch-git 47 | nixpkgs-stable.ueberzugpp 48 | universal-ctags 49 | volumeicon 50 | xclip 51 | xdg-utils 52 | xdotool 53 | # Windowm manager utilities 54 | dmenu 55 | flameshot 56 | nitrogen 57 | picom 58 | xmobar 59 | # GTK packages 60 | arc-theme 61 | cairo 62 | glib 63 | gnome-calendar 64 | gobject-introspection 65 | gtk3 66 | guake 67 | loupe 68 | simple-scan 69 | # Xfce packages 70 | xfce.exo 71 | (xfce.thunar.override { 72 | thunarPlugins = [xfce.thunar-archive-plugin]; 73 | }) 74 | xfce.xfconf 75 | # Terminal based apps 76 | alacritty 77 | gdu 78 | ranger 79 | vivid 80 | # Text editors 81 | neovim 82 | # Science 83 | gnuplot 84 | graphviz 85 | # Office 86 | calibre 87 | crow-translate 88 | djvulibre 89 | evince 90 | libreoffice 91 | ltex-ls 92 | pandoc 93 | translate-shell 94 | xournalpp 95 | # Videos 96 | ffmpeg 97 | kooha 98 | mpv 99 | yt-dlp 100 | # Image editing 101 | gimp 102 | imagemagick 103 | inkscape 104 | pdftk 105 | # Programming utilities 106 | cmake 107 | fortls 108 | gh 109 | haskell-language-server 110 | hyperfine 111 | mob 112 | neovide 113 | nil 114 | nixfmt-classic 115 | ride 116 | rpi-imager 117 | rust-analyzer 118 | samply 119 | shellcheck 120 | valgrind 121 | # Programming languages 122 | cargo 123 | cbqn 124 | chez 125 | chicken 126 | clojure 127 | (dyalog.override {acceptLicense = true;}) 128 | gcc 129 | gdb 130 | ghc 131 | gnumake 132 | jdk11 133 | julia-bin 134 | lean4 135 | leiningen 136 | mpich 137 | nodejs 138 | octave 139 | racket 140 | rustc 141 | sbcl 142 | uiua 143 | # Shells 144 | nushell 145 | xonsh 146 | # Advanced calculators 147 | fend 148 | frink 149 | numbat 150 | # Internet and communications 151 | brave 152 | firefox 153 | google-chrome 154 | slack 155 | tdesktop 156 | thunderbird 157 | whatsapp-for-linux 158 | # Leisure (NES, SNES and N64) 159 | (retroarch.withCores ( 160 | cores: with libretro; [ 161 | mupen64plus 162 | nestopia 163 | snes9x 164 | ] 165 | )) 166 | # Web 167 | bundler 168 | hugo 169 | # Latex 170 | texlive.combined.scheme-full 171 | # Spell checkers and dictionaries 172 | (aspellWithDicts (dicts: with dicts; [ en 173 | en-computers 174 | en-science 175 | es 176 | de 177 | fr 178 | ])) 179 | hunspell 180 | hunspellDicts.de_DE 181 | hunspellDicts.de_DE 182 | hunspellDicts.en_US 183 | hunspellDicts.fr-moderne 184 | languagetool 185 | # Fonts 186 | bqn386_git 187 | # Security 188 | (pass.withExtensions 189 | (exts: [ 190 | exts.pass-otp 191 | exts.pass-import 192 | exts.pass-update 193 | ])) 194 | rofi-pass 195 | ]; 196 | 197 | # Make sure fontconfig gets updated 198 | fonts.fontconfig.enable = true; 199 | 200 | # Git 201 | programs.git = { 202 | enable = true; 203 | userName = "Panadestein"; 204 | userEmail = "rpana92@gmail.com"; 205 | extraConfig = { 206 | credential.helper = "${ 207 | pkgs.git.override { withLibsecret = true; } 208 | }/bin/git-credential-libsecret";}; 209 | }; 210 | 211 | # VScode configuration 212 | programs.vscode = { 213 | enable = true; 214 | package = pkgs.vscode.fhsWithPackages (ps: with ps; [ fortran-language-server ]); 215 | }; 216 | 217 | # Rofi 218 | programs.rofi = { 219 | enable = true; 220 | package = pkgs.rofi; 221 | terminal = "${pkgs.alacritty}/bin/alacritty"; 222 | theme = "arthur"; 223 | extraConfig = { 224 | modi = "window,drun,run,ssh"; 225 | }; 226 | }; 227 | 228 | # Alacritty 229 | xdg.configFile."alacritty/alacritty.toml".source = ../dotfiles/alacritty.toml; 230 | programs.alacritty = { 231 | enable = true; 232 | }; 233 | 234 | # Xmobar 235 | xdg.configFile."xmobar/.xmobarrc".source = ../dotfiles/xmobarrc; 236 | home.file.".xmonad/xpm/haskell_20.xpm".source = ../dotfiles/images/haskell_20.xpm; 237 | home.file.".xmonad/trayer_padding.sh".source = ../dotfiles/trayer_padding.sh; 238 | programs.xmobar = { 239 | enable = true; 240 | }; 241 | 242 | # Vim and Neovim 243 | home.file.".vimrc".source = ../dotfiles/vimrc; 244 | xdg.configFile."nvim/init.vim".source = ../dotfiles/init.vim; 245 | 246 | # Ranger 247 | xdg.configFile."ranger/rc.conf".source = ../dotfiles/rc.conf; 248 | 249 | # Thunar 250 | xdg.configFile."xfce4/helpers.rc".source = ../dotfiles/helpers_xfce.rc; 251 | 252 | # Ipython 253 | home.file.".ipython/profile_default/ipython_config.py".source = ../dotfiles/ipython_config.py; 254 | 255 | # Matplotlib (ensure Qt backend) 256 | home.file.".config/matplotlib/matplotlibrc".source = ../dotfiles/matplotlibrc; 257 | 258 | # Papis 259 | home.file.".config/papis/config".source = ../dotfiles/config_papis; 260 | 261 | # Nushell 262 | home.file.".config/nushell/env.nu".source = ../dotfiles/env.nu; 263 | home.file.".config/nushell/config.nu".source = ../dotfiles/config.nu; 264 | 265 | # Xonsh 266 | home.file.".xonshrc".source = ../dotfiles/xonshrc; 267 | 268 | # Translate Shell 269 | xdg.configFile."translate-shell/init.trans".source = ../dotfiles/init.trans; 270 | home.file.".config/translate-shell/happiness.trans".source = ../dotfiles/happiness.trans; 271 | 272 | # Picom, disable if not using a WM 273 | services.picom = { 274 | enable = true; 275 | activeOpacity = 1.0; 276 | inactiveOpacity = 1.0; 277 | menuOpacity = 1.0; 278 | wintypes = { 279 | dock = { shadow = false; }; 280 | dnd = { shadow = false; }; 281 | }; 282 | opacityRules = [ 283 | "90:class_g = 'Alacritty'" 284 | ]; 285 | backend = "glx"; 286 | vSync = true; 287 | }; 288 | 289 | # Extra Xsession config 290 | xsession = { 291 | windowManager = { 292 | xmonad = { 293 | enable = true; 294 | enableContribAndExtras = true; 295 | config = ../dotfiles/xmonad.hs; 296 | }; 297 | }; 298 | }; 299 | 300 | # Pointer cursor 301 | home.pointerCursor = { 302 | x11.enable = true; 303 | name = "Adwaita"; 304 | package = pkgs.adwaita-icon-theme; 305 | size = 25; 306 | }; 307 | 308 | # Qtile configuration 309 | xdg.configFile."qtile/config.py".source = ../dotfiles/config_qtile.py; 310 | home.file.".config/qtile/python_icon.png".source = ../dotfiles/images/python_icon.png; 311 | home.file.".config/qtile/tc_feyn.png".source = ../dotfiles/images/tc_feyn.png; 312 | home.file.".config/qtile/PiN_EFOehme.jpg".source = ../dotfiles/images/PiN_EFOehme.jpg; 313 | home.file.".config/qtile/cc_tram.jpg".source = ../dotfiles/images/cc_tram.jpg; 314 | 315 | # Set LightDM avatar (https://wiki.archlinux.org/title/LightDM#Changing_your_avatar) 316 | home.file.".face".source = ../dotfiles/images/cfd_DWudN.png; 317 | 318 | # Script to control plugged monitors 319 | home.file.".config/scripts/randr_conf.sh".source = ../dotfiles/randr_conf.sh; 320 | 321 | # GTk theme, disabled if using Gnome 322 | gtk = { 323 | enable = true; 324 | iconTheme = { 325 | name = "Adwaita"; 326 | package = pkgs.adwaita-icon-theme; 327 | }; 328 | cursorTheme = { 329 | name = "Adwaita"; 330 | package = pkgs.adwaita-icon-theme; 331 | size = 25; 332 | }; 333 | theme = { 334 | name = "Arc-Dark"; 335 | package = pkgs.arc-theme; 336 | }; 337 | gtk3.extraConfig = { 338 | Settings = '' 339 | gtk-application-prefer-dark-theme=1 340 | ''; 341 | }; 342 | gtk4.extraConfig = { 343 | Settings = '' 344 | gtk-application-prefer-dark-theme=1 345 | ''; 346 | }; 347 | }; 348 | 349 | # Removable devices 350 | services.udiskie = { 351 | enable = false; 352 | tray = "always"; 353 | }; 354 | 355 | # State version 356 | home.stateVersion = "22.05"; 357 | } 358 | -------------------------------------------------------------------------------- /home/dotfiles/alacritty.toml: -------------------------------------------------------------------------------- 1 | [colors.bright] 2 | black = "0x7f8c8d" 3 | blue = "0x3daee9" 4 | cyan = "0x16a085" 5 | green = "0x1cdc9a" 6 | magenta = "0x8e44ad" 7 | red = "0xc0392b" 8 | white = "0xffffff" 9 | yellow = "0xfdbc4b" 10 | 11 | [colors.dim] 12 | black = "0x31363b" 13 | blue = "0x1b668f" 14 | cyan = "0x186c60" 15 | green = "0x17a262" 16 | magenta = "0x614a73" 17 | red = "0x783228" 18 | white = "0x63686d" 19 | yellow = "0xb65619" 20 | 21 | [colors.normal] 22 | black = "0x232627" 23 | blue = "0x1d99f3" 24 | cyan = "0x1abc9c" 25 | green = "0x11d116" 26 | magenta = "0x9b59b6" 27 | red = "0xed1515" 28 | white = "0xfcfcfc" 29 | yellow = "0xf67400" 30 | 31 | [colors.primary] 32 | background = "0x232627" 33 | bright_foreground = "0xffffff" 34 | dim_foreground = "0xeff0f1" 35 | foreground = "0xfcfcfc" 36 | 37 | [env] 38 | TERM = "xterm-256color" 39 | 40 | [font] 41 | size = 20 42 | 43 | [font.bold] 44 | family = "Fira Code" 45 | style = "Bold" 46 | 47 | [font.bold_italic] 48 | family = "Fira Code" 49 | style = "Bold Italic" 50 | 51 | [font.italic] 52 | family = "Fira Code" 53 | style = "Italic" 54 | 55 | [font.normal] 56 | family = "Fira Code" 57 | style = "Regular" 58 | 59 | [scrolling] 60 | history = 5000 61 | 62 | [window] 63 | title = "Alacritty" 64 | 65 | [window.class] 66 | general = "Alacritty" 67 | instance = "Alacritty" 68 | -------------------------------------------------------------------------------- /home/dotfiles/alacritty.yml: -------------------------------------------------------------------------------- 1 | # A simple Alacritty config 2 | 3 | # TERM variable 4 | env: 5 | TERM: xterm-256color 6 | 7 | # Window config 8 | window: 9 | title: Alacritty 10 | class: 11 | instance: Alacritty 12 | general: Alacritty 13 | 14 | # Scrolling config 15 | scrolling: 16 | history: 5000 17 | 18 | # Font config 19 | font: 20 | normal: 21 | family: Fira Code 22 | style: Regular 23 | bold: 24 | family: Fira Code 25 | style: Bold 26 | italic: 27 | family: Fira Code 28 | style: Italic 29 | bold_italic: 30 | family: Fira Code 31 | style: Bold Italic 32 | size: 20 33 | 34 | # KDE Breeze (Ported from Konsole) 35 | colors: 36 | # Default colors 37 | primary: 38 | background: '0x232627' 39 | foreground: '0xfcfcfc' 40 | 41 | dim_foreground: '0xeff0f1' 42 | bright_foreground: '0xffffff' 43 | dim_background: '0x31363b' 44 | bright_background: '0x000000' 45 | 46 | # Normal colors 47 | normal: 48 | black: '0x232627' 49 | red: '0xed1515' 50 | green: '0x11d116' 51 | yellow: '0xf67400' 52 | blue: '0x1d99f3' 53 | magenta: '0x9b59b6' 54 | cyan: '0x1abc9c' 55 | white: '0xfcfcfc' 56 | 57 | # Bright colors 58 | bright: 59 | black: '0x7f8c8d' 60 | red: '0xc0392b' 61 | green: '0x1cdc9a' 62 | yellow: '0xfdbc4b' 63 | blue: '0x3daee9' 64 | magenta: '0x8e44ad' 65 | cyan: '0x16a085' 66 | white: '0xffffff' 67 | 68 | # Dim colors 69 | dim: 70 | black: '0x31363b' 71 | red: '0x783228' 72 | green: '0x17a262' 73 | yellow: '0xb65619' 74 | blue: '0x1b668f' 75 | magenta: '0x614a73' 76 | cyan: '0x186c60' 77 | white: '0x63686d' 78 | -------------------------------------------------------------------------------- /home/dotfiles/config.nu: -------------------------------------------------------------------------------- 1 | #----------------------------- 2 | # Panadestein's Nushell Config 3 | #----------------------------- 4 | 5 | $env.config = { 6 | show_banner: false 7 | cursor_shape: { 8 | emacs: line 9 | } 10 | } 11 | 12 | $env.LS_COLORS = (vivid generate snazzy | str trim) 13 | 14 | #----------------------------- 15 | # Aliases 16 | #----------------------------- 17 | 18 | # Emacs 19 | alias e = emacsclient 20 | alias en = emacsclient -c -nw 21 | alias cde = cd ~/.emacs.d/ 22 | alias cfe = e ~/.emacs.d/init.el 23 | 24 | # (Neo)vim 25 | alias v = nvim 26 | alias cfv = vim ~/.vimrc 27 | alias sv = sudo nvim 28 | alias cfn = neovide --maximized ~/.config/nvim/init.vim 29 | alias n = neovide --maximized 30 | 31 | # Generic 32 | alias c = code -r 33 | alias r = ranger 34 | alias t = trans 35 | alias ka = killall 36 | alias jnb = jupyter notebook 37 | alias jour1 = journalctl -p 3 -xb 38 | alias meteo = curl http://wttr.in 39 | alias starwars = telnet towel.blinkenlights.nl 40 | 41 | #----------------------------- 42 | # Custom commands 43 | #----------------------------- 44 | 45 | # Fun 46 | 47 | def cow [] { 48 | fortune | cowsay 49 | } 50 | 51 | def wo [] { 52 | hostname | figlet -t $in | lolcat 53 | } 54 | 55 | # Debugging 56 | 57 | def jour2 [] { 58 | journalctl -xb | rg rror 59 | } 60 | 61 | def isrun [proc] { 62 | ps | rg $proc; 63 | } 64 | 65 | # Utils 66 | 67 | def E [fil] { 68 | with-env [SUDO_EDITOR "emacsclient -t -a emacs"] {sudoedit $fil} 69 | } 70 | 71 | def poc [...col: string] { 72 | let redcol = $col | reduce { |it, acc| $acc + " " + $it} 73 | let st = 'collections : ' | append $'"($redcol)"' | str join ' ' 74 | papis open $"\'($st)\'" 75 | } 76 | 77 | def emhash [commit] { 78 | nix-prefetch-url --unpack $"https://github.com/Panadestein/emacsd/archive/($commit).tar.gz" 79 | } -------------------------------------------------------------------------------- /home/dotfiles/config_papis: -------------------------------------------------------------------------------- 1 | # My all in all library 2 | 3 | [panalib] 4 | dir = ~/Documents/PAPIS/Panalib 5 | picktool = fzf 6 | 7 | # Papis behavior 8 | 9 | [settings] 10 | default-library = panalib 11 | opentool = rifle 12 | file-browser = ranger 13 | add-edit = True 14 | 15 | 16 | -------------------------------------------------------------------------------- /home/dotfiles/config_qtile.py: -------------------------------------------------------------------------------- 1 | r"""Qtile configuration. 2 | 3 | ___ _ _ _ 4 | / _ \| |_(_) | ___ 5 | | | | | __| | |/ _ \ 6 | | |_| | |_| | | __/ 7 | \__\_\\__|_|_|\___| 8 | 9 | 100% PEP8 compliant. 10 | """ 11 | from __future__ import annotations 12 | 13 | import logging 14 | import os 15 | import re 16 | import socket 17 | import subprocess 18 | from pathlib import Path 19 | from typing import Any 20 | 21 | from libqtile import bar, hook, layout, qtile, widget 22 | from libqtile.config import Click, Drag, DropDown, Group, Key, Match, ScratchPad, Screen 23 | from libqtile.dgroups import simple_key_binder 24 | from libqtile.lazy import lazy 25 | from libqtile.utils import guess_terminal 26 | 27 | # Define helper functions 28 | 29 | 30 | def parse_keys(keys_obj: list[Key]) -> str: 31 | """Format string of defined keybindings.""" 32 | key_help = "" 33 | for k in keys_obj: 34 | mods = "" 35 | for m in k.modifiers: 36 | if m == "mod4": 37 | mods += "Super + " 38 | else: 39 | mods += m.capitalize() + " + " 40 | if len(k.key) > 1: 41 | mods += k.key.capitalize() 42 | else: 43 | mods += k.key 44 | key_help += f"{mods:<50}{k.desc}\n" 45 | return key_help 46 | 47 | 48 | # Define global variables 49 | 50 | mod: str = "mod4" 51 | terminal: str = guess_terminal() 52 | dgroups_key_binder = simple_key_binder("mod4") 53 | xrancmd: str = f"{Path.home()}/.config/scripts/randr_conf.sh" 54 | prompt: str = f'{os.environ["USER"]}@{socket.gethostname()}: ' 55 | rofifm: str = "rofi -show filebrowser" 56 | rofiw: str = "rofi -show window -show-icons" 57 | cbqn: str = ( 58 | """alacritty -o 'font.normal.family="BQN386 Unicode"' -o 'font.size=60' 59 | -e zsh -c 'figlet "BQN" | lolcat 2>/dev/null && cbqn --version && bqn'""" 60 | ) 61 | 62 | # Useful colors 63 | # https://www.schemecolor.com/python-logo-colors.php 64 | 65 | cl_pal: dict[str, list[str]] = { 66 | "cazure": ["#4b8bbe", "#4b8bbe"], 67 | "sunglow": ["#ffe873", "#ffe873"], 68 | "amag": ["#c678dd", "#c678dd"], 69 | "deepr": ["#8B0000"], 70 | } 71 | 72 | # Define keybindings 73 | 74 | keys: list[Key] = [ 75 | # Applications 76 | Key([mod], "Return", lazy.spawn(terminal), 77 | desc="Launches detected terminal"), 78 | Key([mod, "shift"], "Return", lazy.spawn("alacritty -e fish"), 79 | desc="Launches a fish session"), 80 | Key([mod, "control"], "Return", lazy.spawn("alacritty -e xonsh"), 81 | desc="Launches a xonsh session"), 82 | Key([mod], "r", lazy.spawn("rofi -show drun -show-icons"), 83 | desc="Toggles the Rofi launcher"), 84 | Key([mod], "Tab", lazy.spawn(rofiw), 85 | desc="Toggles the Rofi window switcher"), 86 | Key([mod], "b", lazy.spawn(["sh", "-c", rofifm]), 87 | desc="Launches the Rofi file browser"), 88 | Key([mod], "p", lazy.spawn("rofi-pass"), 89 | desc="Launches GNU Pass."), 90 | Key([mod, "shift"], "r", lazy.spawncmd(), 91 | desc="Spawn a command using a prompt widget"), 92 | Key([mod], "w", lazy.spawn("firefox"), 93 | desc="Launches the Firefox web browser"), 94 | Key([mod], "e", lazy.spawn("emacsclient -c"), 95 | desc="Launches an emacsclient frame"), 96 | Key([mod], "v", lazy.spawn("code"), 97 | desc="Launches VS Code"), 98 | Key([mod, "shift"], "f", lazy.spawn("thunar"), 99 | desc="Launches the Thunar file browser"), 100 | Key([mod], "f", lazy.spawn("alacritty -e ranger"), 101 | desc="Launches the Ranger file browser"), 102 | Key([], "Print", lazy.spawn("flameshot gui"), 103 | desc="Takes a screenshot"), 104 | 105 | # Language 106 | Key([mod], "i", lazy.widget["keyboardlayout"].next_keyboard(), 107 | desc="Cycle through keyboard layouts"), 108 | 109 | # Dropdown terminal 110 | Key([], "F12", lazy.group["scratchpad"].dropdown_toggle("term"), 111 | desc="Toggles scratchpad terminal"), 112 | Key([mod], "c", lazy.group["scratchpad"].dropdown_toggle("calculator"), 113 | desc="Toggles the numbat calculator"), 114 | Key([mod], "a", lazy.group["scratchpad"].dropdown_toggle("bqn"), 115 | desc="Toggles the CBQN repl"), 116 | 117 | # Media Keys 118 | Key([], "XF86AudioLowerVolume", lazy.spawn("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"), 119 | desc="Lowers volume"), 120 | Key([], "XF86AudioRaiseVolume", lazy.spawn("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"), 121 | desc="Raises volume"), 122 | Key([], "XF86AudioMute", lazy.spawn("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"), 123 | desc="Toggles sound"), 124 | Key([], "XF86MonBrightnessDown", lazy.spawn("brightnessctl -q s 5%-"), 125 | desc="Decreases brightness"), 126 | Key([], "XF86MonBrightnessUp", lazy.spawn("brightnessctl -q s +5%"), 127 | desc="Increases brightness"), 128 | 129 | # Display Manager 130 | Key([mod], "o", lazy.spawn("dm-tool lock"), 131 | desc="Locks the screen"), 132 | Key([mod], "m", lazy.spawn(xrancmd), 133 | desc="Ensures external monitor usage"), 134 | 135 | # Session control 136 | Key([mod, "shift"], "x", lazy.spawn("shutdown now"), 137 | desc="Shutdown the box"), 138 | Key([mod, "shift"], "BackSpace", lazy.spawn("reboot"), 139 | desc="Reboot the box"), 140 | Key([mod, "control"], "r", lazy.restart(), desc="Restart Qtile"), 141 | Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"), 142 | 143 | # Groups control 144 | Key([mod], "Right", lazy.screen.prev_group(), 145 | desc="Move to the group on the right"), 146 | Key([mod], "Left", lazy.screen.next_group(), 147 | desc="Move to the group on the left"), 148 | 149 | # Window and layout control 150 | Key([mod], "q", lazy.window.kill(), desc="Kill focused window"), 151 | Key([mod], "u", 152 | lazy.window.toggle_fullscreen(), 153 | desc="Toggles fullscreen when window is not floating"), 154 | Key([mod], "t", lazy.window.toggle_floating(), 155 | desc="Toggle floating"), 156 | 157 | Key([mod], "h", lazy.layout.left(), desc="Move focus to left"), 158 | Key([mod], "l", lazy.layout.right(), desc="Move focus to right"), 159 | Key([mod], "j", lazy.layout.down(), desc="Move focus down"), 160 | Key([mod], "k", lazy.layout.up(), desc="Move focus up"), 161 | Key([mod, "shift"], "Tab", lazy.layout.next(), 162 | desc="Move window focus to the next window"), 163 | Key([mod, "shift"], "h", lazy.layout.shuffle_left(), 164 | desc="Move window to the left"), 165 | Key([mod, "shift"], "l", lazy.layout.shuffle_right(), 166 | desc="Move window to the right"), 167 | Key([mod, "shift"], "j", lazy.layout.shuffle_down(), 168 | desc="Move window down"), 169 | Key([mod, "shift"], "k", lazy.layout.shuffle_up(), 170 | desc="Move window up"), 171 | Key([mod, "control"], "h", lazy.layout.grow_left(), 172 | desc="Grow window to the left"), 173 | Key([mod, "control"], "l", lazy.layout.grow_right(), 174 | desc="Grow window to the right"), 175 | Key([mod, "control"], "j", lazy.layout.grow_down(), 176 | desc="Grow window down"), 177 | Key([mod, "control"], "k", lazy.layout.grow_up(), desc="Grow window up"), 178 | Key([mod, "control"], "s", lazy.layout.toggle_split(), 179 | desc="Toggle between split and unsplit sides of stack"), 180 | Key([mod, "shift", "control"], "h", lazy.layout.swap_column_left(), 181 | desc="Swaps the current window stack to the left"), 182 | Key([mod, "shift", "control"], "l", lazy.layout.swap_column_right(), 183 | desc="Swaps the current window stack to the right"), 184 | Key([mod], "n", lazy.layout.normalize(), desc="Reset all window sizes"), 185 | Key([mod], "space", lazy.next_layout(), desc="Toggle between layouts"), 186 | ] 187 | 188 | # Get help 189 | 190 | SUFIX_CMDH: str = 'rofi -dmenu -i -mesg "Keyboard shortcuts"' 191 | cmdh: str = f'echo "{parse_keys(keys)}" | {SUFIX_CMDH}' 192 | keys.extend([Key([mod], "F1", 193 | lazy.spawn(cmdh, shell=True), 194 | desc="Display defined keybindings")]) 195 | 196 | # Define groups (workspaces) 197 | 198 | groups: list[Group | ScratchPad] = [ 199 | ScratchPad("scratchpad", [ 200 | DropDown("term", "alacritty -e fish", 201 | x=0.0, 202 | y=0.0, 203 | width=1.0, 204 | height=1.0, 205 | opacity=0.9, 206 | on_focus_lost_hide=True), 207 | DropDown("calculator", "alacritty -e numbat", 208 | opacity=0.95, 209 | on_focus_lost_hide=False), 210 | DropDown("bqn", cbqn, 211 | x=0.0, 212 | y=0.0, 213 | width=1.0, 214 | height=1.0, 215 | opacity=0.95, 216 | on_focus_lost_hide=False)]), 217 | Group("dev", layout="max", 218 | matches=[Match( 219 | wm_class=re.compile(r"^(Code|Emacs)$")), 220 | ]), 221 | Group("tty", layout="monadtall"), 222 | Group("doc", layout="monadtall"), 223 | Group("www", layout="monadtall", 224 | matches=[Match( 225 | wm_class=re.compile(r"^(firefox|Brave\-browser|Nyxt)$")), 226 | ]), 227 | Group("msg", layout="monadtall", 228 | matches=[Match( 229 | wm_class=re.compile(r"^(Mattermost|Slack|TelegramDesktop)$"), 230 | )]), 231 | Group("com", layout="monadtall", 232 | matches=[Match( 233 | wm_class=re.compile(r"^(Skype|zoom)$"), 234 | )]), 235 | Group("rnd", layout="monadtall", 236 | matches=[Match( 237 | wm_class=re.compile(r"^(retroarch)$")), 238 | ]), 239 | Group("art", layout="floating"), 240 | ] 241 | 242 | # Layouts 243 | 244 | layout_theme: dict[str, str | int] = { 245 | "border_width": 1, 246 | "border_focus": "#8f3d3d", 247 | "border_normal": "#267CB9", 248 | } 249 | 250 | layouts: list[Any] = [ 251 | # No need for more than this 252 | layout.Max(**layout_theme), 253 | layout.MonadTall(**layout_theme, 254 | single_border_width=0, 255 | single_margin=0, 256 | margin=6, 257 | new_client_position="bottom"), 258 | layout.Columns(**layout_theme, 259 | margin=4, 260 | margin_on_single=0), 261 | layout.Floating(**layout_theme), 262 | ] 263 | 264 | # Widgets configuration 265 | 266 | widget_defaults: dict[str, str | int] = { 267 | "font": "Fira Code", 268 | "fontsize": 14, 269 | "padding": 3, 270 | } 271 | 272 | extension_defaults: dict[str, str | int] = widget_defaults.copy() 273 | 274 | # Screens configuration 275 | 276 | WIDGETS: list[Any] = [ 277 | widget.Image( 278 | filename="~/.config/qtile/python_icon.png", 279 | scale="True", 280 | mouse_callbacks={ 281 | "Button1": 282 | lambda: qtile.spawn("alacritty -e xonsh")}, 283 | ), 284 | widget.Spacer(length=5), 285 | widget.Sep( 286 | linewidth=3, 287 | padding=10, 288 | foreground=cl_pal["deepr"], 289 | ), 290 | widget.GroupBox( 291 | fontsize=15, 292 | margin_y=3, 293 | margin_x=0, 294 | padding_y=5, 295 | padding_x=3, 296 | active=cl_pal["cazure"], 297 | inactive=cl_pal["sunglow"], 298 | highlight_method="block", 299 | block_highlight_text_color=cl_pal["amag"], 300 | borderwidth=3, 301 | rounded=True, 302 | ), 303 | widget.Sep( 304 | linewidth=3, 305 | padding=10, 306 | foreground=cl_pal["deepr"], 307 | ), 308 | widget.Prompt(), 309 | widget.WindowName(max_chars=50, 310 | foreground=cl_pal["cazure"]), 311 | widget.CurrentLayoutIcon(scale=0.8), 312 | widget.Sep( 313 | linewidth=3, 314 | padding=10, 315 | foreground=cl_pal["deepr"], 316 | ), 317 | widget.PulseVolume( 318 | fmt="Vol: {}", 319 | padding=5, 320 | ), 321 | widget.Sep( 322 | linewidth=3, 323 | padding=10, 324 | foreground=cl_pal["deepr"], 325 | ), 326 | widget.CPU( 327 | format="CPU {load_percent}%", 328 | mouse_callbacks={ 329 | "Button1": 330 | lambda: qtile.spawn("alacritty -e htop"), 331 | }, 332 | ), 333 | widget.Sep( 334 | linewidth=3, 335 | padding=10, 336 | foreground=cl_pal["deepr"], 337 | ), 338 | widget.Battery( 339 | format="Bat{char}: {percent:2.0%}", 340 | charge_char="▲", 341 | discharge_char="▼", 342 | empty_char="∅", 343 | unknown_char="◆", 344 | foreground=cl_pal["sunglow"], 345 | low_foreground="FF0000", 346 | notify_below=0.1, 347 | low_percentage=0.2), 348 | widget.Sep( 349 | linewidth=3, 350 | padding=10, 351 | foreground=cl_pal["deepr"], 352 | ), 353 | widget.Systray(), 354 | widget.Sep( 355 | linewidth=3, 356 | padding=10, 357 | foreground=cl_pal["deepr"], 358 | ), 359 | widget.Clock(format="%d.%m %a %I:%M %p", 360 | mouse_callbacks={ 361 | "Button1": 362 | lambda: qtile.spawn( 363 | "gnome-calendar"), 364 | }), 365 | widget.Sep( 366 | linewidth=3, 367 | padding=10, 368 | foreground=cl_pal["deepr"], 369 | ), 370 | widget.KeyboardLayout( 371 | configured_keyboards=["us"], 372 | foreground=cl_pal["sunglow"]), 373 | ] 374 | 375 | screens: list[Screen] = [ 376 | Screen( 377 | top=bar.Bar( 378 | WIDGETS, 379 | 28, 380 | ), 381 | wallpaper=f"{Path.home()}/.config/qtile/PiN_EFOehme.jpg", 382 | wallpaper_mode="fill", 383 | ), 384 | Screen( 385 | wallpaper=f"{Path.home()}/.config/qtile/PiN_EFOehme.jpg", 386 | wallpaper_mode="fill", 387 | ), 388 | ] 389 | 390 | # Floating window control 391 | 392 | mouse: list[Drag | Click] = [ 393 | Drag([mod], "Button1", lazy.window.set_position_floating(), 394 | start=lazy.window.get_position()), 395 | Drag([mod], "Button3", lazy.window.set_size_floating(), 396 | start=lazy.window.get_size()), 397 | Click([mod], "Button2", lazy.window.bring_to_front()), 398 | ] 399 | 400 | # Internal Qtile options 401 | 402 | dgroups_app_rules: list[Any] = [] 403 | follow_mouse_focus: bool = True 404 | bring_front_click: bool = True 405 | cursor_warp: bool = True 406 | 407 | floating_layout = layout.Floating(float_rules=[ 408 | *layout.Floating.default_float_rules, 409 | Match(wm_class="ssh-askpass"), # ssh-askpass 410 | Match(title="pinentry"), # GPG key password entry 411 | Match(wm_class="Gnome-screenshot"), # A screenshot utility 412 | Match(wm_class="mpv"), # A powerful media player 413 | Match(wm_class="matplotlib"), # It is all about plotting 414 | Match(wm_class="Thunar"), # Better float than sorry 415 | Match(wm_class="File-roller"), # Better float than sorry 416 | ]) 417 | 418 | auto_fullscreen: bool = True 419 | focus_on_window_activation: str = "smart" 420 | reconfigure_screens: bool = True 421 | auto_minimize: bool = True 422 | 423 | # Screen event hook 424 | 425 | 426 | @hook.subscribe.screen_change 427 | def screen_event(_: str) -> None: 428 | """Reload xrandr configuration in case of screen changes. 429 | 430 | This hook ensures that only one monitor will be used at the time, 431 | defaulting to external. 432 | """ 433 | script_path = Path.home() / ".config/scripts/randr_conf.sh" 434 | try: 435 | result = subprocess.run( 436 | [script_path], capture_output=True, text=True, check=True) 437 | logging.info("Successfully executed xrandr hook: %s", {result.stdout}) 438 | except subprocess.CalledProcessError: 439 | logging.exception("Failed to execute xrandr hook") 440 | 441 | 442 | # Dirty Java hack 443 | 444 | 445 | wmname: str = "LG3D" 446 | -------------------------------------------------------------------------------- /home/dotfiles/env.nu: -------------------------------------------------------------------------------- 1 | # Panadestein's Nushell Env 2 | 3 | # My prompt 4 | def create_left_prompt [] { 5 | # Colors of the integral 6 | let braket_color = (if (is-admin) { ansi red_bold } else { ansi light_green_bold }) 7 | let path_color = (if (is-admin) { ansi red_bold } else { ansi green_bold }) 8 | let separator_color = (if (is-admin) { ansi light_red_bold } else { ansi light_green_bold }) 9 | # Vectors 10 | let bra = $"($braket_color)⟨" 11 | let nushell = "ν" 12 | let hamiltonian = " | " 13 | let dir = ($env.PWD | path basename) 14 | let ket = $"($braket_color)⟩" 15 | let path_segment = $"($bra)($path_color)($nushell)(ansi white_bold)($hamiltonian)($path_color)($dir)($ket)" 16 | $path_segment 17 | } 18 | 19 | # Use nushell functions to define your right and left prompt 20 | $env.PROMPT_COMMAND = {|| create_left_prompt } 21 | $env.PROMPT_COMMAND_RIGHT = {|| "" } 22 | 23 | # Set prompt indicator 24 | $env.PROMPT_INDICATOR = {|| " " } 25 | $env.PROMPT_INDICATOR_VI_INSERT = {|| " " } 26 | $env.PROMPT_INDICATOR_VI_NORMAL = {|| " " } 27 | $env.PROMPT_MULTILINE_INDICATOR = {|| "::: " } 28 | 29 | # Specifies how environment variables are 30 | $env.ENV_CONVERSIONS = { 31 | "PATH": { 32 | from_string: { |s| $s | split row (char esep) | path expand --no-symlink } 33 | to_string: { |v| $v | path expand --no-symlink | str join (char esep) } 34 | } 35 | "Path": { 36 | from_string: { |s| $s | split row (char esep) | path expand --no-symlink } 37 | to_string: { |v| $v | path expand --no-symlink | str join (char esep) } 38 | } 39 | } 40 | 41 | # Directories to search for scripts when calling source or use 42 | $env.NU_LIB_DIRS = [ 43 | ($nu.default-config-dir | path join 'scripts') 44 | ] 45 | 46 | # Directories to search for plugin binaries when calling register 47 | $env.NU_PLUGIN_DIRS = [ 48 | ($nu.default-config-dir | path join 'plugins') 49 | ] -------------------------------------------------------------------------------- /home/dotfiles/happiness.trans: -------------------------------------------------------------------------------- 1 | {:translate-shell "0.9.0" 2 | 3 | :sgr-original ["light blue" "bold"] 4 | :sgr-original-phonetics ["light blue" "bold"] 5 | :sgr-translation ["light cyan" "bold"] 6 | :sgr-translation-phonetics ["light cyan" "bold"] 7 | :sgr-brief-translation ["light cyan" "bold"] 8 | :sgr-brief-translation-phonetics ["light cyan" "bold"] 9 | 10 | :sgr-original-dictionary-detailed-word-class "light blue" 11 | :sgr-original-dictionary-detailed-explanation ["light cyan" "bold"] 12 | :sgr-original-dictionary-detailed-example ["light blue" "bold"] 13 | :sgr-original-dictionary-detailed-synonyms "light blue" 14 | :sgr-original-dictionary-detailed-synonyms-item ["light blue" "bold"] 15 | :sgr-original-dictionary-synonyms "light blue" 16 | :sgr-original-dictionary-synonyms-word-class "light blue" 17 | :sgr-original-dictionary-synonyms-synonyms "light blue" 18 | :sgr-original-dictionary-synonyms-synonyms-item ["light cyan" "bold"] 19 | :sgr-original-dictionary-examples "light blue" 20 | :sgr-original-dictionary-examples-example ["light blue" "bold"] 21 | :sgr-original-dictionary-examples-original ["light cyan" "bold" "negative"] 22 | :sgr-original-dictionary-see-also "light blue" 23 | :sgr-original-dictionary-see-also-phrases "light blue" 24 | :sgr-original-dictionary-see-also-phrases-item ["light cyan" "bold" "underline"] 25 | 26 | :sgr-dictionary-word-class "light blue" 27 | :sgr-dictionary-word ["light cyan" "bold"] 28 | :sgr-dictionary-explanation "light blue" 29 | :sgr-dictionary-explanation-item ["light blue" "bold"] 30 | 31 | :sgr-alternatives-original ["light blue" "bold"] 32 | :sgr-alternatives-translations "light blue" 33 | :sgr-alternatives-translations-item ["light cyan" "bold"] 34 | 35 | :sgr-prompt-message "light blue" 36 | :sgr-prompt-message-original ["light blue" "bold"] 37 | :sgr-languages "light blue" 38 | :sgr-languages-sl ["light blue" "bold"] 39 | :sgr-languages-tl ["light cyan" "bold"] 40 | :fmt-languages "[ %s → %t ]" 41 | 42 | :chr-source-seperator "═" 43 | :sgr-source-seperator "light blue" 44 | :chr-target-seperator "─" 45 | :sgr-target-seperator "light blue" 46 | 47 | :fmt-welcome-message "Translate Shell" 48 | :sgr-welcome-message ["light blue" "bold"] 49 | :fmt-welcome-submessage "(:q to quit)" 50 | :sgr-welcome-submessage "light blue" 51 | :fmt-prompt "%s> " 52 | :sgr-prompt ["light blue" "bold"] 53 | } 54 | -------------------------------------------------------------------------------- /home/dotfiles/helpers_xfce.rc: -------------------------------------------------------------------------------- 1 | TerminalEmulator=alacritty 2 | TerminalEmulatorDismissed=true -------------------------------------------------------------------------------- /home/dotfiles/images/PiN_EFOehme.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Panadestein/nixos-config/39287ab275d7ed141bff947df2e83b9c83668209/home/dotfiles/images/PiN_EFOehme.jpg -------------------------------------------------------------------------------- /home/dotfiles/images/cc_tram.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Panadestein/nixos-config/39287ab275d7ed141bff947df2e83b9c83668209/home/dotfiles/images/cc_tram.jpg -------------------------------------------------------------------------------- /home/dotfiles/images/cfd_DWudN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Panadestein/nixos-config/39287ab275d7ed141bff947df2e83b9c83668209/home/dotfiles/images/cfd_DWudN.png -------------------------------------------------------------------------------- /home/dotfiles/images/haskell_20.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * haskell_20_xpm[] = { 3 | "20 20 2 1", 4 | " c None", 5 | ". c #FFFFFF", 6 | " ", 7 | " ", 8 | " ", 9 | ".... .... ", 10 | " .... ... ", 11 | " ... .... ", 12 | " .... .... ", 13 | " .... ... ........", 14 | " ... .... .......", 15 | " .... .... ", 16 | " .... .... ", 17 | " ... ...... .....", 18 | " .... ....... ....", 19 | " .... .... ... ", 20 | " ... .... .... ", 21 | " .... ... .... ", 22 | ".... .... ... ", 23 | " ", 24 | " ", 25 | " "}; 26 | -------------------------------------------------------------------------------- /home/dotfiles/images/my_shells.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Panadestein/nixos-config/39287ab275d7ed141bff947df2e83b9c83668209/home/dotfiles/images/my_shells.png -------------------------------------------------------------------------------- /home/dotfiles/images/python_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Panadestein/nixos-config/39287ab275d7ed141bff947df2e83b9c83668209/home/dotfiles/images/python_icon.png -------------------------------------------------------------------------------- /home/dotfiles/images/some_apps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Panadestein/nixos-config/39287ab275d7ed141bff947df2e83b9c83668209/home/dotfiles/images/some_apps.png -------------------------------------------------------------------------------- /home/dotfiles/images/tc_feyn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Panadestein/nixos-config/39287ab275d7ed141bff947df2e83b9c83668209/home/dotfiles/images/tc_feyn.png -------------------------------------------------------------------------------- /home/dotfiles/init.trans: -------------------------------------------------------------------------------- 1 | { 2 | :theme "happiness.trans" 3 | :verbose true 4 | :hl "de" 5 | :tl "en" 6 | } 7 | -------------------------------------------------------------------------------- /home/dotfiles/init.vim: -------------------------------------------------------------------------------- 1 | "---------------------------------- 2 | " _ ___ _____ __ __ 3 | " | \ | \ \ / /_ _| \/ | 4 | " | \| |\ \ / / | || |\/| | 5 | " | |\ | \ V / | || | | | 6 | " |_| \_| \_/ |___|_| |_| 7 | " 8 | " A simple Neovi(m|de) configuration 9 | "----------------------------------- 10 | 11 | "---------------------------------------- 12 | " General settings 13 | "---------------------------------------- 14 | 15 | set nocompatible " Breaks Vim compatibility 16 | set encoding=utf-8 " Set encoding 17 | set showmatch " Matching parenthesis 18 | set ignorecase " Case insensitive 19 | set mouse=v " Middle-click paste with 20 | set hlsearch " Highlight search results 21 | set incsearch " Enable incremental search 22 | set tabstop=4 " Tab width 23 | set softtabstop=4 " Multiple spaces as tabstops 24 | set expandtab " Converts tabs to white space 25 | set shiftwidth=4 " Width for autoindents 26 | set autoindent " Indent a new line as previous 27 | set number " Enable line numbers 28 | set noshowmode " Prevent non-normal modes showing in Powerline 29 | set relativenumber " Relative line numbers 30 | set wrap " Wrap text 31 | set wildmode=longest,list " Bash-like tab completions 32 | filetype plugin indent on " Auto-indenting depending on file type 33 | syntax on " Enable syntax highlighting 34 | set mouse=a " Enable mouse click 35 | set clipboard=unnamedplus " Use system clipboard 36 | set ttyfast " Speed up scrolling in Vim 37 | set spell " Enable spell checking 38 | set backupdir=~/.config/nvim/cache " Directory to store backup files 39 | filetype plugin on " Load plugins for specific filetype 40 | " Remember cursor position 41 | au BufWinLeave,BufLeave,BufWritePost,BufHidden,QuitPre ?* nested silent! mkview! 42 | au BufWinEnter ?* silent! loadview 43 | 44 | "---------------------------------------- 45 | " Neovide specific 46 | "---------------------------------------- 47 | 48 | let g:neovide_refresh_rate=140 49 | let g:neovide_transparency=0.95 50 | let neovide_remember_window_size = v:true 51 | let g:neovide_input_use_logo=v:true 52 | let g:neovide_cursor_animation_length=0.13 53 | 54 | "---------------------------------------- 55 | " Plugin's settings (requires Vimplug) 56 | "---------------------------------------- 57 | 58 | call plug#begin("~/.config/nvim/plugged") 59 | Plug 'ryanoasis/vim-devicons' 60 | Plug 'SirVer/ultisnips' 61 | Plug 'honza/vim-snippets' 62 | Plug 'scrooloose/nerdtree' 63 | Plug 'neovim/nvim-lspconfig' 64 | Plug 'glepnir/lspsaga.nvim' 65 | Plug 'wfxr/minimap.vim' 66 | Plug 'folke/lsp-colors.nvim' 67 | Plug 'hoob3rt/lualine.nvim' 68 | Plug 'vim-scripts/indentpython.vim' 69 | Plug 'nvie/vim-flake8' 70 | Plug 'lisposter/vim-blackboard' 71 | Plug 'lervag/vimtex' 72 | Plug 'rudrab/vimf90' 73 | Plug 'nvim-lua/completion-nvim' 74 | Plug 'zchee/deoplete-jedi' 75 | Plug 'davidhalter/jedi-vim' 76 | Plug 'neomake/neomake' 77 | Plug 'akinsho/toggleterm.nvim' 78 | Plug 'https://git.sr.ht/~detegr/nvim-bqn' 79 | Plug 'mlochbaum/BQN', {'rtp': 'editors/vim'} 80 | call plug#end() 81 | 82 | "---------------------------------------- 83 | " Font configuration 84 | "---------------------------------------- 85 | 86 | set guifont=DejaVu\ Sans\ Mono:h26 87 | 88 | "---------------------------------------- 89 | " Status line 90 | " (Antidank config --> Migration to init.lua unavoidable) 91 | "---------------------------------------- 92 | 93 | lua << EOF 94 | require'lualine'.setup { options = { icons_enabled = true, theme = 'ayu_mirage' } } 95 | EOF 96 | 97 | "---------------------------------------- 98 | " Color schemes 99 | "---------------------------------------- 100 | 101 | if (has("termguicolors")) 102 | set termguicolors 103 | endif 104 | 105 | syntax enable 106 | colorscheme blackboard 107 | set background=dark 108 | set splitright 109 | set splitbelow 110 | 111 | "---------------------------------------- 112 | " Terminal support 113 | "---------------------------------------- 114 | 115 | lua require("toggleterm").setup{} 116 | nnoremap exe v:count1 . "ToggleTerm" 117 | inoremap exe v:count1 . "ToggleTerm" 118 | 119 | "---------------------------------------- 120 | " LSP and autocompletion settings 121 | "---------------------------------------- 122 | 123 | lua << EOF 124 | require'lspconfig'.pyright.setup{on_attach=require'completion'.on_attach} 125 | EOF 126 | 127 | " Snippets and pop-up 128 | let g:completion_enable_snippet = 'UltiSnips' 129 | let g:completion_enable_auto_popup = 1 130 | 131 | " Autocomplete in every buffer 132 | autocmd BufEnter * lua require'completion'.on_attach() 133 | 134 | " Use and to navigate through pop-up menu 135 | inoremap pumvisible() ? "\" : "\" 136 | inoremap pumvisible() ? "\" : "\" 137 | 138 | " Set completeopt to have a better completion experience 139 | set completeopt=menuone,noinsert,noselect 140 | 141 | " Avoid showing message extra message when using completion 142 | set shortmess+=c 143 | 144 | " disable autocompletion, because we use deoplete for completion 145 | let g:jedi#completions_enabled = 0 146 | 147 | " open the go-to function in split, not another buffer 148 | let g:jedi#use_splits_not_buffers = "right" 149 | 150 | "---------------------------------------- 151 | " Neomake 152 | "---------------------------------------- 153 | 154 | nnoremap s :Neomake 155 | nnoremap x :NeomakeClean 156 | 157 | function! LocationNext() 158 | try 159 | lnext 160 | catch 161 | try | lfirst | catch | endtry 162 | endtry 163 | endfunction 164 | 165 | nnoremap e :call LocationNext() 166 | 167 | "---------------------------------------- 168 | " NerdTREE config 169 | "---------------------------------------- 170 | 171 | noremap :NERDTreeToggle 172 | 173 | "---------------------------------------- 174 | " Python stuff (PEP8 compliant) 175 | "---------------------------------------- 176 | 177 | let python_highlight_all=1 178 | let g:neomake_python_enabled_makers = ['pylint'] 179 | nnoremap :exec '!python' shellescape(@%, 1) 180 | au BufNewFile, BufRead *.py 181 | \ set tabstop=4 | 182 | \ set softtabstop=4 | 183 | \ set shiftwidth=4 | 184 | \ set textwidth=79 | 185 | \ set expandtab | 186 | \ set autoindent | 187 | \ set fileformat=unix 188 | au BufRead, BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/ 189 | 190 | "---------------------------------------- 191 | " FORTRAN stuff 192 | "---------------------------------------- 193 | 194 | let fortran_free_source=1 195 | let fortran_have_tabs=1 196 | let fortran_do_enddo=1 197 | let fortran_linter=1 198 | 199 | "---------------------------------------- 200 | " TEX stuff 201 | "---------------------------------------- 202 | 203 | let g:tex_flavor='latex' 204 | let g:vimtex_compiler_latexmk = { 'continuous' : 0 } 205 | let g:vimtex_compiler_latexmk_engines = { '_' : '-pdf'} 206 | -------------------------------------------------------------------------------- /home/dotfiles/ipython_config.py: -------------------------------------------------------------------------------- 1 | """ Ipython configuration file 2 | (eye candy-comfy version) 3 | Place it in .ipython/profile_default/ipython_config.py 4 | """ 5 | 6 | import re 7 | import os 8 | import subprocess 9 | from IPython.terminal.prompts import Prompts 10 | from pygments.token import Token 11 | 12 | # Get the base configuration file 13 | 14 | c = get_config() 15 | 16 | # Import alias defined in your shell (zsh in the example) 17 | 18 | with open(os.path.expanduser('~/.config/zsh/.zshrc')) as bashrc: 19 | aliases = [] 20 | for line in bashrc: 21 | if line.startswith('alias'): 22 | parts = re.match(r"""^alias (\w+)=(['"]?)(.+)\2$""", line.strip()) 23 | if parts: 24 | source, _, target = parts.groups() 25 | aliases.append((source, target)) 26 | 27 | c.AliasManager.user_aliases = aliases 28 | 29 | # Setting up a cool greeting message 30 | 31 | ban = subprocess.run(['figlet', 'Ipython'], 32 | stdout=subprocess.PIPE).stdout.decode('utf-8') 33 | c.InteractiveShell.banner1 = ban 34 | 35 | # Customize the default prompt and color scheme 36 | 37 | c.InteractiveShell.colors = 'Linux' 38 | 39 | 40 | class MyPrompt(Prompts): 41 | def in_prompt_tokens(self, cli=None): 42 | return [ 43 | (Token, ' '), 44 | (Token.PromptNum, str(self.shell.execution_count)), 45 | (Token.Prompt, u'│ '), ] 46 | 47 | def continuation_prompt_tokens(self, cli=None, width=None): 48 | if width is None: 49 | width = self._width() 50 | return [ 51 | (Token.Prompt, (' ' * (width - 2)) + u'│ '), ] 52 | 53 | def out_prompt_tokens(self): 54 | return [ 55 | (Token, ' '), 56 | (Token.OutPromptNum, str(self.shell.execution_count)), 57 | (Token.OutPrompt, '> '), ] 58 | 59 | 60 | c.TerminalInteractiveShell.prompts_class = MyPrompt 61 | 62 | # Add here lines of code to run at IPython startup, think on some more alias (bash-like functions) 63 | # and the %rehashx magic function to get system $PATH (this command can be only used once) 64 | 65 | c.InteractiveShellApp.exec_lines = [""" 66 | %alias isrun ps -A | grep %s 67 | %rehashx 68 | """, 69 | 'import numpy as np', 70 | 'import matplotlib.pyplot as plt', 71 | 'import scipy as sp'] 72 | -------------------------------------------------------------------------------- /home/dotfiles/matplotlibrc: -------------------------------------------------------------------------------- 1 | backend : QtAgg 2 | -------------------------------------------------------------------------------- /home/dotfiles/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.ruff] 2 | target-version = "py311" 3 | [tool.ruff.lint] 4 | select = ["ALL"] -------------------------------------------------------------------------------- /home/dotfiles/randr_conf.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | : ' 4 | A script to setup a multihead ensuring one monitor 5 | at the time, defaulting to external monitors. 6 | The script is unfortunately hardware dependent, 7 | and implements a particular setup I prefer. 8 | ' 9 | 10 | # Labels 11 | 12 | LAP="eDP" 13 | DP0="DisplayPort-0" 14 | DP1="DisplayPort-1" 15 | HDMI="HDMI-A-0" 16 | 17 | # Get number of plugged monitors 18 | 19 | MONS=$(xrandr -q | grep -c " connected") 20 | 21 | # Check connected monitors and apply configuration 22 | 23 | if [ "$MONS" -gt 2 ]; then 24 | xrandr --output "$LAP" --off\ 25 | --output "$HDMI" --off\ 26 | --output "$DP0" --auto 27 | elif [ "$MONS" -eq 2 ]; then 28 | if xrandr | grep "$DP0 connected"; then 29 | xrandr --output "$LAP" --off\ 30 | --output "$DP0" --auto 31 | elif xrandr | grep "$DP1 connected"; then 32 | xrandr --output "$LAP" --off\ 33 | --output "$DP1" --auto 34 | elif xrandr | grep "$HDMI connected"; then 35 | xrandr --output "$LAP" --off\ 36 | --output "$HDMI" --auto 37 | fi 38 | else 39 | xrandr --output "$LAP" --auto\ 40 | --output "$DP0" --off\ 41 | --output "$DP1" --off\ 42 | --output "$HDMI" --off 43 | fi 44 | -------------------------------------------------------------------------------- /home/dotfiles/rc.conf: -------------------------------------------------------------------------------- 1 | # Use Nerdfonts 2 | # git clone https://github.com/alexanderjeurissen/ranger_devicons 3 | # ~/.config/ranger/plugins/ranger_devicons 4 | default_linemode devicons 5 | 6 | # Images preview 7 | set preview_images true 8 | 9 | # In NixOS, we need to modify the scope.sh if we want 10 | # DjVu preview, run `ranger --copy-config=scope` 11 | # and uncomment the pdf and DjVu previews 12 | set preview_script ~/.config/ranger/scope.sh 13 | set preview_images_method ueberzug -------------------------------------------------------------------------------- /home/dotfiles/rofi_browser: -------------------------------------------------------------------------------- 1 | cmd "exo-open" 2 | oc-cmd "evince;icon:evince" 3 | oc-cmd "gimp;icon:gimp" 4 | oc-cmd "eog;icon:eog" 5 | oc-cmd "emacsclient;icon:emacs" -------------------------------------------------------------------------------- /home/dotfiles/set_emacs.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cd "$HOME"/.emacs.d 4 | mkdir -p ./lib ./snippets/irp-mode ./undo 5 | emacs --batch --eval "(require 'org-loaddefs)" --eval '(org-babel-tangle-file "./content/index.org")' 6 | -------------------------------------------------------------------------------- /home/dotfiles/termux.properties: -------------------------------------------------------------------------------- 1 | extra-keys = [['ESC','BACKSLASH',':','{','UP','}','[', ']'],['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','(', ')']] -------------------------------------------------------------------------------- /home/dotfiles/trayer_padding.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | :" 4 | Fixes the width of xmobar to accommodate all trayer icons 5 | https://github.com/jaor/xmobar/issues/239#issuecomment-233206552 6 | " 7 | 8 | # Function to create a transparent XPM icon 9 | 10 | create_xpm_icon () { 11 | timestamp=$(date) 12 | pixels=$(for _ in $(seq "$1"); do printf '.'; done) 13 | 14 | cat << EOF > "$2" 15 | /* XPM * 16 | static char * trayer_pad_xpm[] = { 17 | /* This XPM icon is used for padding in xmobar to */ 18 | /* leave room for trayer-srg. It is dynamically */ 19 | /* updated by by trayer-padding-icon.sh which is run */ 20 | /* by xmobar. */ 21 | /* Created: ${timestamp} */ 22 | /* */ 23 | "$1 1 1 1", 24 | /* Colors (none: transparent) */ 25 | ". c none", 26 | /* Pixels */ 27 | "$pixels" 28 | }; 29 | EOF 30 | } 31 | 32 | # Width of the trayer window 33 | width=$(xprop -name panel | grep 'program specified minimum size' | cut -d ' ' -f 5) 34 | 35 | # Icon file name 36 | iconfile="/tmp/trayer-padding-${width}px.xpm" 37 | 38 | # If the desired icon does not exist create it 39 | if [ ! -f "$iconfile" ]; then 40 | create_xpm_icon "$width" "$iconfile" 41 | fi 42 | 43 | # Output the icon tag for xmobar 44 | echo "" 45 | -------------------------------------------------------------------------------- /home/dotfiles/vimrc: -------------------------------------------------------------------------------- 1 | " Vundle configuration (plugin management) 2 | set nocompatible 3 | filetype off 4 | set rtp+=~/.vim/bundle/Vundle.vim 5 | call vundle#begin() 6 | 7 | Plugin 'VundleVim/Vundle.vim' 8 | Plugin 'vim-scripts/indentpython.vim' 9 | Plugin 'vim-syntastic/syntastic' 10 | Plugin 'nvie/vim-flake8' 11 | Plugin 'scrooloose/nerdtree' 12 | Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'} 13 | Plugin 'morhetz/gruvbox' 14 | Plugin 'lervag/vimtex' 15 | Plugin 'fatih/vim-go' 16 | Plugin 'SirVer/ultisnips' 17 | Plugin 'honza/vim-snippets' 18 | "Bundle 'Valloric/YouCompleteMe' 19 | 20 | call vundle#end() 21 | filetype plugin indent on 22 | 23 | " General appearance and config 24 | syntax on 25 | set number 26 | set relativenumber 27 | set encoding=utf-8 28 | set clipboard=unnamed 29 | set wrap 30 | 31 | " Theming ensuring spell highlight 32 | augroup my_colours 33 | autocmd! 34 | autocmd ColorScheme gruvbox hi SpellBad cterm=reverse 35 | augroup END 36 | colorscheme gruvbox 37 | set background=dark 38 | highlight Normal ctermbg=None 39 | 40 | "Powerline 41 | set laststatus=2 42 | set showtabline=2 43 | set noshowmode 44 | 45 | "Autocompletion configuration 46 | let g:ycm_autoclose_preview_window_after_completion=1 47 | map g :YcmCompleter GoToDefinitionElseDeclaration 48 | 49 | "Python stuff (PEP8) 50 | let python_highlight_all=1 51 | nnoremap :exec '!python' shellescape(@%, 1) 52 | au BufNewFile, BufRead *.py 53 | \ set tabstop=4 | 54 | \ set softtabstop=4 | 55 | \ set shiftwidth=4 | 56 | \ set textwidth=79 | 57 | \ set expandtab | 58 | \ set autoindent | 59 | \ set fileformat=unix 60 | au BufRead, BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/ 61 | 62 | " Julia stuff 63 | nnoremap :exec '!julia' shellescape(@%, 1) 64 | 65 | " FORTRAN stuff 66 | let fortran_free_source=1 67 | let fortran_have_tabs=1 68 | let fortran_more_precise=1 69 | let fortran_do_enddo=1 70 | 71 | " TEX stuff 72 | let g:tex_flavor='latex' 73 | 74 | "Remember cursor position 75 | au BufWinLeave ?* mkview 76 | au BufWinEnter ?* silent loadview 77 | 78 | " Spell-check set to s 79 | map l :setlocal spell! spelllang=en_us 80 | 81 | "NerdTree 82 | map :NERDTreeToggle 83 | 84 | "Snippets 85 | let g:UltiSnipsExpandTrigger="c" 86 | let g:UltiSnipsJumpForwardTrigger="" 87 | let g:UltiSnipsJumpBackwardTrigger="" 88 | -------------------------------------------------------------------------------- /home/dotfiles/xmobarrc: -------------------------------------------------------------------------------- 1 | Config { overrideRedirect = False 2 | , font = "xft:Fira Code-11" 3 | , bgColor = "#2D2A2E" 4 | , fgColor = "#FCFCFA" 5 | , position = TopW L 100 24 6 | , iconRoot = ".xmonad/xpm/" -- default: "." 7 | , commands = [ Run Weather "EGPF" 8 | [ "--template", " °C" 9 | , "-L", "0" 10 | , "-H", "25" 11 | , "--low" , "lightblue" 12 | , "--normal", "#f8f8f2" 13 | , "--high" , "red" 14 | ] 36000 15 | , Run Cpu 16 | [ "-L", "3" 17 | , "-H", "50" 18 | , "--high" , "red" 19 | , "--normal", "green" 20 | ] 10 21 | , Run Alsa "default" "Master" 22 | [ "--template", "Vol: " 23 | , "--suffix" , "True" 24 | , "--" 25 | , "--on", "" 26 | ] 27 | , Run Memory ["--template", "Mem: %"] 10 28 | , Run Date "%a %Y-%m-%d %H:%M" "date" 10 29 | , Run Battery [ "--template" , "Batt: " 30 | , "--Low" , "10" -- units: % 31 | , "--High" , "80" -- units: % 32 | , "--low" , "darkred" 33 | , "--normal" , "darkorange" 34 | , "--high" , "darkgreen" 35 | , "--" -- battery specific options 36 | -- discharging status 37 | , "-o" , "% ()" 38 | -- AC "on" status 39 | , "-O" , "Charging" 40 | -- charged status 41 | , "-i" , "Charged" 42 | ] 50 43 | , Run Com ".xmonad/trayer_padding.sh" [] "trayerpad" 24 44 | , Run UnsafeStdinReader 45 | ] 46 | , sepChar = "%" 47 | , alignSep = "}{" 48 | , template = " %UnsafeStdinReader% }{%battery% | %alsa:default:Master% | %cpu% | %memory% | %EGPF% | %date% %trayerpad%" 49 | } 50 | -------------------------------------------------------------------------------- /home/dotfiles/xmonad.hs: -------------------------------------------------------------------------------- 1 | ----------------------------------------- 2 | -- __ ____ __ _ 3 | -- \ \/ / \/ | ___ _ __ __ _ __| | 4 | -- \ /| |\/| |/ _ \| '_ \ / _` |/ _` | 5 | -- / \| | | | (_) | | | | (_| | (_| | 6 | -- /_/\_\_| |_|\___/|_| |_|\__,_|\__,_| 7 | -- 8 | -- Panadestein's XMonad 9 | ----------------------------------------- 10 | 11 | -- General imports 12 | import XMonad 13 | import XMonad.Util.EZConfig 14 | import XMonad.Util.SpawnOnce 15 | import XMonad.Hooks.EwmhDesktops 16 | import XMonad.Hooks.ManageHelpers 17 | import XMonad.Actions.CycleWS 18 | 19 | -- Data 20 | import Data.Maybe (fromJust) 21 | import qualified Data.Map as M 22 | 23 | -- Layouts 24 | import XMonad.Layout.Spacing 25 | 26 | -- Xmobar related imports 27 | import XMonad.Hooks.DynamicLog 28 | import XMonad.Hooks.StatusBar 29 | import XMonad.Hooks.StatusBar.PP 30 | import XMonad.Util.Loggers 31 | 32 | -- Main function 33 | main :: IO () 34 | main = xmonad 35 | . ewmhFullscreen 36 | . ewmh 37 | =<< statusBar "xmobar" myXmobarPP toggleStrutsKey myConfig 38 | where 39 | toggleStrutsKey :: XConfig Layout -> (KeyMask, KeySym) 40 | toggleStrutsKey XConfig{ modMask = m } = (m, xK_b) 41 | 42 | -- Define layout 43 | myLayout = Tall 1 (3/100) (1/2) 44 | ||| Mirror (Tall 1 (3/100) (1/2)) 45 | ||| Full 46 | 47 | -- Change focused color 48 | myFocusedBorderColor = "#267CB9" 49 | 50 | -- Workspaces 51 | myWorkspaces = ["dev", "tty", "doc", "www", "msg", "art", "rnd"] 52 | myWorkspaceIndices = M.fromList $ zipWith (,) myWorkspaces [1..] -- (,) == \x y -> (x,y) 53 | 54 | clickable ws = ""++ws++"" 55 | where i = fromJust $ M.lookup ws myWorkspaceIndices 56 | 57 | -- Configuration 58 | myConfig = def 59 | { 60 | modMask = mod4Mask -- Rebind Mod to Super key 61 | , layoutHook = spacingRaw True (Border 0 5 5 5) True (Border 5 5 5 5) True 62 | $ myLayout 63 | , startupHook = myStartupHook 64 | , manageHook = myManageHook 65 | , focusedBorderColor = myFocusedBorderColor 66 | , workspaces = myWorkspaces 67 | } 68 | `additionalKeysP` 69 | [ 70 | -- Keybinding for useful programs 71 | ("M-" , spawn "alacritty") 72 | , ("M-S-" , spawn "alacritty -e ipython") 73 | , ("M-w" , spawn "firefox") 74 | , ("M-r" , spawn "rofi -show drun -show-icons") 75 | , ("M-e" , spawn "emacsclient -c") 76 | , ("M-v" , spawn "neovide") 77 | , ("M-S-f" , spawn "nautilus") 78 | , ("M-f" , spawn "alacritty -e ranger") 79 | , ("" , spawn "gnome-screenshot -i") 80 | -- Multiple screens 81 | , ("M-m" , spawn "$HOME/.config/scripts/randr_conf.sh && nitrogen --restore &") 82 | -- Helpful commands 83 | , ("M-S-l" , spawn "dm-tool lock") 84 | , ("M-" , prevWS) 85 | , ("M-" , nextWS) 86 | , ("" , spawn "amixer set Master 5%- unmute") 87 | , ("" , spawn "amixer set Master 5%+ unmute") 88 | , ("" , spawn "brightnessctl -q s 10%-") 89 | , ("" , spawn "brightnessctl -q s +10%") 90 | -- Manage sessions 91 | , ("M-S-x" , spawn "shutdown now") 92 | , ("M-" , spawn "reboot") 93 | , ("M-q" , kill) -- Kills focused window 94 | , ("M-z" , spawn "if type xmonad; then xmonad --recompile && xmonad --restart; else xmessage xmonad not in \\$PATH: \"$PATH\"; fi") -- Refreshes xmonad 95 | ] 96 | 97 | -- Manage hook 98 | myManageHook :: ManageHook 99 | myManageHook = composeAll 100 | [ className =? "Gimp" --> doFloat 101 | , className =? "TelegramDesktop" --> doFloat 102 | , isDialog --> doFloat 103 | , isFullscreen --> doFullFloat 104 | , className =? "firefox" --> doShift ( myWorkspaces !! 3 ) 105 | , className =? "Slack" --> doShift ( myWorkspaces !! 4 ) 106 | , className =? "Mattermost" --> doShift ( myWorkspaces !! 4 ) 107 | , className =? "Skype" --> doShift ( myWorkspaces !! 6 ) 108 | , className =? "zoom" --> doShift ( myWorkspaces !! 6 ) 109 | ] 110 | 111 | -- Startup hook 112 | myStartupHook :: X () 113 | myStartupHook = do 114 | spawn "killall trayer" 115 | spawn ("sleep 2 && trayer --edge top --align right --widthtype request --padding 6 --SetDockType true --SetPartialStrut true --expand true --monitor 1 --transparent true --alpha 0 --tint 0x282c34 --height 22") 116 | spawnOnce "nitrogen --restore &" 117 | spawnOnce "volumeicon" 118 | 119 | -- Xmobar configuration 120 | myXmobarPP :: PP 121 | myXmobarPP = def 122 | { ppSep = magenta " • " 123 | , ppTitleSanitize = xmobarStrip 124 | , ppTitle = blued . shorten 30 125 | , ppCurrent = blue . wrap (blue "[") (blue "]") 126 | , ppHidden = blued . wrap " " "" . clickable 127 | , ppHiddenNoWindows = lowWhite . wrap " " "" . clickable 128 | , ppUrgent = red . wrap (yellow "!") (yellow "!") 129 | } 130 | where 131 | blue, lowWhite, magenta, red, white, yellow :: String -> String 132 | magenta = xmobarColor "#ff79c6" "" 133 | blue = xmobarColor "#bd93f9" "" 134 | blued = xmobarColor "#267CB9" "" 135 | white = xmobarColor "#f8f8f2" "" 136 | yellow = xmobarColor "#f1fa8c" "" 137 | red = xmobarColor "#ff5555" "" 138 | lowWhite = xmobarColor "#bbbbbb" "" 139 | -------------------------------------------------------------------------------- /home/dotfiles/xonshrc: -------------------------------------------------------------------------------- 1 | # Panadestein's xonsh config 2 | 3 | # -------------------------- 4 | # Theme and prompt 5 | # -------------------------- 6 | 7 | $XONSH_COLOR_STYLE = 'default' 8 | $XONSH_STYLE_OVERRIDES['completion-menu'] = 'bg:#333333 #EEEEEE' 9 | $PROMPT = "{BOLD_RED}[{BOLD_BLUE}χ {BOLD_WHITE}⊗ {BOLD_YELLOW}{cwd_base}{BOLD_RED}]{curr_branch: {BOLD_RED}[{BOLD_GREEN}{}{BOLD_RED}]} " 10 | 11 | # -------------------------- 12 | # Aliases 13 | # -------------------------- 14 | 15 | # Emacs 16 | 17 | def esudo(args, stdin=None): 18 | """Emacs with sudo.""" 19 | env = {"SUDO_EDITOR": "emacsclient -t -a emacs"} 20 | $[sudoedit @(args)] 21 | 22 | aliases['E'] = esudo 23 | aliases['e'] = 'emacsclient' 24 | aliases['en'] = 'emacsclient' 25 | aliases['cde'] = 'cd ~/.emacs.d' 26 | 27 | # (Neo)vim 28 | aliases['v'] = 'nvim' 29 | aliases['cfv'] = 'vim ~/.vimrc' 30 | aliases['sv'] = 'sudo nvim' 31 | aliases['cfn'] = 'neovide --maximized ~/.config/nvim/init.vim' 32 | aliases['n'] = 'neovide --maximized' 33 | 34 | # Generic 35 | aliases['c'] = 'code -r' 36 | aliases['r'] = 'ranger' 37 | aliases['t'] = 'trans' 38 | aliases['ka'] = 'killall' 39 | aliases['jnb'] = 'jupyter notebook' 40 | aliases['jour1'] = 'journalctl -p 3 -xb' 41 | aliases['jour2'] = 'journalctl -xb | rg rror' 42 | aliases['meteo'] = 'curl http://wttr.in' 43 | -------------------------------------------------------------------------------- /home/dotfiles/zshextra: -------------------------------------------------------------------------------- 1 | #-------------------------------------------------- 2 | # _________ _ _ 3 | # |__ / ___|| | | | 4 | # / /\___ \| |_| | 5 | # / /_ ___) | _ | 6 | # /____|____/|_| |_| 7 | # 8 | # Additional ZSH configuration 9 | #-------------------------------------------------- 10 | 11 | # Export environmental variables 12 | 13 | export MANPAGER="sh -c 'col -bx | bat -l man -p'" 14 | export MANROFFOPT='-c' 15 | 16 | # My custom theme for ZSH, with a bit of LISP :) 17 | 18 | prompt_nix_shell() { 19 | if [[ -n "$IN_NIX_SHELL" ]]; then 20 | if [[ -n $NIX_SHELL_PACKAGES ]]; then 21 | local package_names="" 22 | local packages=($NIX_SHELL_PACKAGES) 23 | for package in $packages; do 24 | package_names+="${package##*.}" 25 | done 26 | echo -n "%B%{$fg_bold[blue]%}(%{$fg[green]%}$package_names%{$fg_bold[blue]%}%B)%{$reset_color%} " 27 | elif [[ -n $name ]]; then 28 | local stripnam=${name#interactive-} 29 | stripnam=${stripnam%-environment} 30 | stripnam=$(echo "$stripnam" | cut -d "-" -f 1) 31 | echo -n "%B%{$fg_bold[blue]%}(%{$fg[cyan]%}$stripnam%{$fg_bold[blue]%}%B)%{$reset_color%} " 32 | else 33 | echo -n "%B(%{$fg[blue]%}nix-shell%{$reset_color%}%B) " 34 | fi 35 | fi 36 | } 37 | 38 | PROMPT='$(prompt_nix_shell)' 39 | PROMPT+="%B(%B%{$fg[blue]%}ζ%{$reset_color%} %B∀ %{$fg[yellow]%}%1d%{$reset_color%}%B)%{$reset_color%} " 40 | PROMPT+='$(git_prompt_info)' 41 | 42 | ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg[cyan]%}" 43 | ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " 44 | ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%})" 45 | ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" 46 | 47 | # Update style 48 | 49 | zstyle ':omz:update' mode reminder 50 | 51 | # Autocompletion options 52 | 53 | HYPHEN_INSENSITIVE="true" 54 | 55 | # Command auto-correction and eye candy completion 56 | 57 | ENABLE_CORRECTION="true" 58 | COMPLETION_WAITING_DOTS="true" 59 | 60 | # User side configuration 61 | 62 | export MANPATH="/usr/local/man:$MANPATH" 63 | export LANG=en_US.UTF-8 64 | 65 | # Functions 66 | 67 | isrun() { 68 | # Check if program is running 69 | ps -A | grep $1; 70 | } 71 | 72 | tpy() { 73 | # Create Bash, Python and Emacs session with tmux 74 | tmux new-session -d 'emacsclient -c'$1 75 | tmux new-window '' 76 | tmux split-window -h 77 | tmux split-window -v 'ipython' 78 | tmux -2 attach-session -d 79 | } 80 | 81 | ldiff() { 82 | if [ -z "$1" ] || [ -z "$2" ]; then return; fi 83 | f1=$(basename "$1") 84 | f2=$(basename "$2") 85 | cat -n "$1" > "/tmp/$f1" 86 | cat -n "$2" > "/tmp/$f2" 87 | nvim -d "/tmp/$f1" "/tmp/$f2" 88 | rm "/tmp/$f1" "/tmp/$f2" 89 | } 90 | 91 | yta() { 92 | # Play a YouTube video sound with MPV 93 | mpv --ytdl-format=bestaudio ytdl://ytsearch:"$*" 94 | } 95 | 96 | xpcon() { 97 | # Set external displayport monitor 98 | xrandr --output eDP --primary --auto\ 99 | --output DisplayPort-"$1" --left-of eDP --auto 100 | } 101 | 102 | cls() { 103 | # Who doesn't do this? 104 | cd "$1"; ls; 105 | } 106 | 107 | pathll() { 108 | # Print the $PATH environment variable line by line 109 | echo $PATH | tr : '\n' 110 | } 111 | 112 | nixvars() { 113 | # Show nix environment variables 114 | env |grep -i ^nix 115 | } 116 | 117 | recscr() { 118 | # Simple, silent screen record (for laptop's screen) 119 | ffmpeg -video_size 1920x1080 -framerate 25 -f x11grab -i :0.0 Videos/"$1" 120 | } 121 | 122 | pab() { 123 | # Terminal pastebin https://termbin.com/ 124 | cat "$1" | nc termbin.com 9999 125 | } 126 | 127 | emhash() { 128 | # Get the hash of my emacs repo 129 | nix-prefetch-url --unpack https://github.com/Panadestein/emacsd/archive/"$1".tar.gz 130 | } 131 | 132 | # Emacs vterm support 133 | 134 | vterm_printf() { 135 | if [ -n "$TMUX" ] && ([ "${TERM%%-*}" = "tmux" ] || [ "${TERM%%-*}" = "screen" ]); then 136 | # Tell tmux to pass the escape sequences through 137 | printf "\ePtmux;\e\e]%s\007\e\\" "$1" 138 | elif [ "${TERM%%-*}" = "screen" ]; then 139 | # GNU screen (screen, screen-256color, screen-256color-bce) 140 | printf "\eP\e]%s\007\e\\" "$1" 141 | else 142 | printf "\e]%s\e\\" "$1" 143 | fi 144 | } 145 | 146 | vterm_cmd() { 147 | local vterm_elisp 148 | vterm_elisp="" 149 | while [ $# -gt 0 ]; do 150 | vterm_elisp="$vterm_elisp""$(printf '"%s" ' "$(printf "%s" "$1" | sed -e 's|\\|\\\\|g' -e 's|"|\\"|g')")" 151 | shift 152 | done 153 | vterm_printf "51;E$vterm_elisp" 154 | } 155 | 156 | find_file() { 157 | vterm_cmd find-file "$(realpath "${@:-.}")" 158 | } 159 | 160 | poc() { 161 | local query="$*" 162 | papis open 'collections : "'"$query"'"' 163 | } 164 | -------------------------------------------------------------------------------- /home/modules/bash/default.nix: -------------------------------------------------------------------------------- 1 | # Bash config 2 | { config, lib, pkgs, ... }: 3 | { 4 | programs.bash = { 5 | enable = true; 6 | enableCompletion = true; 7 | 8 | bashrcExtra = '' 9 | PS1='\[\e[1;34m\]|\[\e[0m\]\[\e[1;33m\]β\[\e[0m\]\[\e[1;34m\] ⊂\[\e[0m\] \[\e[1;32m\]\W\[\e[0m\]\[\e[1;34m\]|\[\e[0m\] ' 10 | ''; 11 | 12 | shellAliases = { 13 | # General aliases 14 | c = "code -r"; 15 | cow = "fortune | cowsay"; 16 | e = "emacsclient"; 17 | E = "SUDO_EDITOR='emacsclient -t -a emacs' sudoedit"; 18 | en = "emacsclient -c -nw"; 19 | jour1 = "journalctl -p 3 -xb"; 20 | jour2 = "journalctl -xb | grep rror"; 21 | ka = "killall"; 22 | n = "neovide --maximized"; 23 | r = "ranger"; 24 | sb = "source ~/.bashrc"; 25 | sv = "sudo nvim"; 26 | sz = "source ~/.zshrc"; 27 | t = "trans"; 28 | v = "nvim"; 29 | xo = "xonsh"; 30 | # Aliases for configuration files 31 | cde = "cd ~/.emacs.d/"; 32 | cfb = "e ~/.bashrc"; 33 | cfe = "e ~/.emacs.d/init.el"; 34 | cfn = "neovide --maximized ~/.config/nvim/init.vim"; 35 | cfv = "vim ~/.vimrc"; 36 | vb = "nvim ~/.bashrc"; 37 | vz = "nvim ~/.zshrc"; 38 | # Less frequently used aliases 39 | jnb = "jupyter notebook"; 40 | starwars = "telnet towel.blinkenlights.nl"; 41 | wo = ''figlet -t "$(hostname)" | lolcat''; 42 | meteo = "curl http://wttr.in"; 43 | # Aliases for remote machines 44 | ccpgate = "ssh -Y panades@ccpgate.tnw.utwente.nl"; 45 | jul = "ssh -i ~/.ssh/id_ed25519 -Y panadesbarrueta1@juwels-cluster.fz-juelich.de"; 46 | lsts0 = "ssh -Y rbarrueta@141.30.9.190"; 47 | lsts1 = "ssh -Y rbarrueta@141.30.9.191"; 48 | mah = "ssh rpanades@mahti.csc.fi"; 49 | pader = "ssh -t -i ~/.ssh/id_rsa corexl01@sshgate.uni-paderborn.de"; 50 | sakup = "sftp ramon@sakura.univ-lille1.fr"; 51 | sakura = "ssh -Y ramon@sakura.univ-lille1.fr"; 52 | sssara = "ssh -Y panades@doornode.surfsara.nl"; 53 | tau = "ssh -Y rapa157d@taurus.hrsk.tu-dresden.de"; 54 | toul = "ssh panades@lpqsv11.ups-tlse.fr"; 55 | tukup = "sftp rbarrueta@cpch06.chm.tu-dresden.de"; 56 | tume = "ssh -Y rbarrueta@cpch06.chm.tu-dresden.de"; 57 | }; 58 | }; 59 | } 60 | -------------------------------------------------------------------------------- /home/modules/bqn386/default.nix: -------------------------------------------------------------------------------- 1 | { lib, stdenvNoCC, fetchFromGitHub }: 2 | 3 | stdenvNoCC.mkDerivation { 4 | pname = "bqn386_git"; 5 | version = "rolling"; 6 | 7 | src = fetchFromGitHub { 8 | owner = "dzaima"; 9 | repo = "BQN386"; 10 | rev = "4d8b9f668ba76a15ca9cd44d9bfedaf95a4c0d96"; 11 | hash = "sha256-7GW4W08d5sB9EIlPPTol29nWA64pPF+8PvrugrRkXtA="; 12 | }; 13 | 14 | outputs = [ "out" "woff2" ]; 15 | 16 | installPhase = '' 17 | runHook preInstall 18 | 19 | install -Dm444 -t $out/share/fonts/truetype *.ttf 20 | install -Dm444 -t $woff2/share/fonts/woff2 *.woff2 21 | 22 | runHook postInstall 23 | ''; 24 | 25 | meta = { 26 | description = "APL and BQN font extending on APL386"; 27 | homepage = "https://dzaima.github.io/BQN386/"; 28 | license = lib.licenses.unlicense; 29 | platforms = lib.platforms.all; 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /home/modules/cbqn/default.nix: -------------------------------------------------------------------------------- 1 | { config, lib, stdenv, pkg-config, libffi, fetchFromGitHub }: 2 | let 3 | version = "rolling"; 4 | cbqnSrc = fetchFromGitHub { 5 | owner = "dzaima"; 6 | repo = "CBQN"; 7 | rev = "c4685bcc0c808c4f8f5ac7c52f9807531c26ab5b"; 8 | hash = "sha256-h+d0stqx0m8gooKmlBt1u9xYBu0yaDqYaL8+0XwlgWI="; 9 | fetchSubmodules = true; 10 | }; 11 | in stdenv.mkDerivation { 12 | pname = "cbqn"; 13 | version = version; 14 | src = cbqnSrc; 15 | 16 | nativeBuildInputs = [ pkg-config ]; 17 | buildInputs = [ libffi ]; 18 | 19 | # Set the system C compiler 20 | makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; 21 | 22 | # Customize build for maximum performance. 23 | buildFlags = [ 24 | "o3" 25 | "notui=1" 26 | "REPLXX=1" 27 | "f=-march=znver4" 28 | "target_from_cc=1" 29 | ]; 30 | 31 | dontConfigure = true; 32 | 33 | # Set up local copies of required submodules. 34 | preBuild = '' 35 | mkdir -p build/{singeliLocal,bytecodeLocal,replxxLocal} 36 | cp -r build/singeliSubmodule/* build/singeliLocal/ 37 | cp -r build/bytecodeSubmodule/* build/bytecodeLocal/ 38 | cp -r build/replxxSubmodule/* build/replxxLocal/ 39 | ''; 40 | 41 | postPatch = '' 42 | # Remove the SHELL definition from the makefile and fix shebangs. 43 | sed -i '/SHELL =/d' makefile 44 | patchShebangs build/build 45 | ''; 46 | 47 | installPhase = '' 48 | mkdir -p $out/bin 49 | cp BQN $out/bin/ 50 | ln -sf BQN $out/bin/bqn 51 | ln -sf BQN $out/bin/cbqn 52 | ''; 53 | 54 | meta = with lib; { 55 | description = "Optimized CBQN interpreter with REPLXX support for AMD Ryzen"; 56 | homepage = "https://github.com/dzaima/CBQN"; 57 | license = licenses.gpl3Only; 58 | platforms = platforms.linux; 59 | }; 60 | } 61 | -------------------------------------------------------------------------------- /home/modules/dconf/default.nix: -------------------------------------------------------------------------------- 1 | # Generated via dconf2nix: https://github.com/gvolpe/dconf2nix 2 | { lib, ... }: 3 | 4 | with lib.hm.gvariant; 5 | 6 | { 7 | dconf.settings = { 8 | "apps/guake/general" = { 9 | abbreviate-tab-names = false; 10 | compat-delete = "delete-sequence"; 11 | display-n = 0; 12 | display-tab-names = 0; 13 | gtk-theme-name = "Adwaita"; 14 | gtk-use-system-default-theme = true; 15 | hide-tabs-if-one-tab = false; 16 | history-size = 10000; 17 | load-guake-yml = true; 18 | max-tab-name-length = 100; 19 | mouse-display = true; 20 | open-tab-cwd = true; 21 | prompt-on-quit = false; 22 | quick-open-command-line = "emacsclient -c %(file_path)s"; 23 | quick-open-enable = true; 24 | restore-tabs-notify = true; 25 | restore-tabs-startup = true; 26 | save-tabs-when-changed = true; 27 | schema-version = "3.9.0"; 28 | scroll-keystroke = true; 29 | start-at-login = true; 30 | start-fullscreen = true; 31 | use-default-font = false; 32 | use-popup = true; 33 | use-scrollbar = false; 34 | use-trayicon = true; 35 | window-halignment = 0; 36 | window-height = 100; 37 | window-losefocus = false; 38 | window-refocus = false; 39 | window-tabbar = false; 40 | window-width = 100; 41 | }; 42 | 43 | "apps/guake/style/background" = { 44 | transparency = 87; 45 | }; 46 | 47 | "apps/guake/style/font" = { 48 | allow-bold = true; 49 | palette = "#222222222222:#FFFF00000F0F:#8C8CE0E00A0A:#FFFFB9B90000:#00008D8DF8F8:#6C6C4343A5A5:#0000D7D7EBEB:#FFFFFFFFFFFF:#444444444444:#FFFF27273F3F:#ABABE0E05A5A:#FFFFD1D14141:#00009292FFFF:#9A9A5F5FEBEB:#6767FFFFEFEF:#FFFFFFFFFFFF:#FFFFFAFAF3F3:#0D0D0F0F1818"; 50 | palette-name = "Argonaut"; 51 | style = "Fira Code 24"; 52 | }; 53 | 54 | "apps/seahorse/listing" = { 55 | keyrings-selected = [ "gnupg://" ]; 56 | }; 57 | 58 | "apps/seahorse/windows/key-manager" = { 59 | height = 634; 60 | width = 949; 61 | }; 62 | 63 | "ca/desrt/dconf-editor" = { 64 | saved-pathbar-path = "/org/gnome/nautilus/window-state/"; 65 | saved-view = "/org/gnome/"; 66 | window-height = 990; 67 | window-is-maximized = false; 68 | window-width = 941; 69 | }; 70 | 71 | "org/blueman/general" = { 72 | window-properties = [ 1918 1055 1 24 ]; 73 | }; 74 | 75 | "org/blueman/plugins/powermanager" = { 76 | auto-power-on = "@mb true"; 77 | }; 78 | 79 | "org/blueman/plugins/recentconns" = { 80 | recent-connections = "[{'adapter': 'C8:94:02:7D:D3:A2', 'address': '0C:AE:7D:B1:5C:18', 'alias': 'Bose SoundTouch AAA277', 'icon': 'audio-card', 'name': 'Audio and input profiles', 'uuid': '00000000-0000-0000-0000-000000000000', 'time': '1649935474.0410156'}]"; 81 | }; 82 | 83 | "org/gnome/Console" = { 84 | font-scale = 2.2; 85 | last-window-size = mkTuple [ 1130 746 ]; 86 | theme = "auto"; 87 | }; 88 | 89 | "org/gnome/GWeather4" = { 90 | temperature-unit = "centigrade"; 91 | }; 92 | 93 | "org/gnome/Geary" = { 94 | migrated-config = true; 95 | }; 96 | 97 | "org/gnome/Totem" = { 98 | active-plugins = [ "skipto" "screensaver" "variable-rate" "vimeo" "apple-trailers" "rotation" "open-directory" "mpris" "save-file" "recent" "autoload-subtitles" "movie-properties" "screenshot" ]; 99 | subtitle-encoding = "UTF-8"; 100 | }; 101 | 102 | "org/gnome/Weather" = { 103 | locations = "[<(uint32 2, <('Dresden', 'EDDC', true, [(0.89244501836866974, 0.23998277214922031)], [(0.8909905831431052, 0.23998277214922031)])>)>]"; 104 | }; 105 | 106 | "org/gnome/baobab/ui" = { 107 | is-maximized = false; 108 | window-size = mkTuple [ 1830 915 ]; 109 | }; 110 | 111 | "org/gnome/calculator" = { 112 | accuracy = 9; 113 | angle-units = "degrees"; 114 | base = 10; 115 | button-mode = "basic"; 116 | number-format = "automatic"; 117 | show-thousands = false; 118 | show-zeroes = false; 119 | source-currency = ""; 120 | source-units = "degree"; 121 | target-currency = ""; 122 | target-units = "radian"; 123 | word-size = 64; 124 | }; 125 | 126 | "org/gnome/calendar" = { 127 | active-view = "month"; 128 | window-maximized = true; 129 | window-position = mkTuple [ 681 281 ]; 130 | window-size = mkTuple [ 1124 785 ]; 131 | }; 132 | 133 | "org/gnome/clocks" = { 134 | timers = "@aa{sv} []"; 135 | world-clocks = "@aa{sv} []"; 136 | }; 137 | 138 | "org/gnome/clocks/state/window" = { 139 | maximized = false; 140 | panel-id = "world"; 141 | size = mkTuple [ 870 690 ]; 142 | }; 143 | 144 | "org/gnome/control-center" = { 145 | last-panel = "info-overview"; 146 | window-state = mkTuple [ 980 640 ]; 147 | }; 148 | 149 | "org/gnome/desktop/app-folders" = { 150 | folder-children = [ "Utilities" "YaST" ]; 151 | }; 152 | 153 | "org/gnome/desktop/app-folders/folders/Pardus" = { 154 | categories = [ "X-Pardus-Apps" ]; 155 | name = "X-Pardus-Apps.directory"; 156 | translate = true; 157 | }; 158 | 159 | "org/gnome/desktop/app-folders/folders/Utilities" = { 160 | apps = [ "gnome-abrt.desktop" "gnome-system-log.desktop" "nm-connection-editor.desktop" "org.gnome.baobab.desktop" "org.gnome.Connections.desktop" "org.gnome.DejaDup.desktop" "org.gnome.Dictionary.desktop" "org.gnome.DiskUtility.desktop" "org.gnome.Evince.desktop" "org.gnome.FileRoller.desktop" "org.gnome.fonts.desktop" "org.gnome.Loupe.desktop" "org.gnome.seahorse.Application.desktop" "org.gnome.tweaks.desktop" "org.gnome.Usage.desktop" "vinagre.desktop" ]; 161 | categories = [ "X-GNOME-Utilities" ]; 162 | name = "X-GNOME-Utilities.directory"; 163 | translate = true; 164 | }; 165 | 166 | "org/gnome/desktop/app-folders/folders/YaST" = { 167 | categories = [ "X-SuSE-YaST" ]; 168 | name = "suse-yast.directory"; 169 | translate = true; 170 | }; 171 | 172 | "org/gnome/desktop/background" = { 173 | color-shading-type = "solid"; 174 | picture-options = "zoom"; 175 | picture-uri = "file:///home/loren/.local/share/backgrounds/2022-04-15-00-12-26-tc-feynman.png"; 176 | picture-uri-dark = "file:///home/loren/.local/share/backgrounds/2022-04-15-00-12-26-tc-feynman.png"; 177 | primary-color = "#000000000000"; 178 | secondary-color = "#000000000000"; 179 | }; 180 | 181 | "org/gnome/desktop/calendar" = { 182 | show-weekdate = false; 183 | }; 184 | 185 | "org/gnome/desktop/input-sources" = { 186 | sources = [ (mkTuple [ "xkb" "us" ]) (mkTuple [ "xkb" "de" ]) ]; 187 | xkb-options = [ "terminate:ctrl_alt_bksp" "lv3:menu_switch" "compose:ralt" ]; 188 | }; 189 | 190 | "org/gnome/desktop/interface" = { 191 | color-scheme = "prefer-dark"; 192 | cursor-size = 25; 193 | cursor-theme = "Adwaita"; 194 | font-antialiasing = "grayscale"; 195 | font-hinting = "slight"; 196 | gtk-theme = "Arc-Dark"; 197 | icon-theme = "Adwaita"; 198 | }; 199 | 200 | "org/gnome/desktop/notifications" = { 201 | application-children = [ "emacsclient" "firefox" "gnome-power-panel" "mattermost" "org-gnome-nautilus" "org-gnome-evince" "telegramdesktop" "zoom" "org-telegram-desktop" "org-gnome-settings" ]; 202 | }; 203 | 204 | "org/gnome/desktop/notifications/application/alacritty" = { 205 | application-id = "Alacritty.desktop"; 206 | }; 207 | 208 | "org/gnome/desktop/notifications/application/avogadro2" = { 209 | application-id = "avogadro2.desktop"; 210 | }; 211 | 212 | "org/gnome/desktop/notifications/application/brave-browser" = { 213 | application-id = "brave-browser.desktop"; 214 | }; 215 | 216 | "org/gnome/desktop/notifications/application/code" = { 217 | application-id = "code.desktop"; 218 | }; 219 | 220 | "org/gnome/desktop/notifications/application/emacsclient" = { 221 | application-id = "emacsclient.desktop"; 222 | }; 223 | 224 | "org/gnome/desktop/notifications/application/firefox" = { 225 | application-id = "firefox.desktop"; 226 | }; 227 | 228 | "org/gnome/desktop/notifications/application/gimp" = { 229 | application-id = "gimp.desktop"; 230 | }; 231 | 232 | "org/gnome/desktop/notifications/application/gnome-network-panel" = { 233 | application-id = "gnome-network-panel.desktop"; 234 | }; 235 | 236 | "org/gnome/desktop/notifications/application/gnome-power-panel" = { 237 | application-id = "gnome-power-panel.desktop"; 238 | }; 239 | 240 | "org/gnome/desktop/notifications/application/guake" = { 241 | application-id = "guake.desktop"; 242 | }; 243 | 244 | "org/gnome/desktop/notifications/application/mattermost" = { 245 | application-id = "Mattermost.desktop"; 246 | }; 247 | 248 | "org/gnome/desktop/notifications/application/neovide" = { 249 | application-id = "neovide.desktop"; 250 | }; 251 | 252 | "org/gnome/desktop/notifications/application/org-gnome-baobab" = { 253 | application-id = "org.gnome.baobab.desktop"; 254 | }; 255 | 256 | "org/gnome/desktop/notifications/application/org-gnome-calculator" = { 257 | application-id = "org.gnome.Calculator.desktop"; 258 | }; 259 | 260 | "org/gnome/desktop/notifications/application/org-gnome-console" = { 261 | application-id = "org.gnome.Console.desktop"; 262 | }; 263 | 264 | "org/gnome/desktop/notifications/application/org-gnome-eog" = { 265 | application-id = "org.gnome.eog.desktop"; 266 | }; 267 | 268 | "org/gnome/desktop/notifications/application/org-gnome-evince" = { 269 | application-id = "org.gnome.Evince.desktop"; 270 | }; 271 | 272 | "org/gnome/desktop/notifications/application/org-gnome-nautilus" = { 273 | application-id = "org.gnome.Nautilus.desktop"; 274 | }; 275 | 276 | "org/gnome/desktop/notifications/application/org-gnome-settings" = { 277 | application-id = "org.gnome.Settings.desktop"; 278 | }; 279 | 280 | "org/gnome/desktop/notifications/application/org-gnome-totem" = { 281 | application-id = "org.gnome.Totem.desktop"; 282 | }; 283 | 284 | "org/gnome/desktop/notifications/application/org-inkscape-inkscape" = { 285 | application-id = "org.inkscape.Inkscape.desktop"; 286 | }; 287 | 288 | "org/gnome/desktop/notifications/application/org-telegram-desktop" = { 289 | application-id = "org.telegram.desktop.desktop"; 290 | }; 291 | 292 | "org/gnome/desktop/notifications/application/skypeforlinux" = { 293 | application-id = "skypeforlinux.desktop"; 294 | }; 295 | 296 | "org/gnome/desktop/notifications/application/slack" = { 297 | application-id = "slack.desktop"; 298 | }; 299 | 300 | "org/gnome/desktop/notifications/application/telegramdesktop" = { 301 | application-id = "telegramdesktop.desktop"; 302 | }; 303 | 304 | "org/gnome/desktop/notifications/application/thunar" = { 305 | application-id = "thunar.desktop"; 306 | }; 307 | 308 | "org/gnome/desktop/notifications/application/writer" = { 309 | application-id = "writer.desktop"; 310 | }; 311 | 312 | "org/gnome/desktop/notifications/application/yelp" = { 313 | application-id = "yelp.desktop"; 314 | }; 315 | 316 | "org/gnome/desktop/notifications/application/zoom" = { 317 | application-id = "Zoom.desktop"; 318 | }; 319 | 320 | "org/gnome/desktop/notifications/application/zotero-6-0-18" = { 321 | application-id = "zotero-6.0.18.desktop"; 322 | }; 323 | 324 | "org/gnome/desktop/notifications/application/zotero" = { 325 | application-id = "zotero.desktop"; 326 | }; 327 | 328 | "org/gnome/desktop/peripherals/keyboard" = { 329 | numlock-state = true; 330 | }; 331 | 332 | "org/gnome/desktop/peripherals/mouse" = { 333 | left-handed = false; 334 | }; 335 | 336 | "org/gnome/desktop/peripherals/tablets/056a:037a" = { 337 | keep-aspect = false; 338 | mapping = "absolute"; 339 | }; 340 | 341 | "org/gnome/desktop/peripherals/touchpad" = { 342 | edge-scrolling-enabled = false; 343 | natural-scroll = true; 344 | send-events = "enabled"; 345 | tap-to-click = true; 346 | two-finger-scrolling-enabled = true; 347 | }; 348 | 349 | "org/gnome/desktop/privacy" = { 350 | old-files-age = mkUint32 30; 351 | recent-files-max-age = -1; 352 | }; 353 | 354 | "org/gnome/desktop/screensaver" = { 355 | color-shading-type = "solid"; 356 | picture-options = "zoom"; 357 | picture-uri = "file:///home/loren/.local/share/backgrounds/2022-04-15-00-12-26-tc-feynman.png"; 358 | primary-color = "#000000000000"; 359 | secondary-color = "#000000000000"; 360 | }; 361 | 362 | "org/gnome/desktop/search-providers" = { 363 | disabled = []; 364 | sort-order = [ "org.gnome.Contacts.desktop" "org.gnome.Documents.desktop" "org.gnome.Nautilus.desktop" ]; 365 | }; 366 | 367 | "org/gnome/desktop/session" = { 368 | idle-delay = mkUint32 300; 369 | }; 370 | 371 | "org/gnome/desktop/sound" = { 372 | event-sounds = true; 373 | theme-name = "__custom"; 374 | }; 375 | 376 | "org/gnome/desktop/wm/keybindings" = { 377 | close = [ "q" ]; 378 | move-to-workspace-1 = [ "1" ]; 379 | move-to-workspace-2 = [ "2" ]; 380 | move-to-workspace-3 = [ "3" ]; 381 | move-to-workspace-4 = [ "4" ]; 382 | panel-run-dialog = [ "r" ]; 383 | switch-to-workspace-1 = [ "1" ]; 384 | switch-to-workspace-2 = [ "2" ]; 385 | switch-to-workspace-3 = [ "3" ]; 386 | switch-to-workspace-4 = [ "4" ]; 387 | }; 388 | 389 | "org/gnome/desktop/wm/preferences" = { 390 | num-workspaces = 3; 391 | }; 392 | 393 | "org/gnome/eog/ui" = { 394 | sidebar = false; 395 | }; 396 | 397 | "org/gnome/eog/view" = { 398 | background-color = "rgb(0,0,0)"; 399 | use-background-color = true; 400 | }; 401 | 402 | "org/gnome/epiphany" = { 403 | ask-for-default = false; 404 | }; 405 | 406 | "org/gnome/epiphany/state" = { 407 | is-maximized = true; 408 | window-position = mkTuple [ (-1) (-1) ]; 409 | window-size = mkTuple [ 1024 768 ]; 410 | }; 411 | 412 | "org/gnome/evince" = { 413 | document-directory = "@ms 'file:///home/loren/Pictures'"; 414 | }; 415 | 416 | "org/gnome/evince/default" = { 417 | continuous = true; 418 | dual-page = false; 419 | dual-page-odd-left = false; 420 | enable-spellchecking = true; 421 | fullscreen = false; 422 | inverted-colors = false; 423 | show-sidebar = true; 424 | sidebar-page = "thumbnails"; 425 | sidebar-size = 132; 426 | sizing-mode = "free"; 427 | window-ratio = mkTuple [ 4.446429 2.085586 ]; 428 | zoom = 0.5787037037037037; 429 | }; 430 | 431 | "org/gnome/evolution-data-server" = { 432 | migrated = true; 433 | network-monitor-gio-name = ""; 434 | }; 435 | 436 | "org/gnome/file-roller/dialogs/extract" = { 437 | recreate-folders = true; 438 | skip-newer = false; 439 | }; 440 | 441 | "org/gnome/file-roller/listing" = { 442 | list-mode = "as-folder"; 443 | name-column-width = 250; 444 | show-path = false; 445 | sort-method = "name"; 446 | sort-type = "ascending"; 447 | }; 448 | 449 | "org/gnome/file-roller/ui" = { 450 | sidebar-width = 200; 451 | window-height = 480; 452 | window-width = 600; 453 | }; 454 | 455 | "org/gnome/gnome-screenshot" = { 456 | delay = 0; 457 | include-pointer = false; 458 | last-save-directory = "file:///home/loren/Documents/Arbeit/GERMANY/PRES/AIMS_GW_MEETING/OCT22/figures"; 459 | }; 460 | 461 | "org/gnome/gnome-system-monitor" = { 462 | current-tab = "resources"; 463 | maximized = false; 464 | network-total-in-bits = false; 465 | show-dependencies = false; 466 | show-whose-processes = "user"; 467 | window-state = mkTuple [ 700 500 ]; 468 | }; 469 | 470 | "org/gnome/gnome-system-monitor/disktreenew" = { 471 | col-6-visible = true; 472 | col-6-width = 0; 473 | }; 474 | 475 | "org/gnome/maps" = { 476 | last-viewed-location = [ 49.937577 6.669774 ]; 477 | map-type = "MapsStreetSource"; 478 | transportation-type = "pedestrian"; 479 | window-maximized = true; 480 | window-size = [ 1440 786 ]; 481 | zoom-level = 8; 482 | }; 483 | 484 | "org/gnome/mutter" = { 485 | attach-modal-dialogs = true; 486 | dynamic-workspaces = true; 487 | edge-tiling = true; 488 | focus-change-on-pointer-rest = true; 489 | workspaces-only-on-primary = true; 490 | }; 491 | 492 | "org/gnome/nautilus/compression" = { 493 | default-compression-format = "tar.xz"; 494 | }; 495 | 496 | "org/gnome/nautilus/icon-view" = { 497 | default-zoom-level = "medium"; 498 | }; 499 | 500 | "org/gnome/nautilus/preferences" = { 501 | default-folder-viewer = "icon-view"; 502 | migrated-gtk-settings = true; 503 | search-filter-time-type = "last_modified"; 504 | search-view = "list-view"; 505 | }; 506 | 507 | "org/gnome/nautilus/window-state" = { 508 | initial-size = mkTuple [ 997 677 ]; 509 | maximized = false; 510 | }; 511 | 512 | "org/gnome/nm-applet/eap/018ad212-4fd8-4a9c-84be-f7be3a9c6aa5" = { 513 | ignore-ca-cert = false; 514 | ignore-phase2-ca-cert = false; 515 | }; 516 | 517 | "org/gnome/nm-applet/eap/1931c61a-f848-4188-84b6-c62c0a062fa5" = { 518 | ignore-ca-cert = false; 519 | ignore-phase2-ca-cert = false; 520 | }; 521 | 522 | "org/gnome/nm-applet/eap/20290588-f500-4fc7-ae72-41b7fdbee99c" = { 523 | ignore-ca-cert = false; 524 | ignore-phase2-ca-cert = false; 525 | }; 526 | 527 | "org/gnome/nm-applet/eap/233f112c-eee9-4efd-babf-007576431e39" = { 528 | ignore-ca-cert = false; 529 | ignore-phase2-ca-cert = false; 530 | }; 531 | 532 | "org/gnome/nm-applet/eap/28082add-5100-4f84-bacc-67d041ce520b" = { 533 | ignore-ca-cert = false; 534 | ignore-phase2-ca-cert = false; 535 | }; 536 | 537 | "org/gnome/nm-applet/eap/382917de-92c1-45fa-a0be-2fb612a75bc5" = { 538 | ignore-ca-cert = false; 539 | ignore-phase2-ca-cert = false; 540 | }; 541 | 542 | "org/gnome/nm-applet/eap/4a2cffa8-20dc-41e7-a65e-7d637160c051" = { 543 | ignore-ca-cert = false; 544 | ignore-phase2-ca-cert = false; 545 | }; 546 | 547 | "org/gnome/nm-applet/eap/59df293f-6208-476a-8ecd-27a2dea10d69" = { 548 | ignore-ca-cert = false; 549 | ignore-phase2-ca-cert = false; 550 | }; 551 | 552 | "org/gnome/nm-applet/eap/7e3a817a-41f9-4bc1-88be-3affd9e9b447" = { 553 | ignore-ca-cert = false; 554 | ignore-phase2-ca-cert = false; 555 | }; 556 | 557 | "org/gnome/nm-applet/eap/9735e3fe-42b9-40ac-9cda-79b1a46206ba" = { 558 | ignore-ca-cert = false; 559 | ignore-phase2-ca-cert = false; 560 | }; 561 | 562 | "org/gnome/nm-applet/eap/9c1f1740-442b-483c-b441-b32d361bc3a4" = { 563 | ignore-ca-cert = false; 564 | ignore-phase2-ca-cert = false; 565 | }; 566 | 567 | "org/gnome/nm-applet/eap/9ec81f93-4f75-441b-9e09-10354a1ea148" = { 568 | ignore-ca-cert = false; 569 | ignore-phase2-ca-cert = false; 570 | }; 571 | 572 | "org/gnome/nm-applet/eap/a2a536cf-c616-4785-b350-2b8c0eec70b5" = { 573 | ignore-ca-cert = false; 574 | ignore-phase2-ca-cert = false; 575 | }; 576 | 577 | "org/gnome/nm-applet/eap/b375e865-ca22-4371-bb7c-b517b2680e56" = { 578 | ignore-ca-cert = false; 579 | ignore-phase2-ca-cert = false; 580 | }; 581 | 582 | "org/gnome/nm-applet/eap/c324af01-e0b3-47ff-a94d-c4c07c45acd4" = { 583 | ignore-ca-cert = true; 584 | ignore-phase2-ca-cert = false; 585 | }; 586 | 587 | "org/gnome/nm-applet/eap/ce654d28-ba24-4919-ad58-971e5652104c" = { 588 | ignore-ca-cert = false; 589 | ignore-phase2-ca-cert = false; 590 | }; 591 | 592 | "org/gnome/nm-applet/eap/d9e73ea1-a871-495f-b4fd-8c50a055b9e6" = { 593 | ignore-ca-cert = false; 594 | ignore-phase2-ca-cert = false; 595 | }; 596 | 597 | "org/gnome/nm-applet/eap/e92c66f9-4d14-469c-aaf2-d123fddcdc7e" = { 598 | ignore-ca-cert = false; 599 | ignore-phase2-ca-cert = false; 600 | }; 601 | 602 | "org/gnome/nm-applet/eap/f99a8d43-90e1-4f4b-b10b-6dd217b90974" = { 603 | ignore-ca-cert = false; 604 | ignore-phase2-ca-cert = false; 605 | }; 606 | 607 | "org/gnome/settings-daemon/plugins/color" = { 608 | night-light-enabled = false; 609 | night-light-last-coordinates = mkTuple [ 51.031535 13.707111 ]; 610 | }; 611 | 612 | "org/gnome/settings-daemon/plugins/media-keys" = { 613 | custom-keybindings = [ "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/" "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/" "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/" "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3/" "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4/" "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom5/" "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom6/" "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom7/" "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom8/" "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom10/" ]; 614 | www = [ "w" ]; 615 | }; 616 | 617 | "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = { 618 | binding = "Return"; 619 | command = "kgx"; 620 | name = "Terminal"; 621 | }; 622 | 623 | "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = { 624 | binding = "Return"; 625 | command = "alacritty -e ipython"; 626 | name = "Ipython"; 627 | }; 628 | 629 | "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom10" = { 630 | binding = "F12"; 631 | command = "guake-toggle"; 632 | name = "Guake"; 633 | }; 634 | 635 | "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2" = { 636 | binding = "f"; 637 | command = "alacritty -e ranger"; 638 | name = "Ranger"; 639 | }; 640 | 641 | "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3" = { 642 | binding = "x"; 643 | command = "shutdown now"; 644 | name = "Shutdown"; 645 | }; 646 | 647 | "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4" = { 648 | binding = "BackSpace"; 649 | command = "reboot"; 650 | name = "Reboot"; 651 | }; 652 | 653 | "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom5" = { 654 | binding = "f"; 655 | command = "nautilus"; 656 | name = "Naut"; 657 | }; 658 | 659 | "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom6" = { 660 | binding = "e"; 661 | command = "emacsclient -c"; 662 | name = "Emacs"; 663 | }; 664 | 665 | "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom7" = { 666 | binding = "d"; 667 | command = "neovide"; 668 | name = "Neovide"; 669 | }; 670 | 671 | "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom8" = { 672 | binding = "c"; 673 | command = "code"; 674 | name = "VS Code"; 675 | }; 676 | 677 | "org/gnome/settings-daemon/plugins/power" = { 678 | power-button-action = "suspend"; 679 | }; 680 | 681 | "org/gnome/shell" = { 682 | command-history = [ "console" "gnome-console" "slack" ]; 683 | disabled-extensions = []; 684 | enabled-extensions = [ "auto-move-windows@gnome-shell-extensions.gcampax.github.com" ]; 685 | favorite-apps = [ "firefox.desktop" "emacsclient.desktop" "code.desktop" "com.github.xournalpp.xournalpp.desktop" "zotero.desktop" "org.gnome.Nautilus.desktop" "slack.desktop" "Mattermost.desktop" "org.telegram.desktop.desktop" ]; 686 | last-selected-power-profile = "power-saver"; 687 | looking-glass-history = [ "ls" ]; 688 | welcome-dialog-last-shown-version = "42.0"; 689 | }; 690 | 691 | "org/gnome/shell/extensions/auto-move-windows" = { 692 | application-list = [ "slack.desktop:2" "Mattermost.desktop:2" "telegramdesktop.desktop:2" ]; 693 | }; 694 | 695 | "org/gnome/shell/keybindings" = { 696 | switch-to-application-1 = []; 697 | switch-to-application-2 = []; 698 | switch-to-application-3 = []; 699 | switch-to-application-4 = []; 700 | }; 701 | 702 | "org/gnome/shell/weather" = { 703 | automatic-location = true; 704 | locations = "[<(uint32 2, <('Dresden', 'EDDC', true, [(0.89244501836866974, 0.23998277214922031)], [(0.8909905831431052, 0.23998277214922031)])>)>]"; 705 | }; 706 | 707 | "org/gnome/shell/world-clocks" = { 708 | locations = "@av []"; 709 | }; 710 | 711 | "org/gnome/simple-scan" = { 712 | document-type = "photo"; 713 | paper-height = 2970; 714 | paper-width = 2100; 715 | photo-dpi = 300; 716 | save-directory = "file:///home/loren/Documents/"; 717 | text-dpi = 2400; 718 | }; 719 | 720 | "org/gnome/software" = { 721 | check-timestamp = mkInt64 1701185158; 722 | first-run = false; 723 | flatpak-purge-timestamp = mkInt64 1690189264; 724 | }; 725 | 726 | "org/gnome/system/location" = { 727 | enabled = false; 728 | }; 729 | 730 | "org/gnome/tweaks" = { 731 | show-extensions-notice = false; 732 | }; 733 | 734 | "org/gtk/gtk4/settings/file-chooser" = { 735 | date-format = "regular"; 736 | location-mode = "path-bar"; 737 | show-hidden = false; 738 | show-size-column = true; 739 | show-type-column = true; 740 | sidebar-width = 169; 741 | sort-column = "name"; 742 | sort-directories-first = false; 743 | sort-order = "ascending"; 744 | type-format = "category"; 745 | view-type = "list"; 746 | window-size = mkTuple [ 1010 449 ]; 747 | }; 748 | 749 | "org/gtk/settings/color-chooser" = { 750 | custom-colors = [ (mkTuple [ 1.0 1.0 ]) ]; 751 | selected-color = mkTuple [ true 1.0 ]; 752 | }; 753 | 754 | "org/gtk/settings/file-chooser" = { 755 | date-format = "regular"; 756 | location-mode = "path-bar"; 757 | show-hidden = false; 758 | show-size-column = true; 759 | show-type-column = true; 760 | sidebar-width = 180; 761 | sort-column = "name"; 762 | sort-directories-first = false; 763 | sort-order = "ascending"; 764 | type-format = "category"; 765 | window-position = mkTuple [ 799 386 ]; 766 | window-size = mkTuple [ 962 658 ]; 767 | }; 768 | 769 | "system/proxy" = { 770 | mode = "none"; 771 | }; 772 | 773 | }; 774 | } 775 | -------------------------------------------------------------------------------- /home/modules/default.nix: -------------------------------------------------------------------------------- 1 | [ 2 | ./bash 3 | ./dconf 4 | ./emacs 5 | ./fish 6 | ./zsh 7 | ] 8 | -------------------------------------------------------------------------------- /home/modules/emacs/default.nix: -------------------------------------------------------------------------------- 1 | # Emacs configuration 2 | { config, pkgs, ... }: 3 | { 4 | home.file.".emacs.d/" = { 5 | source = pkgs.fetchFromGitHub { 6 | owner = "Panadestein"; 7 | repo = "emacsd"; 8 | rev = "69da3c218058c038c18e8af0e6f93fa5e9403074"; 9 | sha256 = "17xf0lws6js77x5sl97drsyq40jd5x6w9rxb304nfgcwl3s5zfis"; 10 | }; 11 | recursive = true; 12 | onChange = builtins.readFile ../../dotfiles/set_emacs.sh; 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /home/modules/fish/default.nix: -------------------------------------------------------------------------------- 1 | # Fish config 2 | { config, lib, pkgs, ... }: 3 | { 4 | programs.fish = { 5 | enable = true; 6 | 7 | interactiveShellInit = '' 8 | # Remove greeting message 9 | set -g fish_greeting 10 | 11 | # Better man pager 12 | set -x MANPAGER "sh -c 'col -bx | bat -l man -p'" 13 | set -x MANROFFOPT "-c" 14 | 15 | # Set prompt 16 | function fish_prompt 17 | set_color yellow --bold 18 | echo -n '⌊' 19 | 20 | set_color red --bold 21 | echo -n φ 22 | 23 | set_color white --bold 24 | echo -n ' ∈ ' 25 | 26 | set_color blue --bold 27 | echo -n (basename (pwd)) 28 | 29 | set_color yellow --bold 30 | echo -n '⌉' 31 | 32 | set_color green --bold 33 | printf '%s ' (fish_git_prompt) 34 | set_color normal 35 | end 36 | 37 | # Ensure fzf.fish history instead of fzf 38 | bind \cr _fzf_search_history 39 | bind -M insert \cr _fzf_search_history 40 | 41 | # Useful functions 42 | function emhash 43 | set head_hash (git rev-parse HEAD) 44 | 45 | if test -n "$head_hash" 46 | echo "Hash of HEAD: $head_hash" 47 | set url "https://github.com/Panadestein/emacsd/archive/$head_hash.tar.gz" 48 | nix-prefetch-url --unpack $url 49 | else 50 | echo "Error: Unable to retrieve HEAD hash. Are you in a Git repository?" 51 | end 52 | end 53 | 54 | function bqnhash 55 | set head_hash (git rev-parse HEAD) 56 | 57 | if test -n "$head_hash" 58 | echo "Hash of HEAD: $head_hash" 59 | set url "https://github.com/dzaima/CBQN.git" 60 | nix-prefetch-git --url $url --rev $head_hash --fetch-submodules 61 | else 62 | echo "Error: Unable to retrieve HEAD hash. Are you in a Git repository?" 63 | end 64 | end 65 | 66 | # Entering nix-shells 67 | any-nix-shell fish --info-right | source 68 | ''; 69 | 70 | shellAliases = { 71 | # General aliases 72 | c = "code -r"; 73 | cow = "fortune | cowsay"; 74 | e = "emacsclient"; 75 | E = "SUDO_EDITOR='emacsclient -t -a emacs' sudoedit"; 76 | en = "emacsclient -c -nw"; 77 | jour1 = "journalctl -p 3 -xb"; 78 | jour2 = "journalctl -xb | grep rror"; 79 | ka = "killall"; 80 | ls = "eza"; 81 | n = "neovide --maximized"; 82 | r = "ranger"; 83 | sb = "source ~/.bashrc"; 84 | sv = "sudo nvim"; 85 | sz = "source ~/.zshrc"; 86 | t = "trans"; 87 | v = "nvim"; 88 | xo = "xonsh"; 89 | # Aliases for configuration files 90 | cde = "cd ~/.emacs.d/"; 91 | cfb = "e ~/.bashrc"; 92 | cfe = "e ~/.emacs.d/init.el"; 93 | cfn = "neovide --maximized ~/.config/nvim/init.vim"; 94 | cfv = "vim ~/.vimrc"; 95 | vb = "nvim ~/.bashrc"; 96 | vz = "nvim ~/.zshrc"; 97 | # Less frequently used aliases 98 | jnb = "jupyter notebook"; 99 | starwars = "telnet towel.blinkenlights.nl"; 100 | wo = ''figlet -t "$(hostname)" | lolcat''; 101 | meteo = "curl http://wttr.in"; 102 | # Supercomputers 103 | barb = "ssh -i ~/.ssh/id_rsa it4i-rpanades@barbora.it4i.cz"; 104 | karo = "ssh -i ~/.ssh/id_rsa it4i-rpanades@karolina.it4i.cz"; 105 | lumi = "ssh -i ~/.ssh/id_ed25519 rpanades2@lumi.csc.fi"; 106 | }; 107 | 108 | plugins = with pkgs.fishPlugins; [ 109 | { 110 | name = "grc"; 111 | src = grc.src; 112 | } 113 | { 114 | name = "fzf-fish"; 115 | src = fzf-fish.src; 116 | } 117 | { 118 | name = "z"; 119 | src = z.src; 120 | } 121 | ]; 122 | 123 | }; 124 | } 125 | -------------------------------------------------------------------------------- /home/modules/zsh/default.nix: -------------------------------------------------------------------------------- 1 | # Zsh config 2 | { config, lib, pkgs, ... }: 3 | { 4 | programs.zsh = { 5 | enable = true; 6 | autocd = true; 7 | dotDir = ".config/zsh"; 8 | enableCompletion = true; 9 | autosuggestion.enable = true; 10 | 11 | shellAliases = { 12 | # General aliases 13 | c = "code -r"; 14 | cow = "fortune | cowsay"; 15 | e = "emacsclient"; 16 | E = "SUDO_EDITOR='emacsclient -t -a emacs' sudoedit"; 17 | en = "emacsclient -c -nw"; 18 | jour1 = "journalctl -p 3 -xb"; 19 | jour2 = "journalctl -xb | grep rror"; 20 | ka = "killall"; 21 | n = "neovide --maximized"; 22 | r = "ranger"; 23 | sb = "source ~/.bashrc"; 24 | sv = "sudo nvim"; 25 | sz = "source ~/.zshrc"; 26 | t = "trans"; 27 | v = "nvim"; 28 | xo = "xonsh"; 29 | # Aliases for configuration files 30 | cde = "cd ~/.emacs.d/"; 31 | cfb = "e ~/.bashrc"; 32 | cfe = "e ~/.emacs.d/init.el"; 33 | cfn = "neovide --maximized ~/.config/nvim/init.vim"; 34 | cfv = "vim ~/.vimrc"; 35 | vb = "nvim ~/.bashrc"; 36 | vz = "nvim ~/.zshrc"; 37 | # Less frequently used aliases 38 | jnb = "jupyter notebook"; 39 | starwars = "telnet towel.blinkenlights.nl"; 40 | wo = ''figlet -t "$(hostname)" | lolcat''; 41 | meteo = "curl http://wttr.in"; 42 | # Aliases for remote machines 43 | ccpgate = "ssh -Y panades@ccpgate.tnw.utwente.nl"; 44 | jul = "ssh -i ~/.ssh/id_ed25519 -Y panadesbarrueta1@juwels-cluster.fz-juelich.de"; 45 | lsts0 = "ssh -Y rbarrueta@141.30.9.190"; 46 | lsts1 = "ssh -Y rbarrueta@141.30.9.191"; 47 | mah = "ssh rpanades@mahti.csc.fi"; 48 | pader = "ssh -t -i ~/.ssh/id_rsa corexl01@sshgate.uni-paderborn.de"; 49 | sakup = "sftp ramon@sakura.univ-lille1.fr"; 50 | sakura = "ssh -Y ramon@sakura.univ-lille1.fr"; 51 | sssara = "ssh -Y panades@doornode.surfsara.nl"; 52 | tau = "ssh -Y rapa157d@taurus.hrsk.tu-dresden.de"; 53 | toul = "ssh panades@lpqsv11.ups-tlse.fr"; 54 | tukup = "sftp rbarrueta@cpch06.chm.tu-dresden.de"; 55 | tume = "ssh -Y rbarrueta@cpch06.chm.tu-dresden.de"; 56 | }; 57 | 58 | history = { 59 | expireDuplicatesFirst = true; 60 | size = 10000000; 61 | }; 62 | 63 | initContent = builtins.readFile ../../dotfiles/zshextra; 64 | 65 | oh-my-zsh = { 66 | enable = true; 67 | plugins = [ 68 | "command-not-found" 69 | "git" 70 | "history" 71 | "sudo" 72 | ]; 73 | }; 74 | 75 | zplug = { 76 | enable = true; 77 | plugins = [ 78 | { name = "zsh-users/zsh-completions"; } 79 | { name = "zsh-users/zsh-syntax-highlighting"; } 80 | ]; 81 | }; 82 | 83 | plugins = [ 84 | { 85 | name = "zsh-nix-shell"; 86 | file = "nix-shell.plugin.zsh"; 87 | src = pkgs.fetchFromGitHub { 88 | owner = "chisui"; 89 | repo = "zsh-nix-shell"; 90 | rev = "v0.8.0"; 91 | sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7"; 92 | }; 93 | } 94 | ]; 95 | }; 96 | } 97 | -------------------------------------------------------------------------------- /systems/cyrus/configuration.nix: -------------------------------------------------------------------------------- 1 | #----------------------------- 2 | # _ _ _ ___ ____ 3 | # | \ | (_)_ __/ _ \/ ___| 4 | # | \| | \ \/ / | | \___ \ 5 | # | |\ | |> <| |_| |___) | 6 | # |_| \_|_/_/\_\\___/|____/ 7 | # 8 | # Panadestein's NixOS 9 | #----------------------------- 10 | 11 | { config, pkgs, lib, inputs, ... }: 12 | { 13 | imports = 14 | [ 15 | # Hardware of current machine 16 | ./hardware-configuration.nix 17 | ]; 18 | 19 | # Overlays 20 | nixpkgs.overlays = [ 21 | # Emacs overlay 22 | (import inputs.emacs-overlay) 23 | ]; 24 | 25 | # Nixpkgs configuration 26 | nixpkgs.config = { 27 | allowUnfree = true; 28 | packageOverrides = pkgs: { 29 | inxi = pkgs.inxi.override { withRecommends = true; }; 30 | }; 31 | }; 32 | 33 | # Nix configuration 34 | nix = { 35 | settings = { 36 | substituters = [ 37 | "https://nix-community.cachix.org/" 38 | "https://cache.nixos.org/" 39 | ]; 40 | trusted-public-keys = [ 41 | "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" 42 | ]; 43 | trusted-users = [ 44 | "root" 45 | "loren" 46 | ]; 47 | experimental-features = [ "nix-command" "flakes" ]; 48 | }; 49 | }; 50 | 51 | # Use the latest linux kernel 52 | boot.kernelPackages = pkgs.linuxPackages_zen; 53 | 54 | # Load AMD CPU microcode and firmware 55 | hardware.cpu.amd.updateMicrocode = true; 56 | hardware.firmware = [ pkgs.linux-firmware ]; 57 | 58 | # And this is when you give up (for now) 59 | boot.blacklistedKernelModules = [ 60 | "ath11k_pci" 61 | ]; 62 | 63 | # Kernel parameters and modules 64 | boot.initrd.kernelModules = [ "amdgpu" "hid-apple"]; 65 | boot.kernelParams = [ 66 | "quiet" 67 | "loglevel=3" 68 | "rd.systemd.show_status=auto" 69 | "rd.udev.log_level=3" 70 | "hid_apple.fnmode=0" 71 | "psmouse.synaptics_intertouch=0" 72 | ]; 73 | boot.initrd.verbose = false; 74 | boot.plymouth.enable = true; 75 | 76 | # Use the systemd-boot EFI boot loader. 77 | boot.loader = { 78 | systemd-boot.enable = false; 79 | efi.canTouchEfiVariables = true; 80 | grub.enable = true; 81 | grub.efiSupport = true; 82 | grub.device = "nodev"; 83 | }; 84 | 85 | # Set hostname 86 | networking.hostName = "cyrus"; 87 | 88 | # Set your time zone. 89 | time.timeZone = "Europe/Berlin"; 90 | 91 | # Set zsh as default shell 92 | programs.zsh.enable = true; 93 | users.defaultUserShell = pkgs.zsh; 94 | 95 | # Enable fish shell 96 | programs.fish.enable = false; 97 | 98 | # Network configuration 99 | networking = { 100 | networkmanager = { 101 | enable = true; 102 | wifi.powersave = lib.mkDefault false; 103 | }; 104 | }; 105 | programs.nm-applet.enable = true; 106 | 107 | # Select internationalisation properties. 108 | i18n.defaultLocale = "en_US.UTF-8"; 109 | console = { 110 | font = "Lat2-Terminus16"; 111 | keyMap = "us"; 112 | }; 113 | 114 | # Enable the X11 windowing system. 115 | services.xserver.enable = true; 116 | 117 | # Configure AMD graphics 118 | services.xserver.videoDrivers = [ "amdgpu" ]; 119 | hardware.graphics.extraPackages = with pkgs; [ 120 | amdvlk 121 | ]; 122 | services.xserver.deviceSection = ''Option "TearFree" "true"''; 123 | 124 | # Display manager 125 | services.xserver.displayManager = { 126 | gdm = { 127 | enable = false; 128 | wayland = true; 129 | }; 130 | lightdm = { 131 | enable = true; 132 | greeters.enso = { 133 | enable = true; 134 | }; 135 | }; 136 | }; 137 | services.displayManager.defaultSession = lib.mkForce "qtile"; 138 | 139 | # Window managers 140 | services.xserver.windowManager = { 141 | xmonad = { 142 | enable = true; 143 | enableContribAndExtras = true; 144 | extraPackages = haskellPackages: [ 145 | haskellPackages.xmonad 146 | haskellPackages.xmonad-contrib 147 | haskellPackages.xmonad-extras 148 | ]; 149 | }; 150 | qtile = { 151 | enable = true; 152 | }; 153 | stumpwm = { 154 | enable = false; 155 | }; 156 | }; 157 | 158 | # Desktop environment 159 | services.xserver.desktopManager.gnome.enable = false; 160 | xdg.portal.enable = lib.mkIf 161 | (!config.services.xserver.desktopManager.gnome.enable) 162 | true; 163 | xdg.portal.configPackages = lib.mkIf 164 | (!config.services.xserver.desktopManager.gnome.enable) 165 | [ pkgs.xdg-desktop-portal-gtk ]; 166 | 167 | # Configure keymap in X11 168 | services.xserver.xkb = { 169 | layout = "us,bqn"; 170 | options = "grp:switch"; 171 | }; 172 | 173 | # Printing support with CUPS 174 | services.printing = { 175 | enable = true; 176 | drivers = [ 177 | pkgs.nixpkgs-stable.hplip 178 | pkgs.nixpkgs-stable.hplipWithPlugin 179 | ]; 180 | }; 181 | services.avahi.enable = true; 182 | services.avahi.nssmdns4 = true; 183 | programs.system-config-printer.enable = true; 184 | 185 | # Scanners 186 | hardware.sane.enable = true; 187 | 188 | # Bluetooth support 189 | hardware.bluetooth = { 190 | enable = true; 191 | }; 192 | services.blueman.enable = true; 193 | 194 | # Enable touchpad support 195 | services.libinput = { 196 | enable = true; 197 | touchpad = { 198 | tapping = true; 199 | naturalScrolling = true; 200 | scrollMethod = "twofinger"; 201 | }; 202 | }; 203 | 204 | # User account and configuration 205 | users.users.loren = { 206 | isNormalUser = true; 207 | home = "/home/loren"; 208 | createHome = true; 209 | extraGroups = [ "wheel" 210 | "audio" 211 | "input" 212 | "docker" 213 | "networkmanager" 214 | "systemd-journal" 215 | "video"]; 216 | }; 217 | 218 | # Global packages, minimal to avoid polluting environment 219 | environment.systemPackages = with pkgs; [ 220 | # General utilities 221 | acpi 222 | binutils 223 | cacert 224 | coreutils 225 | curl 226 | dmidecode 227 | file 228 | git 229 | inxi 230 | iw 231 | killall 232 | libtool 233 | pavucontrol 234 | pciutils 235 | rsync 236 | sshfs 237 | unrar 238 | unzip 239 | usbutils 240 | wget 241 | which 242 | # Terminal and CLI utilities 243 | zsh 244 | inputs.nix-inspect.packages.${pkgs.system}.default 245 | inputs.papis.packages.${pkgs.system}.default 246 | # Text editors and office 247 | emacs-git 248 | vim_configurable 249 | # Programming languages (here to avoid environment clashes) 250 | gfortran 251 | # julia-bin 252 | mono 253 | qt6.full 254 | (let 255 | my-python-packages = python-packages: with python-packages; [ 256 | # Language server protocol 257 | ruff 258 | # Scientific libraries 259 | ipython 260 | ipykernel 261 | jupyter 262 | matplotlib 263 | mpmath 264 | numpy 265 | pandas 266 | scikit-learn 267 | scipy 268 | sympy 269 | # Qt backend 270 | pyqt6 271 | # Documentation 272 | sphinx 273 | # Linters 274 | autopep8 275 | flake8 276 | jedi 277 | mypy 278 | pydocstyle 279 | pylint 280 | # Web 281 | tornado 282 | # Hy utilities 283 | hy 284 | # Dependencies 285 | pickleshare 286 | ]; 287 | python-with-my-packages = python3.withPackages my-python-packages; 288 | in 289 | python-with-my-packages) 290 | (hy.withPackages (py-packages: with py-packages; [ 291 | # Scientific libraries 292 | numpy 293 | matplotlib 294 | pandas 295 | scipy 296 | sympy 297 | # Qt backend 298 | pyqt6 299 | ])) 300 | ]; 301 | 302 | # Emacs configuration 303 | services.emacs = { 304 | enable = true; 305 | package = pkgs.emacs-git; 306 | defaultEditor = true; 307 | }; 308 | 309 | # Enable Java 310 | programs.java.enable = true; 311 | 312 | # Use Flatpak, just in case 313 | services.flatpak.enable = true; 314 | 315 | # Fonts 316 | fonts.packages = with pkgs; [ 317 | dina-font 318 | fira-code 319 | fira-code-symbols 320 | font-awesome 321 | iosevka 322 | liberation_ttf 323 | noto-fonts 324 | noto-fonts-cjk-sans 325 | noto-fonts-emoji 326 | proggyfonts 327 | source-code-pro 328 | uiua386 329 | nerd-fonts.fira-code 330 | ]; 331 | 332 | # Gnome apps configuration 333 | programs.dconf.enable = true; 334 | environment.gnome.excludePackages = (with pkgs; [ 335 | gnome-tour 336 | ]) ++ (with pkgs.gnome; [ 337 | gnome-music 338 | ]); 339 | 340 | # Gnupg configuration 341 | programs.gnupg.agent = { 342 | enable = true; 343 | enableSSHSupport = true; 344 | }; 345 | 346 | # Virtualization setup, only docker at the moment 347 | virtualisation = { 348 | docker = { 349 | enable = true; 350 | extraOptions = "--default-ulimit nofile=65536:65536"; 351 | }; 352 | }; 353 | 354 | # Audio service 355 | security.rtkit.enable = true; 356 | services.pipewire = { 357 | enable = true; 358 | alsa.enable = true; 359 | alsa.support32Bit = true; 360 | pulse.enable = true; 361 | }; 362 | 363 | # Additional services 364 | services.actkbd.enable = true; 365 | services.gvfs.enable = true; 366 | services.openssh.enable = true; 367 | services.upower.enable = true; 368 | services.gnome.gnome-keyring.enable = true; 369 | services.dbus = { 370 | enable = true; 371 | packages = [ pkgs.dconf ]; 372 | }; 373 | systemd.user.services.maestral = { 374 | enable = true; 375 | description = "Maestral"; 376 | wantedBy = [ "graphical-session.target" ]; 377 | serviceConfig = { 378 | ExecStart = "${pkgs.maestral-gui}/bin/maestral_qt"; 379 | Restart = "on-failure"; 380 | PrivateTmp = true; 381 | ProtectSystem = "full"; 382 | Nice = 10; 383 | }; 384 | }; 385 | 386 | # Wifi sevice fix for P16s 387 | systemd.services = { 388 | ath11k-fix = { 389 | enable = false; 390 | 391 | description = "Suspend fix for ath11k_pci"; 392 | before = [ "sleep.target" ]; 393 | 394 | unitConfig = { 395 | StopWhenUnneeded = "yes"; 396 | }; 397 | 398 | serviceConfig = { 399 | Type = "oneshot"; 400 | RemainAfterExit = "yes"; 401 | ExecStart = "/run/current-system/sw/bin/modprobe -r ath11k_pci"; 402 | ExecStop = "/run/current-system/sw/bin/modprobe ath11k_pci"; 403 | }; 404 | 405 | wantedBy = [ "sleep.target" ]; 406 | }; 407 | }; 408 | 409 | # State version 410 | system.stateVersion = "24.05"; 411 | } 412 | -------------------------------------------------------------------------------- /systems/cyrus/hardware-configuration.nix: -------------------------------------------------------------------------------- 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 | # and may be overwritten by future invocations. Please make changes 3 | # to /etc/nixos/configuration.nix instead. 4 | { config, lib, pkgs, modulesPath, ... }: 5 | 6 | { 7 | imports = 8 | [ (modulesPath + "/installer/scan/not-detected.nix") 9 | ]; 10 | 11 | boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ]; 12 | boot.initrd.kernelModules = [ ]; 13 | boot.kernelModules = [ "kvm-amd" ]; 14 | boot.extraModulePackages = [ ]; 15 | 16 | fileSystems."/" = 17 | { device = "/dev/disk/by-uuid/fded0937-3762-43b5-989b-5a5f9db4c55b"; 18 | fsType = "ext4"; 19 | }; 20 | 21 | fileSystems."/boot" = 22 | { device = "/dev/disk/by-uuid/0334-7D60"; 23 | fsType = "vfat"; 24 | }; 25 | 26 | swapDevices = [ ]; 27 | 28 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 29 | hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 30 | } 31 | -------------------------------------------------------------------------------- /utils/flakes/array_langs.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "An array language flake."; 3 | 4 | inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 5 | 6 | outputs = { self, nixpkgs }: 7 | let 8 | pkgs = import nixpkgs { 9 | system = "x86_64-linux"; 10 | config = { 11 | allowUnfree = true; 12 | dyalog.acceptLicense = true; 13 | }; 14 | }; 15 | in 16 | { 17 | devShell.x86_64-linux = pkgs.mkShell { 18 | buildInputs = with pkgs; [ 19 | # APL 20 | dyalog 21 | apl386 22 | # BQN 23 | cbqn 24 | bqn386 25 | # Uiua 26 | uiua 27 | uiua386 28 | ]; 29 | }; 30 | }; 31 | } -------------------------------------------------------------------------------- /utils/flakes/greenx_flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "A development flake for GreenX. Usage `nix develop .#devShell.x86_64-linux`"; 3 | nixConfig.bash-prompt = ''\[\033[1;31m\][\[\033[0m\]\[\033[1;37m\]dev .\[\033[0m\]\[\033[1;34m\] $(basename \$$PWD)\[\033[0m\]\[\033[1;31m\]]\[\033[0m\] ''; 4 | 5 | inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 6 | 7 | outputs = { self, nixpkgs }: 8 | let 9 | pkgs = nixpkgs.legacyPackages.x86_64-linux; 10 | 11 | findent = pkgs.stdenv.mkDerivation rec { 12 | pname = "findent"; 13 | version = "4.2.6"; 14 | 15 | src = pkgs.fetchurl { 16 | url = "mirror://sourceforge/findent/${pname}-${version}.tar.gz"; 17 | sha512 = "1d97005a6f414a1876dd2140922125b7e399fc7b03afaea0b2fe6dfd7eb6baeb3bf16d3ae7b259e3c9a613a889f2759393c1ed5f98e5bda8ee6ea3ddd5e713c0"; 18 | }; 19 | 20 | nativeBuildInputs = [ pkgs.gnumake pkgs.gcc ]; 21 | buildInputs = [ pkgs.flex pkgs.bison ]; 22 | 23 | configureFlags = [ "--prefix=${placeholder "out"}" ]; 24 | 25 | meta = { 26 | homepage = "https://sourceforge.net/projects/findent/"; 27 | description = "A Fortran indenter"; 28 | }; 29 | }; 30 | 31 | zofu = pkgs.stdenv.mkDerivation { 32 | pname = "zofu"; 33 | version = "1.1.1"; 34 | 35 | src = pkgs.fetchFromGitHub { 36 | owner = "acroucher"; 37 | repo = "zofu"; 38 | rev = "96cf65829610c7812f212b42268081af356c8f52"; 39 | sha256 = "1i9ylxy52x7gg95dvrdb72pb45l2rsnrlnsi504cvpyngfnnxd0n"; 40 | }; 41 | 42 | buildInputs = [ pkgs.cmake pkgs.gfortran ]; 43 | 44 | configurePhase = '' 45 | mkdir build 46 | cd build 47 | cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$out ../ 48 | ''; 49 | 50 | buildPhase = '' 51 | make -j4 52 | ''; 53 | 54 | installPhase = '' 55 | make install 56 | ''; 57 | 58 | meta = { 59 | homepage = "https://github.com/acroucher/zofu"; 60 | description = "A Fortran unit test framework."; 61 | }; 62 | }; 63 | 64 | pygreenx = pkgs.python3Packages.buildPythonPackage { 65 | pname = "pygreenx"; 66 | version = "1.0"; 67 | 68 | src = ./python; 69 | 70 | propagatedBuildInputs = with pkgs.python3Packages; [ 71 | pytest 72 | setuptools 73 | numpy 74 | ]; 75 | 76 | meta = { 77 | homepage = "https://github.com/nomad-coe/greenX"; 78 | description = "Python utils for the GreenX library."; 79 | }; 80 | }; 81 | 82 | color-vgrind = pkgs.python3Packages.buildPythonPackage rec { 83 | pname = "colour-valgrind"; 84 | version = "0.3.9"; 85 | 86 | src = pkgs.python3.pkgs.fetchPypi { 87 | inherit pname version; 88 | sha256 = "34a7d92e3c82a63d80644a571d3df8e4d29dd7b14b263dee90307d5d6432619d"; 89 | }; 90 | 91 | propagatedBuildInputs = with pkgs.python3Packages; [ 92 | pip 93 | wheel 94 | six 95 | regex 96 | colorama 97 | setuptools 98 | ]; 99 | 100 | meta = { 101 | homepage = "http://github.com/StarlitGhost/colour-valgrind"; 102 | description = "A colorful wrapper for Valgrind."; 103 | }; 104 | }; 105 | 106 | custom-python-env = pkgs.python3.withPackages (ps: [ 107 | color-vgrind 108 | pygreenx 109 | ]); 110 | in 111 | { 112 | devShell.x86_64-linux = pkgs.mkShell { 113 | buildInputs = with pkgs; [ 114 | # Python packages 115 | custom-python-env 116 | # Additional libraries and utils 117 | cmake 118 | doxygen 119 | findent 120 | gmp 121 | hotspot 122 | hyperfine 123 | lapack-reference 124 | linuxKernel.packages.linux_zen.perf 125 | python310Packages.pytest 126 | valgrind 127 | zofu 128 | ]; 129 | shellHook = '' 130 | alias val=colour-valgrind; 131 | ''; 132 | }; 133 | }; 134 | } 135 | -------------------------------------------------------------------------------- /utils/flakes/mach_nix/flake_fypp.nix: -------------------------------------------------------------------------------- 1 | { 2 | inputs = { 3 | mach-nix.url = "mach-nix/3.5.0"; 4 | }; 5 | 6 | outputs = {self, nixpkgs, mach-nix }@inp: 7 | let 8 | l = nixpkgs.lib // builtins; 9 | supportedSystems = [ "x86_64-linux" "aarch64-darwin" ]; 10 | forAllSystems = f: l.genAttrs supportedSystems 11 | (system: f system (import nixpkgs {inherit system;})); 12 | in 13 | { 14 | # enter this python environment by executing `nix shell .` 15 | defaultPackage = forAllSystems (system: pkgs: mach-nix.lib."${system}".mkPython { 16 | requirements = '' 17 | numpy 18 | fypp 19 | ''; 20 | }); 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /utils/flakes/papis-zotero-flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "Build papis-zotero"; 3 | nixConfig.bash-prompt = ''\[\033[1;31m\][\[\033[0m\]\[\033[1;37m\]dev .\[\033[0m\]\[\033[1;34m\] $(basename \$$PWD)\[\033[0m\]\[\033[1;31m\]]\[\033[0m\] ''; 4 | 5 | inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 6 | 7 | outputs = { self, nixpkgs }: 8 | let 9 | pkgs = nixpkgs.legacyPackages.x86_64-linux; 10 | 11 | papis-zotero-custom = pkgs.python3Packages.buildPythonPackage rec { 12 | version = "0.1.2"; 13 | pname = "papis-zotero"; 14 | 15 | src = pkgs.fetchFromGitHub { 16 | owner = "papis"; 17 | repo = "papis-zotero"; 18 | rev = "20a50ebbcb115fdddcbc922b4535f5c6c9f0e7b0"; 19 | sha256 = "0242mz5dvv2nj91lsc81779y8ad1xs698crgv654wws96ll8knn9"; 20 | }; 21 | 22 | doCheck = false; 23 | propagatedBuildInputs = [ 24 | pkgs.papis 25 | pkgs.python3Packages.papis 26 | ]; 27 | 28 | meta = { 29 | homepage = "https://github.com/papis/papis-zotero"; 30 | description = "Zotero support for papis"; 31 | }; 32 | }; 33 | 34 | in 35 | { 36 | devShell.x86_64-linux = pkgs.mkShell { 37 | buildInputs = [ 38 | papis-zotero-custom 39 | ]; 40 | }; 41 | }; 42 | } 43 | -------------------------------------------------------------------------------- /utils/flakes/qiskit-flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "An qiskit development flake"; 3 | nixConfig.bash-prompt = ''\[\033[1;31m\][\[\033[0m\]\[\033[1;37m\]dev .\[\033[0m\]\[\033[1;34m\] $(basename \$$PWD)\[\033[0m\]\[\033[1;31m\]]\[\033[0m\] ''; 4 | 5 | inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 6 | 7 | outputs = { self, nixpkgs }: 8 | let 9 | pkgs = nixpkgs.legacyPackages.x86_64-linux; 10 | 11 | my_qiskit_terra = pkgs.python3Packages.buildPythonPackage rec { 12 | version = "0.25.2"; 13 | pname = "qiskit-terra"; 14 | 15 | src = pkgs.python3.pkgs.fetchPypi { 16 | inherit pname version; 17 | sha256 = "b865af9696a71aeca17c2e926c262a9160191aa247c98c3d75860d3ff34bdc67"; 18 | }; 19 | 20 | doCheck = false; 21 | 22 | nativeBuildInputs = [ 23 | pkgs.cargo 24 | pkgs.rustc 25 | pkgs.rustPlatform.cargoSetupHook 26 | pkgs.python3Packages.setuptools-rust 27 | ]; 28 | 29 | propagatedBuildInputs = [ 30 | pkgs.symengine 31 | pkgs.python3Packages.dill 32 | pkgs.python3Packages.numpy 33 | pkgs.python3Packages.networkx 34 | pkgs.python3Packages.ply 35 | pkgs.python3Packages.psutil 36 | pkgs.python3Packages.python-constraint 37 | pkgs.python3Packages.python-dateutil 38 | pkgs.python3Packages.rustworkx 39 | pkgs.python3Packages.scipy 40 | pkgs.python3Packages.stevedore 41 | pkgs.python3Packages.sympy 42 | pkgs.python3Packages.tweedledum 43 | ]; 44 | 45 | cargoDeps = pkgs.rustPlatform.fetchCargoTarball { 46 | inherit src; 47 | name = "${pname}-${version}"; 48 | hash = "sha256-Ex/L3L21wUcV69/hDrhbG0LcVyggQdCSU5EwJatphPA="; 49 | }; 50 | 51 | meta = with pkgs.lib; { 52 | homepage = "https://qiskit.org/"; 53 | description = "Software for developing quantum computing programs"; 54 | }; 55 | }; 56 | 57 | my_qiskit = pkgs.python3Packages.buildPythonPackage rec { 58 | version = "0.44.1"; 59 | pname = "qiskit"; 60 | 61 | src = pkgs.python3.pkgs.fetchPypi { 62 | inherit pname version; 63 | sha256 = "353c1aa2624c4044bd7013bd1e996a736c60934ebe323119c1f5b07527c6b05f"; 64 | }; 65 | 66 | doCheck = false; 67 | propagatedBuildInputs = [ 68 | my_qiskit_terra 69 | pkgs.python3Packages.typing-extensions 70 | ]; 71 | 72 | meta = with pkgs.lib; { 73 | homepage = "https://qiskit.org/"; 74 | description = "Open-source toolkit for useful quantum computing"; 75 | }; 76 | }; 77 | 78 | my_qiskit_aer = pkgs.python3Packages.buildPythonPackage rec { 79 | version = "0.12.2"; 80 | pname = "qiskit-aer"; 81 | 82 | src = pkgs.fetchFromGitHub { 83 | owner = "Qiskit"; 84 | repo = "qiskit-aer"; 85 | rev = "0.12.2"; 86 | sha256 = "0w92ll0db5xsckj84m7gam8f7qqpa697h226fj3913zxb23jzh1b"; 87 | }; 88 | 89 | doCheck = false; 90 | 91 | nativeBuildInputs = [ 92 | pkgs.cmake 93 | pkgs.ninja 94 | pkgs.python3Packages.scikit-build 95 | ]; 96 | 97 | buildInputs = [ 98 | pkgs.blas 99 | pkgs.catch2 100 | pkgs.nlohmann_json 101 | pkgs.fmt 102 | pkgs.muparserx 103 | pkgs.spdlog 104 | ]; 105 | 106 | propagatedBuildInputs = [ 107 | pkgs.python3Packages.cvxpy 108 | pkgs.python3Packages.cython 109 | pkgs.python3Packages.pybind11 110 | ]; 111 | 112 | preBuild = '' 113 | export DISABLE_CONAN=1 114 | ''; 115 | 116 | dontUseCmakeConfigure = true; 117 | 118 | 119 | meta = with pkgs.lib; { 120 | homepage = "https://qiskit.org/"; 121 | description = "High-performance quantum computing simulator"; 122 | }; 123 | }; 124 | 125 | my_python_env = pkgs.python3.withPackages (ps: [ 126 | ps.numpy 127 | ps.scipy 128 | ps.matplotlib 129 | ps.ipykernel 130 | ps.pylatexenc 131 | my_qiskit 132 | my_qiskit_aer 133 | ]); 134 | 135 | in 136 | { 137 | devShell.x86_64-linux = pkgs.mkShell { 138 | buildInputs = with pkgs; [ 139 | # Python packages 140 | my_python_env 141 | ]; 142 | }; 143 | }; 144 | } 145 | -------------------------------------------------------------------------------- /utils/shells/fortran/shell_fypp.nix: -------------------------------------------------------------------------------- 1 | with import {}; 2 | 3 | (let 4 | my_fypp = pkgs.python3Packages.buildPythonPackage rec { 5 | version = "3.1"; 6 | pname = "fypp"; 7 | 8 | src = python3.pkgs.fetchPypi { 9 | inherit pname version; 10 | sha256 = "b777ae70081c7c82edcf52eefc01a3e8a566b4e82ccd33ca3b2f06faf1d07d36"; 11 | }; 12 | 13 | meta = with lib; { 14 | homepage = "https://gnikit.github.io/fortls"; 15 | description = "Python powered Fortran metaprogramming"; 16 | }; 17 | }; 18 | 19 | in pkgs.python3.buildEnv.override rec { 20 | extraLibs = [ my_fypp pkgs.python3Packages.numpy ]; 21 | } 22 | ).env 23 | -------------------------------------------------------------------------------- /utils/shells/python/shell_RISE.nix: -------------------------------------------------------------------------------- 1 | with import {}; 2 | 3 | (let 4 | my_rise = pkgs.python3Packages.buildPythonPackage rec { 5 | version = "5.7.1"; 6 | pname = "rise"; 7 | 8 | src = python3.pkgs.fetchPypi { 9 | inherit pname version; 10 | sha256 = "641db777cb907bf5e6dc053098d7fd213813fa9a946542e52b900eb7095289a6"; 11 | }; 12 | 13 | doCheck = false; 14 | buildInputs = [ 15 | pkgs.python3Packages.notebook 16 | ]; 17 | propagatedBuildInputs = [ 18 | pkgs.python3Packages.notebook 19 | ]; 20 | 21 | meta = with lib; { 22 | homepage = "https://github.com/damianavila/RISE"; 23 | description = "Reveal.js Jupyter"; 24 | }; 25 | }; 26 | 27 | in pkgs.python3.buildEnv.override rec { 28 | extraLibs = [ my_rise ]; 29 | } 30 | ).env 31 | -------------------------------------------------------------------------------- /utils/shells/python/shell_basic.nix: -------------------------------------------------------------------------------- 1 | # Simple nix-shell for data processing in Python 2 | { pkgs ? import {} }: 3 | let 4 | python-with-my-packages = pkgs.python3.withPackages (p: with p; [ 5 | numpy 6 | matplotlib 7 | pyqt5 8 | scikit-learn 9 | mpmath 10 | ]); 11 | in 12 | python-with-my-packages.env 13 | -------------------------------------------------------------------------------- /utils/shells/python/shell_cplot.nix: -------------------------------------------------------------------------------- 1 | # Example of a more elaborated shell.nix 2 | # It installs the cplot python package, which is not in the nixpkgs, 3 | # and so are not two of its dependencies. 4 | 5 | with import {}; 6 | 7 | ( let 8 | my_matplotx = pkgs.python3Packages.buildPythonPackage rec { 9 | format = "pyproject"; 10 | pname = "matplotx"; 11 | version = "0.3.7"; 12 | 13 | src = python3.pkgs.fetchPypi { 14 | inherit pname version; 15 | sha256 = "a003f9a2e463720ced8062fac543d0087c6c2beedc75072679841c68bd8471a6"; 16 | }; 17 | 18 | doCheck = false; 19 | buildInputs = [ pkgs.python3Packages.flit-core 20 | pkgs.python3Packages.scipy 21 | pkgs.python3Packages.pypng 22 | pkgs.python3Packages.networkx 23 | pkgs.python3Packages.matplotlib ]; 24 | propagatedBuildInputs = [ pkgs.python3Packages.matplotlib 25 | pkgs.python3Packages.pypng 26 | pkgs.python3Packages.networkx 27 | pkgs.python3Packages.scipy ]; 28 | 29 | meta = with lib; { 30 | homepage = "https://github.com/nschloe/matplotx"; 31 | description = "Improved Matplotlib library"; 32 | }; 33 | }; 34 | 35 | my_npx = pkgs.python3Packages.buildPythonPackage rec { 36 | format = "pyproject"; 37 | pname = "npx"; 38 | version = "0.1.1"; 39 | 40 | src = python3.pkgs.fetchPypi { 41 | inherit pname version; 42 | sha256 = "cce26aad91af079a721750a5bdcb5ca7435bf2feef4642afcf580d58cb151bd4"; 43 | }; 44 | 45 | doCheck = false; 46 | buildInputs = [ pkgs.python3Packages.flit-core pkgs.python3Packages.numpy ]; 47 | propagatedBuildInputs = [ pkgs.python3Packages.numpy ]; 48 | 49 | meta = with lib; { 50 | homepage = "https://github.com/nschloe/npx"; 51 | description = "Improved Numpy library"; 52 | }; 53 | }; 54 | 55 | my_cplot = pkgs.python3Packages.buildPythonPackage rec { 56 | format = "pyproject"; 57 | pname = "cplot"; 58 | version = "0.9.1"; 59 | 60 | src = python3.pkgs.fetchPypi { 61 | inherit pname version; 62 | sha256 = "c34611d13bf009641b96193f8db1f671d5bd4e4238ace3ad4ba752697b09a631"; 63 | }; 64 | 65 | buildInputs = [ pkgs.python3Packages.flit-core 66 | my_npx 67 | my_matplotx ]; 68 | doCheck = true; 69 | 70 | meta = with lib; { 71 | homepage = "https://github.com/nschloe/cplot"; 72 | description = "Plot complex functions with style"; 73 | }; 74 | }; 75 | 76 | in pkgs.python3.buildEnv.override rec { 77 | extraLibs = [ pkgs.python3Packages.numpy pkgs.python3Packages.pyqt5 my_cplot my_npx my_matplotx ]; 78 | } 79 | 80 | ).env 81 | -------------------------------------------------------------------------------- /utils/shells/python/shell_fortls.nix: -------------------------------------------------------------------------------- 1 | with import {}; 2 | 3 | (let 4 | my_fortls = pkgs.python3Packages.buildPythonPackage rec { 5 | version = "2.12.0"; 6 | pname = "fortls"; 7 | 8 | src = python3.pkgs.fetchPypi { 9 | inherit pname version; 10 | sha256 = "4c2755a0ada0fcc18519458fbac4f4bd7dacfd4edc70f785e95a3c7d93f59ab1"; 11 | }; 12 | 13 | doCheck = false; 14 | buildInputs = [ 15 | pkgs.python3Packages.json5 16 | pkgs.python3Packages.packaging 17 | pkgs.python3Packages.importlib-metadata 18 | pkgs.python3Packages.typing-extensions 19 | ]; 20 | propagatedBuildInputs = [ 21 | pkgs.python3Packages.json5 22 | pkgs.python3Packages.packaging 23 | ]; 24 | 25 | meta = with lib; { 26 | homepage = "https://gnikit.github.io/fortls"; 27 | description = "Improved Fortran language server"; 28 | }; 29 | }; 30 | 31 | in pkgs.python3.buildEnv.override rec { 32 | extraLibs = [ my_fortls ]; 33 | } 34 | ).env 35 | 36 | -------------------------------------------------------------------------------- /utils/shells/python/shell_jedhy.nix: -------------------------------------------------------------------------------- 1 | with import {}; 2 | 3 | (let 4 | my_jedhy = pkgs.python3Packages.buildPythonPackage rec { 5 | version = "1"; 6 | pname = "jedhy"; 7 | 8 | src = python3.pkgs.fetchPypi { 9 | inherit pname version; 10 | sha256 = "0964b4a159aef450bc4783faa0b37114eb3c9f2eaa69e4b1ed7856ed398d15ab"; 11 | }; 12 | 13 | doCheck = false; 14 | buildInputs = [ 15 | pkgs.python3Packages.toolz 16 | ]; 17 | 18 | #propagatedBuildInputs = [ 19 | # pkgs.python3Packages.json5 20 | # pkgs.python3Packages.packaging 21 | #]; 22 | 23 | meta = with lib; { 24 | homepage = "https://github.com/ekaschalk/jedhy"; 25 | description = "IDE features for Hy editing."; 26 | }; 27 | }; 28 | 29 | in pkgs.python3.buildEnv.override rec { 30 | extraLibs = [ my_jedhy ]; 31 | } 32 | ).env 33 | --------------------------------------------------------------------------------