├── .envrc ├── .sops.yaml ├── LICENSE ├── README.md ├── flake.lock ├── flake.nix ├── home ├── cli.nix ├── default.nix ├── eww.nix ├── firefox.nix ├── fish.nix ├── git.nix ├── gui.nix ├── hyprland.nix ├── modules.nix ├── mpv.nix ├── nixpkgs.nix ├── nvim.nix ├── rofi.nix ├── spotify-player.nix ├── waybar.nix └── xdg.nix ├── nixos ├── boot.nix ├── config.nix ├── hardware.nix ├── packages.nix └── stylix.nix ├── pkgs ├── default.nix ├── fcitx5-fluent.nix ├── mpv-youtube-search.nix ├── plugins-nvim.nix ├── scripts.nix └── yuzu.nix └── secrets └── secrets.yaml /.envrc: -------------------------------------------------------------------------------- 1 | use_flake 2 | -------------------------------------------------------------------------------- /.sops.yaml: -------------------------------------------------------------------------------- 1 | keys: 2 | - &zen age15s6yzdcqkknkele2lw77utgze3cul8vzt9jmtvquu26mckcutslsdpm6x4 3 | creation_rules: 4 | - path_regex: secrets/[^/]+\.yaml$ 5 | key_groups: 6 | - age: 7 | - *zen 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 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.md: -------------------------------------------------------------------------------- 1 |

:snowflake: flakes with minimal abstraction :snowflake:

2 | 3 |

4 | 5 | 6 | 7 | 8 | 9 | 10 |

11 | 12 | *kiseki being my favourite game franchise*[^1] 13 | 14 | ![](https://github.com/71zenith/assets/blob/master/screenshot/stacked.png?raw=true) 15 | *picture generated with [catwalk](https://github.com/catppuccin/catwalk)* 16 | 17 |
Individual screenshots 18 | 19 | ![](https://github.com/71zenith/assets/blob/master/screenshot/screenshot25.png?raw=true) 20 | 21 | ![](https://github.com/71zenith/assets/blob/master/screenshot/workflow/1.png?raw=true) 22 | 23 | ![](https://github.com/71zenith/assets/blob/master/screenshot/workflow/2.png?raw=true) 24 | 25 | ![](https://github.com/71zenith/assets/blob/master/screenshot/workflow/3.png?raw=true) 26 | 27 | ![](https://github.com/71zenith/assets/blob/master/screenshot/workflow/4.png?raw=true) 28 | 29 | ![](https://github.com/71zenith/assets/blob/master/screenshot/workflow/5.png?raw=true) 30 | 31 | ![](https://github.com/71zenith/assets/blob/master/screenshot/workflow/6.png?raw=true) 32 |
33 | 34 | previous iterations are in [assets/screenshot](https://github.com/71zenith/assets/tree/master/screenshot). 35 | 36 | wallpapers are in [assets/active](https://github.com/71zenith/assets/tree/master/active). 37 | 38 | ## Highlights 39 | 40 | - ⚙️ [flakes](https://wiki.nixos.org/wiki/Flakes) setup 41 | - 🎨 [oxocarbonified](https://github.com/nyoom-engineering/base16-oxocarbon) system with [stylix](https://github.com/danth/stylix) 42 | - 🏠 custom [home-manager](https://github.com/nix-community/home-manager) modules for [satty](https://github.com/gabm/Satty) and [sptlrx](https://github.com/raitonoberu/sptlrx) 43 | - 📝 nixified vim with [nixvim](https://github.com/nix-community/nixvim) 44 | - 🔑 passwords/secrets with [sops-nix](https://github.com/Mic92/sops-nix) 45 | - 🎼 [spotify-player](https://github.com/aome510/spotify-player) with [waybar](https://github.com/Alexays/Waybar) cover image and progress bar 46 | - 📊 [glava](https://github.com/jarcode-foss/glava) with cover image palette and [eww](https://github.com/elkowar/eww) synced lyrics(with romaji) widget 47 | - 🌐 hardened [firefox](https://www.mozilla.org/en-US/firefox/) with custom css and declarative config 48 | - 🚀 [rofi](https://github.com/davatorium/rofi) scripts for vpn, clipboard/wallpaper with images, and color palette 49 | - 🈂️ shell scripts to copy/download video from sites, [OCR](https://github.com/tesseract-ocr/tesseract) and [translating text](https://github.com/soimort/translate-shell) 50 | - 🐚 [zsh](http://www.zsh.org) and [foot](https://codeberg.org/dnkl/foot) setup to select command output, select files from screen. 51 | - ▶️ [mpv](https://github.com/mpv-player/mpv) with upscaling, youtube helper scripts and fancy ui 52 | 53 |
Detailed Software usage 54 | 55 | ## Nix components 56 | 57 | | Name | Description | 58 | |------------------------------------------------------------------------|-----------------------------| 59 | | [flakes](https://wiki.nixos.org/wiki/Flakes) | nix lifeline | 60 | | [home-manager](https://github.com/nix-community/home-manager) | dotfiles manager | 61 | | [stylix](https://github.com/danth/stylix) | auto themer | 62 | | [nixvim](https://github.com/nix-community/nixvim) | nvim config in nix | 63 | | [nh](https://github.com/viperML/nh) | nix helper | 64 | | [sops-nix](https://github.com/Mic92/sops-nix) | secrets manager | 65 | | [nix-output-monitor](https://github.com/maralorn/nix-output-monitor) | fancy nix output | 66 | | [direnv](https://github.com/nix-community/nix-direnv) | auto env switcher | 67 | 68 | ## Programs 69 | 70 | | Name | Description | 71 | |----------------------------------------------------------------|-------------------------| 72 | | [hyprland](https://github.com/hyprwm/Hyprland) | compositor | 73 | | [hyprlock](https://github.com/hyprwm/hyprlock) | lock screen | 74 | | [firefox](https://www.mozilla.org/en-US/firefox/) | web browser | 75 | | [foot](https://codeberg.org/dnkl/foot) | terminal | 76 | | [zathura](https://pwmt.org/projects/zathura) | pdf/epub viewer | 77 | | [waybar](https://github.com/Alexays/Waybar) | status bar | 78 | | [mpv](https://github.com/mpv-player/mpv) | media player (da goat) | 79 | | [eww](https://github.com/elkowar/eww) | widgets | 80 | | [rofi](https://github.com/davatorium/rofi) | custom launcher | 81 | | [calibre](https://github.com/kovidgoyal/calibre) | ebook manager | 82 | | [fcitx5](https://github.com/fcitx/fcitx5) | japanese input | 83 | | [mako](https://github.com/emersion/mako) | notification daemon | 84 | | [nautilus](https://gitlab.gnome.org/GNOME/nautilus) | gui file manager | 85 | | [neovim](https://github.com/neovim/neovim) | main text editor | 86 | | [sptlrx](https://github.com/raitonoberu/sptlrx) | lyrics tui | 87 | | [fzf](https://github.com/junegunn/fzf) | fuzzy finder | 88 | | [glava](https://github.com/jarcode-foss/glava) | audio visualizer | 89 | | [zsh](http://www.zsh.org) | shell | 90 | | [spotify-player](https://github.com/aome510/spotify-player) | spotify tui (love it) | 91 | | [yazi](https://github.com/sxyazi/yazi) | tui file manager | 92 | | [btop](https://github.com/aristocratos/btop) | resource monitor | 93 | 94 | ## Rusty tools 95 | 96 | | Name | Description | 97 | |----------------------------------------------------|----------------| 98 | | [eza](https://github.com/eza-community/eza) | ls alter | 99 | | [xcp](https://github.com/tarka/xcp) | cp alter | 100 | | [duf](https://github.com/muesli/duf) | df alter | 101 | | [zoxide](https://github.com/ajeetdsouza/zoxide) | smarter cd | 102 | | [dust](https://github.com/bootandy/dust) | du alter | 103 | | [fd](https://github.com/sharkdp/fd) | find alter | 104 | | [rg](https://github.com/BurstSushi/ripgrep) | grep alter | 105 | | [sd](https://github.com/chmln/sd) | sed alter | 106 | 107 |
108 | 109 | ## Standardised config 110 | 111 | | Name | Description | 112 | |-----------------------------------------------------------------------------|------------------------------------| 113 | | [oxocarbon](https://github.com/nyoom-engineering/base16-oxocarbon) | base16 theme | 114 | | [zenbones-proto](https://github.com/zenbones-theme/zenbones-mono) | monospace font | 115 | | [kollektif](https://unblast.com/kollektif-sans-typeface/) | "everything else" font | 116 | | [yutapon-coding](https://vector.co.jp/soft/dl/win95/writing/se416234.html) | "everything else" font for weebs | 117 | | [noto-color-emoji](https://fonts.google.com/specimen/Noto+Color+Emoji) | "everything else" font for normies | 118 | | [rampart-one](https://www.freejapanesefont.com/rampart-one-download/) | "stylized" font for weebs | 119 | | [kaushan-script](https://fonts.google.com/specimen/Kaushan+Script) | "stylized" font | 120 | | [typo-deco](https://eng.m.fontke.com/font/14781710/) | "stylized" font for korean | 121 | 122 | ## Resources 123 | 124 | - standard nix stuff: [nixoswiki](https://wiki.nixos.org), [zero-to-nix](https://zero-to-nix.com), [discourse](https://discourse.nixos.org/). 125 | - configs: [notashelf](https://github.com/notashelf/nyx), [diniamo](https://github.com/diniamo/niqs), [fufexan](https://github.com/fufexan/dotfiles), and anything that comes on [gh search](https://github.com/search?q=nix+dotfiles+lang%3ANix+&type=repositories). 126 | 127 | [^1]: https://www.falcom.co.jp/kiseki 128 | -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "assets": { 4 | "inputs": { 5 | "flake-utils": [ 6 | "flake-utils" 7 | ], 8 | "nixpkgs": [ 9 | "nixpkgs" 10 | ] 11 | }, 12 | "locked": { 13 | "lastModified": 1737435996, 14 | "narHash": "sha256-b4sVhpQVCJX+OGNxuyeSZizPJbOxN/A7mNn5qabXlpw=", 15 | "owner": "71zenith", 16 | "repo": "assets", 17 | "rev": "0bbae04f556ab60208caff053bf38a1fd241603a", 18 | "type": "github" 19 | }, 20 | "original": { 21 | "owner": "71zenith", 22 | "repo": "assets", 23 | "type": "github" 24 | } 25 | }, 26 | "base16": { 27 | "inputs": { 28 | "fromYaml": "fromYaml" 29 | }, 30 | "locked": { 31 | "lastModified": 1732200724, 32 | "narHash": "sha256-+R1BH5wHhfnycySb7Sy5KbYEaTJZWm1h+LW1OtyhiTs=", 33 | "owner": "SenchoPens", 34 | "repo": "base16.nix", 35 | "rev": "153d52373b0fb2d343592871009a286ec8837aec", 36 | "type": "github" 37 | }, 38 | "original": { 39 | "owner": "SenchoPens", 40 | "repo": "base16.nix", 41 | "type": "github" 42 | } 43 | }, 44 | "base16-fish": { 45 | "flake": false, 46 | "locked": { 47 | "lastModified": 1622559957, 48 | "narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=", 49 | "owner": "tomyun", 50 | "repo": "base16-fish", 51 | "rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe", 52 | "type": "github" 53 | }, 54 | "original": { 55 | "owner": "tomyun", 56 | "repo": "base16-fish", 57 | "type": "github" 58 | } 59 | }, 60 | "base16-helix": { 61 | "flake": false, 62 | "locked": { 63 | "lastModified": 1736852337, 64 | "narHash": "sha256-esD42YdgLlEh7koBrSqcT7p2fsMctPAcGl/+2sYJa2o=", 65 | "owner": "tinted-theming", 66 | "repo": "base16-helix", 67 | "rev": "03860521c40b0b9c04818f2218d9cc9efc21e7a5", 68 | "type": "github" 69 | }, 70 | "original": { 71 | "owner": "tinted-theming", 72 | "repo": "base16-helix", 73 | "type": "github" 74 | } 75 | }, 76 | "base16-vim": { 77 | "flake": false, 78 | "locked": { 79 | "lastModified": 1732806396, 80 | "narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=", 81 | "owner": "tinted-theming", 82 | "repo": "base16-vim", 83 | "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", 84 | "type": "github" 85 | }, 86 | "original": { 87 | "owner": "tinted-theming", 88 | "repo": "base16-vim", 89 | "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", 90 | "type": "github" 91 | } 92 | }, 93 | "firefox-addons": { 94 | "inputs": { 95 | "flake-utils": [ 96 | "flake-utils" 97 | ], 98 | "nixpkgs": [ 99 | "nixpkgs" 100 | ] 101 | }, 102 | "locked": { 103 | "dir": "pkgs/firefox-addons", 104 | "lastModified": 1740888229, 105 | "narHash": "sha256-1MU1oKjUuClivWTvJRIdWphLRoY8EByHgt2nr4IpwtA=", 106 | "owner": "rycee", 107 | "repo": "nur-expressions", 108 | "rev": "1e46c2a53468ce23870a510123f5c4b4702f16b1", 109 | "type": "gitlab" 110 | }, 111 | "original": { 112 | "dir": "pkgs/firefox-addons", 113 | "owner": "rycee", 114 | "repo": "nur-expressions", 115 | "type": "gitlab" 116 | } 117 | }, 118 | "firefox-gnome-theme": { 119 | "flake": false, 120 | "locked": { 121 | "lastModified": 1739223196, 122 | "narHash": "sha256-vAxN2f3rvl5q62gQQjZGVSvF93nAsOxntuFz+e/655w=", 123 | "owner": "rafaelmardojai", 124 | "repo": "firefox-gnome-theme", 125 | "rev": "a89108e6272426f4eddd93ba17d0ea101c34fb21", 126 | "type": "github" 127 | }, 128 | "original": { 129 | "owner": "rafaelmardojai", 130 | "repo": "firefox-gnome-theme", 131 | "type": "github" 132 | } 133 | }, 134 | "flake-compat": { 135 | "locked": { 136 | "lastModified": 1733328505, 137 | "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", 138 | "owner": "edolstra", 139 | "repo": "flake-compat", 140 | "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", 141 | "type": "github" 142 | }, 143 | "original": { 144 | "owner": "edolstra", 145 | "repo": "flake-compat", 146 | "type": "github" 147 | } 148 | }, 149 | "flake-parts": { 150 | "inputs": { 151 | "nixpkgs-lib": "nixpkgs-lib" 152 | }, 153 | "locked": { 154 | "lastModified": 1740872218, 155 | "narHash": "sha256-ZaMw0pdoUKigLpv9HiNDH2Pjnosg7NBYMJlHTIsHEUo=", 156 | "owner": "hercules-ci", 157 | "repo": "flake-parts", 158 | "rev": "3876f6b87db82f33775b1ef5ea343986105db764", 159 | "type": "github" 160 | }, 161 | "original": { 162 | "owner": "hercules-ci", 163 | "repo": "flake-parts", 164 | "type": "github" 165 | } 166 | }, 167 | "flake-parts_2": { 168 | "inputs": { 169 | "nixpkgs-lib": [ 170 | "nixvim", 171 | "nixpkgs" 172 | ] 173 | }, 174 | "locked": { 175 | "lastModified": 1738453229, 176 | "narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=", 177 | "owner": "hercules-ci", 178 | "repo": "flake-parts", 179 | "rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd", 180 | "type": "github" 181 | }, 182 | "original": { 183 | "owner": "hercules-ci", 184 | "repo": "flake-parts", 185 | "type": "github" 186 | } 187 | }, 188 | "flake-parts_3": { 189 | "inputs": { 190 | "nixpkgs-lib": [ 191 | "stylix", 192 | "nur", 193 | "nixpkgs" 194 | ] 195 | }, 196 | "locked": { 197 | "lastModified": 1733312601, 198 | "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", 199 | "owner": "hercules-ci", 200 | "repo": "flake-parts", 201 | "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", 202 | "type": "github" 203 | }, 204 | "original": { 205 | "owner": "hercules-ci", 206 | "repo": "flake-parts", 207 | "type": "github" 208 | } 209 | }, 210 | "flake-programs-sqlite": { 211 | "inputs": { 212 | "nixpkgs": [ 213 | "nixpkgs" 214 | ], 215 | "utils": [ 216 | "flake-utils" 217 | ] 218 | }, 219 | "locked": { 220 | "lastModified": 1740853815, 221 | "narHash": "sha256-y+vIr4Vn3Uu35kdGpZwkIiI/55b3HI1x8TrvbbTaLjA=", 222 | "owner": "wamserma", 223 | "repo": "flake-programs-sqlite", 224 | "rev": "0f1a9a36f00b15af1d3b9e4a531a893e9da77125", 225 | "type": "github" 226 | }, 227 | "original": { 228 | "owner": "wamserma", 229 | "repo": "flake-programs-sqlite", 230 | "type": "github" 231 | } 232 | }, 233 | "flake-utils": { 234 | "inputs": { 235 | "systems": "systems" 236 | }, 237 | "locked": { 238 | "lastModified": 1731533236, 239 | "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", 240 | "owner": "numtide", 241 | "repo": "flake-utils", 242 | "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", 243 | "type": "github" 244 | }, 245 | "original": { 246 | "owner": "numtide", 247 | "repo": "flake-utils", 248 | "type": "github" 249 | } 250 | }, 251 | "flake-utils_2": { 252 | "inputs": { 253 | "systems": "systems_2" 254 | }, 255 | "locked": { 256 | "lastModified": 1731533236, 257 | "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", 258 | "owner": "numtide", 259 | "repo": "flake-utils", 260 | "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", 261 | "type": "github" 262 | }, 263 | "original": { 264 | "owner": "numtide", 265 | "repo": "flake-utils", 266 | "type": "github" 267 | } 268 | }, 269 | "fromYaml": { 270 | "flake": false, 271 | "locked": { 272 | "lastModified": 1731966426, 273 | "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=", 274 | "owner": "SenchoPens", 275 | "repo": "fromYaml", 276 | "rev": "106af9e2f715e2d828df706c386a685698f3223b", 277 | "type": "github" 278 | }, 279 | "original": { 280 | "owner": "SenchoPens", 281 | "repo": "fromYaml", 282 | "type": "github" 283 | } 284 | }, 285 | "git-hooks": { 286 | "inputs": { 287 | "flake-compat": [ 288 | "stylix", 289 | "flake-compat" 290 | ], 291 | "gitignore": "gitignore", 292 | "nixpkgs": [ 293 | "stylix", 294 | "nixpkgs" 295 | ] 296 | }, 297 | "locked": { 298 | "lastModified": 1737465171, 299 | "narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=", 300 | "owner": "cachix", 301 | "repo": "git-hooks.nix", 302 | "rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17", 303 | "type": "github" 304 | }, 305 | "original": { 306 | "owner": "cachix", 307 | "repo": "git-hooks.nix", 308 | "type": "github" 309 | } 310 | }, 311 | "gitignore": { 312 | "inputs": { 313 | "nixpkgs": [ 314 | "stylix", 315 | "git-hooks", 316 | "nixpkgs" 317 | ] 318 | }, 319 | "locked": { 320 | "lastModified": 1709087332, 321 | "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", 322 | "owner": "hercules-ci", 323 | "repo": "gitignore.nix", 324 | "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", 325 | "type": "github" 326 | }, 327 | "original": { 328 | "owner": "hercules-ci", 329 | "repo": "gitignore.nix", 330 | "type": "github" 331 | } 332 | }, 333 | "gnome-shell": { 334 | "flake": false, 335 | "locked": { 336 | "lastModified": 1732369855, 337 | "narHash": "sha256-JhUWbcYPjHO3Xs3x9/Z9RuqXbcp5yhPluGjwsdE2GMg=", 338 | "owner": "GNOME", 339 | "repo": "gnome-shell", 340 | "rev": "dadd58f630eeea41d645ee225a63f719390829dc", 341 | "type": "github" 342 | }, 343 | "original": { 344 | "owner": "GNOME", 345 | "ref": "47.2", 346 | "repo": "gnome-shell", 347 | "type": "github" 348 | } 349 | }, 350 | "home-manager": { 351 | "inputs": { 352 | "nixpkgs": [ 353 | "nixpkgs" 354 | ] 355 | }, 356 | "locked": { 357 | "lastModified": 1740845322, 358 | "narHash": "sha256-AXEgFj3C0YJhu9k1OhbRhiA6FnDr81dQZ65U3DhaWpw=", 359 | "owner": "nix-community", 360 | "repo": "home-manager", 361 | "rev": "fcac3d6d88302a5e64f6cb8014ac785e08874c8d", 362 | "type": "github" 363 | }, 364 | "original": { 365 | "owner": "nix-community", 366 | "repo": "home-manager", 367 | "type": "github" 368 | } 369 | }, 370 | "hosts": { 371 | "inputs": { 372 | "nixpkgs": [ 373 | "nixpkgs" 374 | ] 375 | }, 376 | "locked": { 377 | "lastModified": 1740888205, 378 | "narHash": "sha256-1LcNP9KBeUaeD6agnrQJOD0UN4GFMW9Rn86BjcH0yQ4=", 379 | "owner": "StevenBlack", 380 | "repo": "hosts", 381 | "rev": "299151a32d8cda95714ff7ad928fc5e8568f3988", 382 | "type": "github" 383 | }, 384 | "original": { 385 | "owner": "StevenBlack", 386 | "repo": "hosts", 387 | "type": "github" 388 | } 389 | }, 390 | "ixx": { 391 | "inputs": { 392 | "flake-utils": [ 393 | "nixvim", 394 | "nuschtosSearch", 395 | "flake-utils" 396 | ], 397 | "nixpkgs": [ 398 | "nixvim", 399 | "nuschtosSearch", 400 | "nixpkgs" 401 | ] 402 | }, 403 | "locked": { 404 | "lastModified": 1729958008, 405 | "narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=", 406 | "owner": "NuschtOS", 407 | "repo": "ixx", 408 | "rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb", 409 | "type": "github" 410 | }, 411 | "original": { 412 | "owner": "NuschtOS", 413 | "ref": "v0.0.6", 414 | "repo": "ixx", 415 | "type": "github" 416 | } 417 | }, 418 | "nix-gaming": { 419 | "inputs": { 420 | "flake-parts": "flake-parts", 421 | "nixpkgs": [ 422 | "nixpkgs" 423 | ] 424 | }, 425 | "locked": { 426 | "lastModified": 1740879783, 427 | "narHash": "sha256-qcev0BeRGEKHJ9KoKnVyZVIgGhnhLSbSjKVXPoFOyFg=", 428 | "owner": "fufexan", 429 | "repo": "nix-gaming", 430 | "rev": "d8f2ee44e0038a1b90f4dd381e9f31fe1c112f1a", 431 | "type": "github" 432 | }, 433 | "original": { 434 | "owner": "fufexan", 435 | "repo": "nix-gaming", 436 | "type": "github" 437 | } 438 | }, 439 | "nixpkgs": { 440 | "locked": { 441 | "lastModified": 1740695751, 442 | "narHash": "sha256-D+R+kFxy1KsheiIzkkx/6L63wEHBYX21OIwlFV8JvDs=", 443 | "owner": "nixos", 444 | "repo": "nixpkgs", 445 | "rev": "6313551cd05425cd5b3e63fe47dbc324eabb15e4", 446 | "type": "github" 447 | }, 448 | "original": { 449 | "owner": "nixos", 450 | "ref": "nixos-unstable", 451 | "repo": "nixpkgs", 452 | "type": "github" 453 | } 454 | }, 455 | "nixpkgs-lib": { 456 | "locked": { 457 | "lastModified": 1740872140, 458 | "narHash": "sha256-3wHafybyRfpUCLoE8M+uPVZinImg3xX+Nm6gEfN3G8I=", 459 | "type": "tarball", 460 | "url": "https://github.com/NixOS/nixpkgs/archive/6d3702243441165a03f699f64416f635220f4f15.tar.gz" 461 | }, 462 | "original": { 463 | "type": "tarball", 464 | "url": "https://github.com/NixOS/nixpkgs/archive/6d3702243441165a03f699f64416f635220f4f15.tar.gz" 465 | } 466 | }, 467 | "nixpkgs-stable": { 468 | "locked": { 469 | "lastModified": 1740743217, 470 | "narHash": "sha256-brsCRzLqimpyhORma84c3W2xPbIidZlIc3JGIuQVSNI=", 471 | "owner": "nixos", 472 | "repo": "nixpkgs", 473 | "rev": "b27ba4eb322d9d2bf2dc9ada9fd59442f50c8d7c", 474 | "type": "github" 475 | }, 476 | "original": { 477 | "owner": "nixos", 478 | "ref": "nixos-24.11", 479 | "repo": "nixpkgs", 480 | "type": "github" 481 | } 482 | }, 483 | "nixpkgs_2": { 484 | "locked": { 485 | "lastModified": 1735471104, 486 | "narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=", 487 | "owner": "nixos", 488 | "repo": "nixpkgs", 489 | "rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4", 490 | "type": "github" 491 | }, 492 | "original": { 493 | "owner": "nixos", 494 | "ref": "nixos-unstable", 495 | "repo": "nixpkgs", 496 | "type": "github" 497 | } 498 | }, 499 | "nixvim": { 500 | "inputs": { 501 | "flake-parts": "flake-parts_2", 502 | "nixpkgs": [ 503 | "nixpkgs" 504 | ], 505 | "nuschtosSearch": "nuschtosSearch" 506 | }, 507 | "locked": { 508 | "lastModified": 1740520037, 509 | "narHash": "sha256-TpZMYjOre+6GhKDVHFwoW2iBWqpNQppQTuqIAo+OBV8=", 510 | "owner": "nix-community", 511 | "repo": "nixvim", 512 | "rev": "6f8d8f7aee84f377f52c8bb58385015f9168a666", 513 | "type": "github" 514 | }, 515 | "original": { 516 | "owner": "nix-community", 517 | "repo": "nixvim", 518 | "type": "github" 519 | } 520 | }, 521 | "nur": { 522 | "inputs": { 523 | "flake-parts": "flake-parts_3", 524 | "nixpkgs": [ 525 | "stylix", 526 | "nixpkgs" 527 | ], 528 | "treefmt-nix": "treefmt-nix" 529 | }, 530 | "locked": { 531 | "lastModified": 1740408283, 532 | "narHash": "sha256-2xECnhgF3MU9YjmvOkrRp8wRFo2OjjewgCtlfckhL5s=", 533 | "owner": "nix-community", 534 | "repo": "NUR", 535 | "rev": "496a4a11162bdffb9a7b258942de138873f019f7", 536 | "type": "github" 537 | }, 538 | "original": { 539 | "owner": "nix-community", 540 | "repo": "NUR", 541 | "type": "github" 542 | } 543 | }, 544 | "nuschtosSearch": { 545 | "inputs": { 546 | "flake-utils": "flake-utils_2", 547 | "ixx": "ixx", 548 | "nixpkgs": [ 549 | "nixvim", 550 | "nixpkgs" 551 | ] 552 | }, 553 | "locked": { 554 | "lastModified": 1738508923, 555 | "narHash": "sha256-4DaDrQDAIxlWhTjH6h/+xfG05jt3qDZrZE/7zDLQaS4=", 556 | "owner": "NuschtOS", 557 | "repo": "search", 558 | "rev": "86e2038290859006e05ca7201425ea5b5de4aecb", 559 | "type": "github" 560 | }, 561 | "original": { 562 | "owner": "NuschtOS", 563 | "repo": "search", 564 | "type": "github" 565 | } 566 | }, 567 | "root": { 568 | "inputs": { 569 | "assets": "assets", 570 | "firefox-addons": "firefox-addons", 571 | "flake-programs-sqlite": "flake-programs-sqlite", 572 | "flake-utils": "flake-utils", 573 | "home-manager": "home-manager", 574 | "hosts": "hosts", 575 | "nix-gaming": "nix-gaming", 576 | "nixpkgs": "nixpkgs", 577 | "nixpkgs-stable": "nixpkgs-stable", 578 | "nixvim": "nixvim", 579 | "sops-nix": "sops-nix", 580 | "stylix": "stylix", 581 | "zen-browser": "zen-browser" 582 | } 583 | }, 584 | "sops-nix": { 585 | "inputs": { 586 | "nixpkgs": [ 587 | "nixpkgs" 588 | ] 589 | }, 590 | "locked": { 591 | "lastModified": 1739262228, 592 | "narHash": "sha256-7JAGezJ0Dn5qIyA2+T4Dt/xQgAbhCglh6lzCekTVMeU=", 593 | "owner": "Mic92", 594 | "repo": "sops-nix", 595 | "rev": "07af005bb7d60c7f118d9d9f5530485da5d1e975", 596 | "type": "github" 597 | }, 598 | "original": { 599 | "owner": "Mic92", 600 | "repo": "sops-nix", 601 | "type": "github" 602 | } 603 | }, 604 | "stylix": { 605 | "inputs": { 606 | "base16": "base16", 607 | "base16-fish": "base16-fish", 608 | "base16-helix": "base16-helix", 609 | "base16-vim": "base16-vim", 610 | "firefox-gnome-theme": "firefox-gnome-theme", 611 | "flake-compat": "flake-compat", 612 | "flake-utils": [ 613 | "flake-utils" 614 | ], 615 | "git-hooks": "git-hooks", 616 | "gnome-shell": "gnome-shell", 617 | "home-manager": [ 618 | "home-manager" 619 | ], 620 | "nixpkgs": [ 621 | "nixpkgs" 622 | ], 623 | "nur": "nur", 624 | "systems": "systems_3", 625 | "tinted-foot": "tinted-foot", 626 | "tinted-kitty": "tinted-kitty", 627 | "tinted-schemes": "tinted-schemes", 628 | "tinted-tmux": "tinted-tmux", 629 | "tinted-zed": "tinted-zed" 630 | }, 631 | "locked": { 632 | "lastModified": 1740769934, 633 | "narHash": "sha256-iyxUwII/NQNClT77VqQiDpaXJz1r0Z8tNVxgY64mLak=", 634 | "owner": "danth", 635 | "repo": "stylix", 636 | "rev": "de4ee5899042801b62f988687acd454d4d411075", 637 | "type": "github" 638 | }, 639 | "original": { 640 | "owner": "danth", 641 | "repo": "stylix", 642 | "type": "github" 643 | } 644 | }, 645 | "systems": { 646 | "locked": { 647 | "lastModified": 1681028828, 648 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 649 | "owner": "nix-systems", 650 | "repo": "default", 651 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 652 | "type": "github" 653 | }, 654 | "original": { 655 | "owner": "nix-systems", 656 | "repo": "default", 657 | "type": "github" 658 | } 659 | }, 660 | "systems_2": { 661 | "locked": { 662 | "lastModified": 1681028828, 663 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 664 | "owner": "nix-systems", 665 | "repo": "default", 666 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 667 | "type": "github" 668 | }, 669 | "original": { 670 | "owner": "nix-systems", 671 | "repo": "default", 672 | "type": "github" 673 | } 674 | }, 675 | "systems_3": { 676 | "locked": { 677 | "lastModified": 1681028828, 678 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 679 | "owner": "nix-systems", 680 | "repo": "default", 681 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 682 | "type": "github" 683 | }, 684 | "original": { 685 | "owner": "nix-systems", 686 | "repo": "default", 687 | "type": "github" 688 | } 689 | }, 690 | "tinted-foot": { 691 | "flake": false, 692 | "locked": { 693 | "lastModified": 1726913040, 694 | "narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=", 695 | "owner": "tinted-theming", 696 | "repo": "tinted-foot", 697 | "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", 698 | "type": "github" 699 | }, 700 | "original": { 701 | "owner": "tinted-theming", 702 | "repo": "tinted-foot", 703 | "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", 704 | "type": "github" 705 | } 706 | }, 707 | "tinted-kitty": { 708 | "flake": false, 709 | "locked": { 710 | "lastModified": 1716423189, 711 | "narHash": "sha256-2xF3sH7UIwegn+2gKzMpFi3pk5DlIlM18+vj17Uf82U=", 712 | "owner": "tinted-theming", 713 | "repo": "tinted-kitty", 714 | "rev": "eb39e141db14baef052893285df9f266df041ff8", 715 | "type": "github" 716 | }, 717 | "original": { 718 | "owner": "tinted-theming", 719 | "repo": "tinted-kitty", 720 | "rev": "eb39e141db14baef052893285df9f266df041ff8", 721 | "type": "github" 722 | } 723 | }, 724 | "tinted-schemes": { 725 | "flake": false, 726 | "locked": { 727 | "lastModified": 1740351358, 728 | "narHash": "sha256-Hdk850xgAd3DL8KX0AbyU7tC834d3Lej1jOo3duWiOA=", 729 | "owner": "tinted-theming", 730 | "repo": "schemes", 731 | "rev": "a1bc2bd89e693e7e3f5764cfe8114e2ae150e184", 732 | "type": "github" 733 | }, 734 | "original": { 735 | "owner": "tinted-theming", 736 | "repo": "schemes", 737 | "type": "github" 738 | } 739 | }, 740 | "tinted-tmux": { 741 | "flake": false, 742 | "locked": { 743 | "lastModified": 1740272597, 744 | "narHash": "sha256-/etfUV3HzAaLW3RSJVwUaW8ULbMn3v6wbTlXSKbcoWQ=", 745 | "owner": "tinted-theming", 746 | "repo": "tinted-tmux", 747 | "rev": "b6c7f46c8718cc484f2db8b485b06e2a98304cd0", 748 | "type": "github" 749 | }, 750 | "original": { 751 | "owner": "tinted-theming", 752 | "repo": "tinted-tmux", 753 | "type": "github" 754 | } 755 | }, 756 | "tinted-zed": { 757 | "flake": false, 758 | "locked": { 759 | "lastModified": 1725758778, 760 | "narHash": "sha256-8P1b6mJWyYcu36WRlSVbuj575QWIFZALZMTg5ID/sM4=", 761 | "owner": "tinted-theming", 762 | "repo": "base16-zed", 763 | "rev": "122c9e5c0e6f27211361a04fae92df97940eccf9", 764 | "type": "github" 765 | }, 766 | "original": { 767 | "owner": "tinted-theming", 768 | "repo": "base16-zed", 769 | "type": "github" 770 | } 771 | }, 772 | "treefmt-nix": { 773 | "inputs": { 774 | "nixpkgs": [ 775 | "stylix", 776 | "nur", 777 | "nixpkgs" 778 | ] 779 | }, 780 | "locked": { 781 | "lastModified": 1733222881, 782 | "narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=", 783 | "owner": "numtide", 784 | "repo": "treefmt-nix", 785 | "rev": "49717b5af6f80172275d47a418c9719a31a78b53", 786 | "type": "github" 787 | }, 788 | "original": { 789 | "owner": "numtide", 790 | "repo": "treefmt-nix", 791 | "type": "github" 792 | } 793 | }, 794 | "zen-browser": { 795 | "inputs": { 796 | "nixpkgs": "nixpkgs_2" 797 | }, 798 | "locked": { 799 | "lastModified": 1740554227, 800 | "narHash": "sha256-xpwZeMw2gGenixGQDyVv+ja+epcR+EJ1BPuGFdgFS18=", 801 | "owner": "0xc000022070", 802 | "repo": "zen-browser-flake", 803 | "rev": "7de16ae319e6f6852274fa90b0d41c00049767c9", 804 | "type": "github" 805 | }, 806 | "original": { 807 | "owner": "0xc000022070", 808 | "repo": "zen-browser-flake", 809 | "type": "github" 810 | } 811 | } 812 | }, 813 | "root": "root", 814 | "version": 7 815 | } 816 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "crossbell cathedral"; 3 | 4 | inputs = { 5 | nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; 6 | nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11"; 7 | flake-utils.url = "github:numtide/flake-utils"; 8 | home-manager = { 9 | url = "github:nix-community/home-manager"; 10 | inputs.nixpkgs.follows = "nixpkgs"; 11 | }; 12 | stylix = { 13 | url = "github:danth/stylix"; 14 | inputs = { 15 | nixpkgs.follows = "nixpkgs"; 16 | home-manager.follows = "home-manager"; 17 | flake-utils.follows = "flake-utils"; 18 | }; 19 | }; 20 | nixvim = { 21 | url = "github:nix-community/nixvim"; 22 | inputs.nixpkgs.follows = "nixpkgs"; 23 | }; 24 | hosts = { 25 | url = "github:StevenBlack/hosts"; 26 | inputs.nixpkgs.follows = "nixpkgs"; 27 | }; 28 | sops-nix = { 29 | url = "github:Mic92/sops-nix"; 30 | inputs.nixpkgs.follows = "nixpkgs"; 31 | }; 32 | zen-browser.url = "github:0xc000022070/zen-browser-flake"; 33 | flake-programs-sqlite = { 34 | url = "github:wamserma/flake-programs-sqlite"; 35 | inputs = { 36 | nixpkgs.follows = "nixpkgs"; 37 | utils.follows = "flake-utils"; 38 | }; 39 | }; 40 | firefox-addons = { 41 | url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; 42 | inputs = { 43 | nixpkgs.follows = "nixpkgs"; 44 | flake-utils.follows = "flake-utils"; 45 | }; 46 | }; 47 | nix-gaming = { 48 | url = "github:fufexan/nix-gaming"; 49 | inputs.nixpkgs.follows = "nixpkgs"; 50 | }; 51 | ### MY FLAKES ### 52 | assets = { 53 | url = "github:71zenith/assets"; 54 | inputs = { 55 | nixpkgs.follows = "nixpkgs"; 56 | flake-utils.follows = "flake-utils"; 57 | }; 58 | }; 59 | }; 60 | outputs = { 61 | nixpkgs, 62 | nixpkgs-stable, 63 | ... 64 | } @ inputs: let 65 | ### NOTE: DECLARE USER ### 66 | pcName = "izanagi"; 67 | myUserName = "zen"; 68 | mailId = "71zenith@proton.me"; 69 | 70 | system = "x86_64-linux"; 71 | pkgs = import nixpkgs {inherit system;}; 72 | pkgs-stable = import nixpkgs-stable {inherit system;}; 73 | 74 | overlays = { 75 | nixpkgs.overlays = with inputs; [ 76 | assets.overlays.default 77 | (import ./pkgs) 78 | ]; 79 | }; 80 | caches = { 81 | nix.settings = { 82 | builders-use-substitutes = true; 83 | substituters = [ 84 | "https://cache.nixos.org" 85 | "https://nix-gaming.cachix.org" 86 | ]; 87 | trusted-public-keys = [ 88 | "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" 89 | "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4=" 90 | ]; 91 | }; 92 | }; 93 | in { 94 | devShell.${system} = pkgs.mkShell { 95 | packages = with pkgs; [lolcat alejandra nil deadnix statix]; 96 | shellHook = '' 97 | printf "\e[3m\e[1m%s\em\n" "1337 h4x0ring..." | lolcat 98 | ''; 99 | }; 100 | nixosConfigurations.${pcName} = nixpkgs.lib.nixosSystem { 101 | specialArgs = { 102 | inherit inputs pkgs-stable; 103 | inherit pcName myUserName mailId; 104 | }; 105 | modules = with inputs; [ 106 | caches 107 | overlays 108 | stylix.nixosModules.stylix 109 | home-manager.nixosModules.home-manager 110 | sops-nix.nixosModules.sops 111 | flake-programs-sqlite.nixosModules.programs-sqlite 112 | hosts.nixosModule 113 | (import ./nixos/config.nix) 114 | ]; 115 | }; 116 | }; 117 | } 118 | -------------------------------------------------------------------------------- /home/cli.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | lib, 5 | ... 6 | }: { 7 | imports = [ 8 | (import ./modules.nix { 9 | inherit config lib pkgs; 10 | prog = "sptlrx"; 11 | type = "yaml"; 12 | }) 13 | ]; 14 | programs = { 15 | btop = { 16 | enable = true; 17 | settings = { 18 | theme_background = false; 19 | vim_keys = true; 20 | rounded_corners = false; 21 | }; 22 | }; 23 | 24 | less = { 25 | enable = true; 26 | keys = '' 27 | h left-scroll 28 | l right-scroll 29 | ''; 30 | }; 31 | 32 | direnv = { 33 | enable = true; 34 | silent = true; 35 | nix-direnv.enable = true; 36 | }; 37 | 38 | zoxide = { 39 | enable = true; 40 | enableFishIntegration = true; 41 | options = ["--cmd cd"]; 42 | }; 43 | 44 | ripgrep = { 45 | enable = true; 46 | arguments = [ 47 | "--ignore-file=${pkgs.writeText ".ignore" '' 48 | flake.lock 49 | ''}" 50 | "-i" 51 | ]; 52 | }; 53 | 54 | fd = { 55 | enable = true; 56 | extraOptions = ["-p" "-i"]; 57 | }; 58 | 59 | bat.enable = true; 60 | 61 | eza = { 62 | enable = true; 63 | enableFishIntegration = true; 64 | git = true; 65 | icons = "always"; 66 | extraOptions = ["--hyperlink" "--no-quotes"]; 67 | }; 68 | 69 | sptlrx = { 70 | enable = true; 71 | settings = { 72 | player = "mpris"; 73 | host = "lyricsapi.vercel.app"; 74 | ignoreErrors = true; 75 | timerInterval = 200; 76 | updateInterval = 2000; 77 | style = with config.lib.stylix.colors.withHashtag; { 78 | hAlignment = "center"; 79 | before = { 80 | foreground = base03; 81 | bold = false; 82 | faint = true; 83 | }; 84 | current = { 85 | foreground = base0B; 86 | bold = true; 87 | italic = true; 88 | }; 89 | after.foreground = base03; 90 | }; 91 | mpris.players = ["spotify_player" "mpv"]; 92 | }; 93 | }; 94 | 95 | fzf = { 96 | enable = true; 97 | enableFishIntegration = true; 98 | fileWidgetCommand = "fd -E .direnv -t f"; 99 | colors.bg = lib.mkForce "-1"; 100 | }; 101 | 102 | yazi = { 103 | enable = true; 104 | enableFishIntegration = true; 105 | shellWrapperName = "ya"; 106 | keymap = { 107 | manager.prepend_keymap = [ 108 | { 109 | run = ''shell 'for path in "$@"; do echo "file://$path"; done | wl-copy -t text/uri-list' --confirm''; 110 | on = ["c" "f"]; 111 | } 112 | { 113 | run = ''shell "$SHELL" --block --confirm''; 114 | on = ["w"]; 115 | } 116 | ]; 117 | }; 118 | settings = { 119 | manager = { 120 | ratio = [1 3 3]; 121 | sort_by = "natural"; 122 | show_hidden = true; 123 | }; 124 | }; 125 | theme = { 126 | status.separator_open = ""; 127 | status.separator_close = ""; 128 | }; 129 | }; 130 | }; 131 | } 132 | -------------------------------------------------------------------------------- /home/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | config, 4 | lib, 5 | myUserName, 6 | osConfig, 7 | ... 8 | }: let 9 | scripts = import ../pkgs/scripts.nix {inherit pkgs config;}; 10 | in { 11 | stylix.targets.kde.enable = false; 12 | imports = [ 13 | ./cli.nix 14 | ./gui.nix 15 | ./mpv.nix 16 | ./fish.nix 17 | ./waybar.nix 18 | ./nvim.nix 19 | ./git.nix 20 | ./rofi.nix 21 | ./eww.nix 22 | ./xdg.nix 23 | ./firefox.nix 24 | ./spotify-player.nix 25 | ./hyprland.nix 26 | ]; 27 | 28 | # NOTE: virt-manager fix 29 | dconf = { 30 | enable = true; 31 | settings = { 32 | "org/virt-manager/virt-manager/connections" = { 33 | autoconnect = ["qemu:///system"]; 34 | uris = ["qemu:///system"]; 35 | }; 36 | }; 37 | }; 38 | 39 | home = { 40 | username = myUserName; 41 | 42 | inherit (osConfig.system) stateVersion; 43 | 44 | # NOTE: DOOM EMACS 45 | # sessionPath = ["${config.xdg.configHome}/emacs/bin"]; 46 | 47 | packages = [scripts._4khd]; 48 | 49 | sessionVariables = { 50 | MANPAGER = "less -R --use-color -Dd+m -Du+b -DP+g -DE+c -DW+y"; 51 | MANROFFOPT = "-P -c"; 52 | LESS = "-R --use-color"; 53 | DIRENV_LOG_FORMAT = ""; 54 | }; 55 | }; 56 | fonts.fontconfig = {inherit (osConfig.fonts.fontconfig) defaultFonts;}; 57 | 58 | xdg.configFile = { 59 | "nixpkgs/config.nix".source = ./nixpkgs.nix; 60 | 61 | "nsxiv/exec/key-handler".source = pkgs.writeShellScript "keyHandler" '' 62 | while read file; do 63 | case "$1" in 64 | "x") swww img -f Mitchell -t any --transition-fps 75 --transition-duration 2 "$file" 65 | ;; 66 | "c") wl-copy < "$file" && echo "Copied to clipboard" 67 | ;; 68 | "z") gimp "$file" & 69 | ;; 70 | esac 71 | done 72 | ''; 73 | }; 74 | 75 | qt = { 76 | enable = true; 77 | platformTheme.name = lib.mkForce "gtk3"; 78 | }; 79 | 80 | stylix.targets.gtk.extraCss = with config.lib.stylix.colors.withHashtag; '' 81 | @define-color accent_color ${base0A}; 82 | @define-color accent_bg_color ${base0A}; 83 | ''; 84 | 85 | gtk = rec { 86 | enable = true; 87 | iconTheme = { 88 | name = "Papirus-Dark"; 89 | package = pkgs.papirus-icon-theme.override {color = "teal";}; 90 | }; 91 | gtk3.extraConfig.gtk-xft-hinting = 1; 92 | gtk4 = {inherit (gtk3) extraConfig;}; 93 | }; 94 | 95 | xresources.properties = with config.lib.stylix.colors.withHashtag; { 96 | "bar.background" = base02; 97 | "bar.foreground" = base0B; 98 | "bar.font" = "${config.stylix.fonts.serif.name} ${toString config.stylix.fonts.sizes.desktop}"; 99 | "window.foreground" = base04; 100 | "window.background" = base02; 101 | "mark.background" = base0A; 102 | }; 103 | } 104 | -------------------------------------------------------------------------------- /home/eww.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | config, 4 | ... 5 | }: let 6 | scripts = import ../pkgs/scripts.nix {inherit pkgs config;}; 7 | genRomaji = pkgs.writeShellScript "genRomaji" '' 8 | sptlrx pipe | stdbuf -oL trans -show-translation N -show-translation-phonetics N -show-alternatives N -show-prompt-message N -show-languages N -no-auto -no-init -no-ansi | stdbuf -oL awk 'NR % 3 == 2 {printf "%s\\n\n", $0}' 9 | ''; 10 | in { 11 | xdg.configFile."eww/eww.yuck".text = with config.lib.stylix.colors.withHashtag; '' 12 | (defwindow lyrics 13 | :monitor 0 14 | :geometry (geometry :y "70px" :anchor "bottom center") 15 | :stacking "bg" 16 | (lyr)) 17 | (defwindow romaji 18 | :monitor 0 19 | :geometry (geometry :y "20px" :anchor "bottom center") 20 | :stacking "bg" 21 | (rom)) 22 | 23 | (defwidget lyr [] 24 | (box :spacing 0 25 | (button :class "btn1" 26 | :onclick "echo ''${text} | wl-copy" 27 | :onrightclick "echo ''${text} | wl-copy && setsid ${scripts.transLiner} &" 28 | :css "button {color: ''${col}; &:hover {color: ${base0B};}}" 29 | (label :text text)))) 30 | 31 | (defwidget rom [] 32 | (box :spacing 0 33 | (button :class "btn2" 34 | (label :text romaji)))) 35 | 36 | (defvar col "${base0A}") 37 | (deflisten text "sptlrx pipe") 38 | (deflisten romaji "${genRomaji}") 39 | ''; 40 | xdg.configFile."eww/eww.scss".text = with config.lib.stylix.colors.withHashtag; '' 41 | * { 42 | all: unset; 43 | margin: 20px; 44 | background-color: rgba(0,0,0,0); 45 | font-family: "Kaushan Script", "Rampart One", "Typo_Deco", "Itim"; 46 | } 47 | .btn1 { 48 | font-size: 46px; 49 | &:hover { 50 | font-size: 50px; 51 | } 52 | } 53 | .btn2 { 54 | font-size: 36px; 55 | color: ${base0F}; 56 | } 57 | ''; 58 | } 59 | -------------------------------------------------------------------------------- /home/firefox.nix: -------------------------------------------------------------------------------- 1 | { 2 | inputs, 3 | pkgs, 4 | myUserName, 5 | ... 6 | }: let 7 | betterfox = pkgs.fetchFromGitHub { 8 | owner = "yokoffing"; 9 | repo = "Betterfox"; 10 | rev = "09dd87a3abcb15a88798941e5ed74e4aa593108c"; 11 | hash = "sha256-Uu/a5t74GGvMIJP5tptqbiFiA+x2hw98irPdl8ynGoE="; 12 | }; 13 | lepton = pkgs.fetchFromGitHub { 14 | owner = "black7375"; 15 | repo = "Firefox-UI-Fix"; 16 | rev = "7d96af3abec66fc10bb412d0368b04a505199eac"; 17 | hash = "sha256-JEJnmYjY9I0I8rxYVQLMjiayk6PnKq/eptZD8GvaDBo="; 18 | }; 19 | in { 20 | stylix.targets.firefox.profileNames = [myUserName]; 21 | programs.firefox = { 22 | enable = true; 23 | nativeMessagingHosts = [pkgs.tridactyl-native]; 24 | profiles = { 25 | ${myUserName} = { 26 | id = 0; 27 | isDefault = true; 28 | name = myUserName; 29 | extensions.packages = with inputs.firefox-addons.packages.${pkgs.system}; [ 30 | refined-github 31 | sponsorblock 32 | mal-sync 33 | to-google-translate 34 | foxyproxy-standard 35 | istilldontcareaboutcookies 36 | localcdn 37 | clearurls 38 | privacy-badger 39 | don-t-fuck-with-paste 40 | skip-redirect 41 | search-by-image 42 | tridactyl 43 | ublock-origin 44 | inputs.firefox-addons.packages.${pkgs.system}."10ten-ja-reader" 45 | ]; 46 | settings = { 47 | # GENERAL 48 | "browser.startup.page" = "https://71zenith.github.io/"; 49 | "browser.display.use_document_fonts" = 0; 50 | "browser.ctrlTab.sortByRecentlyUsed" = false; 51 | "browser.theme.toolbar-theme" = 0; 52 | "general.autoScroll" = true; 53 | "extensions.autoDisableScopes" = 0; 54 | "extensions.allowPrivateBrowsingByDefault" = true; 55 | "browser.toolbars.bookmarks.visibility" = "never"; 56 | 57 | # TELEMETRY 58 | "browser.ping-centre.telemetry" = false; 59 | "devtools.onboarding.telemetry.logged" = false; 60 | "extensions.webcompat-reporter.enabled" = false; 61 | "browser.urlbar.eventTelemetry.enabled" = false; 62 | 63 | # PERFS 64 | "media.rdd-ffmpeg.enabled" = true; 65 | "widget.dmabuf.force-enabled" = true; 66 | "media.ffvpx.enabled" = false; 67 | "media.rdd-vpx.enabled" = false; 68 | 69 | # TWEAKS 70 | "browser.cache.memory.capacity" = -1; 71 | "middlemouse.paste" = false; 72 | "network.dns.echconfig.enabled" = true; 73 | "browser.tabs.loadBookmarksInTabs" = true; 74 | "browser.urlbar.maxRichResults" = true; 75 | 76 | # PRIVACY 77 | "privacy.donottrackheader.enabled" = true; 78 | "privacy.trackingprotection.enabled" = true; 79 | "privacy.trackingprotection.socialtracking.enabled" = true; 80 | "app.normandy.enabled" = false; 81 | }; 82 | 83 | bookmarks = [ 84 | { 85 | name = "nix"; 86 | toolbar = false; 87 | bookmarks = [ 88 | { 89 | name = "Nix Package"; 90 | keyword = "np"; 91 | url = "https://search.nixos.org/packages?channel=unstable"; 92 | } 93 | { 94 | name = "Nix Options"; 95 | keyword = "no"; 96 | url = "https://search.nixos.org/options?channel=unstable"; 97 | } 98 | ]; 99 | } 100 | { 101 | name = "uhh"; 102 | toolbar = false; 103 | bookmarks = [ 104 | { 105 | name = "ProtonMail"; 106 | keyword = "ma"; 107 | url = "https://mail.proton.me/"; 108 | } 109 | { 110 | name = "Anilist"; 111 | keyword = "an"; 112 | url = "https://anilist.co"; 113 | } 114 | { 115 | name = "ChatGPT"; 116 | keyword = "ch"; 117 | url = "https://chat.openai.com"; 118 | } 119 | { 120 | name = "GitHub"; 121 | keyword = "gh"; 122 | url = "https://github.com"; 123 | } 124 | { 125 | name = "Discord"; 126 | keyword = "di"; 127 | url = "https://discord.com/channels/@me"; 128 | } 129 | { 130 | name = "Element"; 131 | keyword = "el"; 132 | url = "https://app.element.io"; 133 | } 134 | { 135 | name = "Nhentai"; 136 | keyword = "nh"; 137 | url = "https://nhentai.net"; 138 | } 139 | ]; 140 | } 141 | { 142 | name = "fml"; 143 | toolbar = false; 144 | bookmarks = [ 145 | { 146 | name = "Twitter"; 147 | keyword = "tw"; 148 | url = "https://twitter.com"; 149 | } 150 | { 151 | name = "YouTube"; 152 | keyword = "yo"; 153 | url = "https://YouTube.com"; 154 | } 155 | { 156 | name = "Whatsapp"; 157 | keyword = "we"; 158 | url = "https://web.whatsapp.com"; 159 | } 160 | ]; 161 | } 162 | ]; 163 | 164 | search = { 165 | default = "Brave"; 166 | force = true; 167 | engines = { 168 | "Brave" = { 169 | urls = [{template = "https://search.brave.com/search?q={searchTerms}";}]; 170 | definedAliases = ["@b"]; 171 | iconUpdateURL = "https://brave.com/static-assets/images/brave-logo-sans-text.svg"; 172 | }; 173 | "GitHub" = { 174 | urls = [{template = "https://github.com/search?q={searchTerms}&type=code";}]; 175 | definedAliases = ["@gh"]; 176 | }; 177 | "Nix Packages" = { 178 | urls = [{template = "https://search.nixos.org/packages?channel=unstable&type=packages&query={searchTerms}";}]; 179 | icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; 180 | definedAliases = ["@np"]; 181 | }; 182 | "Nix Options" = { 183 | urls = [{template = "https://search.nixos.org/options?channel=unstable&type=packages&query={searchTerms}";}]; 184 | icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; 185 | definedAliases = ["@no"]; 186 | }; 187 | "YouTube" = { 188 | iconUpdateURL = "https://youtube.com/favicon.ico"; 189 | updateInterval = 24 * 60 * 60 * 1000; 190 | urls = [{template = "https://www.youtube.com/results?search_query={searchTerms}";}]; 191 | definedAliases = ["@yt"]; 192 | }; 193 | "Nhentai" = { 194 | updateInterval = 24 * 60 * 60 * 1000; 195 | urls = [{template = "https://www.nhentai.net/search?q={searchTerms}";}]; 196 | definedAliases = ["@nh"]; 197 | }; 198 | "Google".metaData.alias = "g"; 199 | }; 200 | }; 201 | extraConfig = '' 202 | ${builtins.readFile "${betterfox}/user.js"} 203 | ${builtins.readFile "${betterfox}/Fastfox.js"} 204 | ${builtins.readFile "${betterfox}/Peskyfox.js"} 205 | ${builtins.readFile "${betterfox}/Smoothfox.js"} 206 | ${builtins.readFile "${lepton}/user.js"} 207 | ''; 208 | userChrome = '' 209 | @import "${lepton}/userChrome.css"; 210 | ''; 211 | userContent = '' 212 | @import "${lepton}/userContent.css"; 213 | ''; 214 | }; 215 | }; 216 | }; 217 | } 218 | -------------------------------------------------------------------------------- /home/fish.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | config, 4 | ... 5 | }: let 6 | scripts = import ../pkgs/scripts.nix {inherit pkgs config;}; 7 | psrc = name: { 8 | inherit name; 9 | inherit (pkgs.fishPlugins."${name}") src; 10 | }; 11 | exp = expansion: { 12 | inherit expansion; 13 | setCursor = true; 14 | }; 15 | in { 16 | stylix.targets.fish.enable = false; 17 | programs = { 18 | fish = { 19 | enable = true; 20 | plugins = [(psrc "autopair") (psrc "puffer")]; 21 | interactiveShellInit = '' 22 | set -U fish_greeting 23 | set -U fish_cursor_insert line 24 | set -U fish_cursor_replace_one underscore 25 | set -U fish_cursor_replace underscore 26 | set -U com ${scripts.fzfComp} 27 | ''; 28 | shellAbbrs = { 29 | fl = "nix flake"; 30 | up = "nh os switch"; 31 | del = "nh clean all --nogcroots"; 32 | ss = "nh search"; 33 | g = "git"; 34 | rs = exp "nix run --impure nixpkgs#%"; 35 | ts = exp "nix shell --impure nixpkgs#%"; 36 | bs = exp "nix build --impure --print-out-paths nixpkgs#%"; 37 | }; 38 | shellAliases = { 39 | nv = "nvim"; 40 | sr = "cd $(echo $NIX_PATH | cut -f2 -d=)"; 41 | qq = "nvd list"; 42 | im = "timg -p s"; 43 | ns = "nsxiv"; 44 | pm = "pulsemixer"; 45 | s = "sudo systemctl"; 46 | cat = "bat -p -P"; 47 | rm = "rm -Ivr"; 48 | mv = "mv -iv"; 49 | cp = "xcp -vr"; 50 | c = "clear"; 51 | df = "duf -hide special"; 52 | mkdir = "mkdir -pv"; 53 | d = "sudo"; 54 | du = "dust"; 55 | setwall = "swww img -f Mitchell -t any --transition-fps 75 --transition-duration 2"; 56 | f = "free -h"; 57 | ko = "pkill"; 58 | }; 59 | }; 60 | zsh = { 61 | enable = false; 62 | initExtra = '' 63 | function fzf-comp-widget() { 64 | local FZF_CTRL_T_COMMAND=${scripts.fzfComp} 65 | local FZF_CTRL_T_OPTS="--bind 'focus:jump' --bind 'space:jump,jump:accept' --tac" 66 | LBUFFER="''${LBUFFER}$(__fzf_select)" 67 | local ret=$? 68 | zle reset-prompt 69 | return $ret 70 | } 71 | zle -N fzf-comp-widget 72 | bindkey "^O" fzf-comp-widget 73 | ''; 74 | }; 75 | starship = { 76 | enable = true; 77 | settings = with config.lib.stylix.colors.withHashtag; { 78 | add_newline = false; 79 | character = { 80 | success_symbol = "[λ](${base0A})"; 81 | error_symbol = "[λ](${base0C})"; 82 | vimcmd_symbol = "[Λ](${base0A})"; 83 | }; 84 | 85 | directory = { 86 | style = base0B; 87 | truncation_length = 5; 88 | truncate_to_repo = false; 89 | read_only = ""; 90 | }; 91 | 92 | git_branch.format = "[$branch](${base0A})"; 93 | git_state.style = base0D; 94 | git_status = { 95 | format = "[$all_status$ahead_behind](${base0B}) "; 96 | stashed = ""; 97 | }; 98 | 99 | nix_shell.format = "[$state](${base0F}) "; 100 | 101 | cmd_duration.format = "[$duration](${base08})"; 102 | 103 | right_format = "$cmd_duration"; 104 | format = "$directory$git_branch$git_state$git_status$nix_shell$character"; 105 | scan_timeout = 10; 106 | }; 107 | }; 108 | }; 109 | } 110 | -------------------------------------------------------------------------------- /home/git.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | myUserName, 4 | mailId, 5 | ... 6 | }: { 7 | programs.git = { 8 | enable = true; 9 | package = pkgs.gitFull; 10 | userName = myUserName; 11 | userEmail = mailId; 12 | aliases = { 13 | co = "checkout"; 14 | cd = "clone --depth=1"; 15 | c = "commit -m"; 16 | w = "switch"; 17 | ca = "commit --amend"; 18 | cn = "commit --amend --no-edit"; 19 | a = "add -v"; 20 | r = "restore"; 21 | v = "revert"; 22 | va = "revert --abort"; 23 | pl = "pull --rebase"; 24 | l = "log"; 25 | cm = "checkout master"; 26 | m = "merge"; 27 | f = "reset --hard"; 28 | rs = "restore --staged"; 29 | lp = "log -p"; 30 | ls = "log --stat"; 31 | s = "status"; 32 | q = "stash"; 33 | qa = "stash apply"; 34 | qc = "stash clear"; 35 | p = "push -v"; 36 | pf = "push -v --force-with-lease"; 37 | d = "diff"; 38 | dc = "diff --cached"; 39 | b = "rebase -i"; 40 | ba = "rebase --abort"; 41 | bc = "rebase --continue"; 42 | gh = "!git remote -v | grep github.com | grep fetch | head -1 | awk '{print $2}' | sed 's|git@github.com:|https://github.com/|' | xargs xdg-open"; 43 | cl = "clone"; 44 | }; 45 | difftastic = { 46 | enable = true; 47 | background = "dark"; 48 | display = "inline"; 49 | }; 50 | ignores = [ 51 | "*~" 52 | "*.swp" 53 | ".zig-cache" 54 | "*result*" 55 | ".direnv" 56 | "tmp" 57 | ]; 58 | extraConfig = { 59 | core = { 60 | whitespace = "trailing-space,space-before-tab"; 61 | }; 62 | pull.ff = "only"; 63 | branch.autoSetupMerge = true; 64 | merge.conflictStyle = "diff3"; 65 | diff.colorMoved = "default"; 66 | rebase = { 67 | autoSquash = true; 68 | autoStash = true; 69 | }; 70 | push = { 71 | default = "current"; 72 | autoSetupRemote = true; 73 | followTags = true; 74 | }; 75 | url = { 76 | "https://github.com/".insteadOf = "github:"; 77 | "ssh://git@github.com/".pushInsteadOf = "github:"; 78 | }; 79 | }; 80 | }; 81 | } 82 | -------------------------------------------------------------------------------- /home/gui.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | config, 4 | osConfig, 5 | lib, 6 | ... 7 | }: let 8 | inherit (config.stylix.base16Scheme) palette; 9 | in { 10 | stylix.targets = { 11 | zathura.enable = false; 12 | hyprlock.enable = false; 13 | }; 14 | imports = [ 15 | (import ./modules.nix { 16 | inherit config lib pkgs; 17 | prog = "satty"; 18 | type = "toml"; 19 | }) 20 | ]; 21 | 22 | # i18n.inputMethod = { 23 | # enabled = "fcitx5"; 24 | # fcitx5.addons = with pkgs; [fcitx5-mozc fcitx5-gtk fcitx5-fluent]; 25 | # }; 26 | 27 | programs = { 28 | satty = { 29 | enable = true; 30 | settings = { 31 | general = { 32 | early-exit = true; 33 | initial-tool = "brush"; 34 | copy-command = "wl-copy"; 35 | annotation-size-factor = 1; 36 | save-after-copy = false; 37 | primary-highlighter = "block"; 38 | }; 39 | font.family = config.stylix.fonts.sansSerif.name; 40 | }; 41 | }; 42 | 43 | zathura = { 44 | enable = true; 45 | options = with config.lib.stylix.colors.withHashtag; { 46 | selection-clipboard = "clipboard"; 47 | recolor = "true"; 48 | recolor-keephue = "true"; 49 | font = "${config.stylix.fonts.serif.name} ${toString config.stylix.fonts.sizes.popups}"; 50 | completion-bg = base02; 51 | completion-fg = base0C; 52 | completion-highlight-bg = base0C; 53 | completion-highlight-fg = base02; 54 | default-fg = base01; 55 | highlight-active-color = base0D; 56 | highlight-color = base0A; 57 | index-active-bg = base0D; 58 | inputbar-bg = base00; 59 | inputbar-fg = base04; 60 | notification-bg = base09; 61 | notification-error-bg = base08; 62 | notification-error-fg = base00; 63 | notification-fg = base00; 64 | notification-warning-bg = base08; 65 | notification-warning-fg = base00; 66 | recolor-darkcolor = base06; 67 | statusbar-bg = base01; 68 | default-bg = "rgba(0,0,0,0.7)"; 69 | recolor-lightcolor = "rgba(256,256,256,0)"; 70 | }; 71 | mappings = { 72 | "i" = "recolor"; 73 | "f" = "toggle_fullscreen"; 74 | "[fullscreen] i" = "recolor"; 75 | "[fullscreen] f" = "toggle_fullscreen"; 76 | "" = "feedkeys ''"; 77 | "" = "feedkeys ''"; 78 | "" = "feedkeys ''"; 79 | "" = "feedkeys ''"; 80 | }; 81 | }; 82 | 83 | foot = { 84 | enable = true; 85 | settings = { 86 | main = { 87 | pad = "5x5"; 88 | font = lib.mkForce (builtins.concatStringsSep "," ( 89 | map (name: (name + ":size=" + toString config.stylix.fonts.sizes.terminal)) 90 | osConfig.fonts.fontconfig.defaultFonts.monospace 91 | )); 92 | }; 93 | key-bindings = { 94 | scrollback-up-page = "Control+u"; 95 | scrollback-down-page = "Control+d"; 96 | scrollback-up-line = "Control+Shift+k"; 97 | scrollback-down-line = "Control+Shift+j"; 98 | pipe-command-output = "[wl-copy -n] Control+Shift+g"; 99 | pipe-scrollback = "[sh -c 'cat > /tmp/console'] Control+Shift+f"; 100 | }; 101 | cursor = { 102 | style = "beam"; 103 | color = "${palette.base01} ${palette.base05}"; 104 | }; 105 | }; 106 | }; 107 | 108 | hyprlock = let 109 | rgb = color: "rgb(${color})"; 110 | in { 111 | enable = true; 112 | settings = { 113 | input-field = { 114 | size = "300, 60"; 115 | outline_thickness = 4; 116 | dots_size = 0.30; 117 | dots_rounding = 0; 118 | dots_spacing = 0.30; 119 | dots_center = true; 120 | outer_color = rgb palette.base01; 121 | inner_color = rgb palette.base04; 122 | font_color = rgb palette.base01; 123 | fade_on_empty = false; 124 | placeholder_text = "enter pass..."; 125 | hide_input = false; 126 | rounding = 0; 127 | check_color = rgb palette.base0A; 128 | fail_color = rgb palette.base0A; 129 | fail_text = "$FAIL ($ATTEMPTS)"; 130 | fail_timeout = 1500; 131 | fail_transition = 200; 132 | 133 | position = "0, -20"; 134 | halign = "center"; 135 | valign = "center"; 136 | }; 137 | 138 | label = { 139 | text = "Unlock?"; 140 | text_align = "center"; 141 | color = rgb palette.base04; 142 | font_size = 30; 143 | font_family = "Kaushan Script"; 144 | 145 | position = "0, 80"; 146 | halign = "center"; 147 | valign = "center"; 148 | }; 149 | }; 150 | }; 151 | }; 152 | 153 | services = { 154 | blueman-applet.enable = true; 155 | hypridle = { 156 | enable = false; 157 | settings = { 158 | general = { 159 | ignore_dbus_inhibit = false; 160 | }; 161 | listener = { 162 | timeout = 300; 163 | on-timeout = "${lib.getExe pkgs.hyprlock}"; 164 | }; 165 | }; 166 | }; 167 | 168 | mako = { 169 | enable = true; 170 | defaultTimeout = 5000; 171 | maxIconSize = 128; 172 | borderSize = 0; 173 | format = ''%s\n%b''; 174 | borderRadius = 10; 175 | padding = "10"; 176 | width = 330; 177 | height = 200; 178 | }; 179 | }; 180 | } 181 | -------------------------------------------------------------------------------- /home/hyprland.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | config, 4 | lib, 5 | osConfig, 6 | ... 7 | }: let 8 | scripts = import ../pkgs/scripts.nix {inherit pkgs config;}; 9 | in { 10 | # FIXME: do not anger me; fuck hyprpaper 11 | services.hyprpaper.enable = lib.mkForce false; 12 | stylix.targets.hyprpaper.enable = lib.mkForce false; 13 | wayland.windowManager.hyprland = { 14 | enable = true; 15 | systemd.enable = true; 16 | settings = { 17 | env = [ 18 | "LIBVA_DRIVER_NAME,nvidia" 19 | "XDG_SESSION_TYPE,wayland" 20 | "GBM_BACKEND,nvidia-drm" 21 | "__GLX_VENDOR_LIBRARY_NAME,nvidia" 22 | "VDPAU_DRIVER,nvidia" 23 | "WLR_NO_HARDWARE_CURSORS,1" 24 | "NIXOS_OZONE_WL,1" 25 | "GRIMBLAST_EDITOR,satty --filename" 26 | "ELECTRON_OZONE_PLATFORM_HINT,auto" 27 | "MOZ_ENABLE_WAYLAND,1" 28 | "NVD_BACKEND,direct" 29 | "MOZ_WEBRENDER,1" 30 | "_JAVA_AWT_WM_NONREPARENTING,1" 31 | "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" 32 | "QT_QPA_PLATFORM,wayland;xcb" 33 | "QT_QPA_PLATFORMTHEME,gtk3" 34 | "ELECTRON_OZONE_PLATFORM_HINT,wayland" 35 | "DISABLE_QT5_COMPAT,0" 36 | "CALIBRE_USE_DARK_PALETTE,1" 37 | "SDL_VIDEODRIVER,wayland" 38 | "GDK_BACKEND,wayland" 39 | ]; 40 | "$mod1" = "SUPER"; 41 | "$mod2" = "SUPERSHIFT"; 42 | "$mod3" = "SUPERCONTROL"; 43 | "$mod4" = "ALT"; 44 | "$setwall" = "swww img $(fd . ${pkgs.my-walls}/share/wallpapers/ | sort -R | head -1) -f Mitchell -t any --transition-fps 75 --transition-duration 2"; 45 | monitor = [ 46 | # FIXME: annoying ahh kernel bug 47 | "Unknown-1,disabled" 48 | "HDMI-A-1,1920x1080@75.00,0x0,1" 49 | ]; 50 | exec-once = [ 51 | "foot --server &" 52 | "swww-daemon --format xrgb" 53 | "wl-paste --type text --watch cliphist store &" 54 | "wl-paste --type image --watch cliphist store &" 55 | "$setwall &" 56 | ]; 57 | exec = [ 58 | "pgrep waybar || waybar &" 59 | "pgrep eww || eww open lyrics &" 60 | "${lib.getExe pkgs.xorg.xrdb} -merge $HOME/.Xresources &" 61 | ]; 62 | windowrule = [ 63 | "noblur, GLava" 64 | "noborder, GLava" 65 | "noshadow, GLava" 66 | "noanim, GLava" 67 | "nofocus, GLava" 68 | "float, GLava" 69 | "pin, GLava" 70 | "idleinhibit always, GLava" 71 | "size 100% 100%, GLava" 72 | "move 0 0, GLava" 73 | ]; 74 | layerrule = [ 75 | "noanim, selection" 76 | "blur, rofi" 77 | "blur, waybar" 78 | ]; 79 | windowrulev2 = [ 80 | "stayfocused, title:^()$,class:^(steam)$" 81 | "minsize 1 1, title:^()$,class:^(steam)$" 82 | "float, class:io.github.Qalculate.qalculate-qt" 83 | "size 70% 55%, class:io.github.Qalculate.qalculate-qt" 84 | "center, class:io.github.Qalculate.qalculate-qt" 85 | "float, title:quick" 86 | "size 80% 75%, title:quick" 87 | "center, title:quick" 88 | "size 85% 80%, class:com.gabm.satty" 89 | "center, class:com.gabm.satty" 90 | "center, class:foot" 91 | "idleinhibit always, class:steam_app_0" 92 | "tile, class:Nsxiv,xwayland:1" 93 | "workspace special:mpv silent, initialTitle:mpvplay" 94 | ]; 95 | workspace = [ 96 | "special:music, on-created-empty:footclient spotify_player" 97 | ]; 98 | input = { 99 | kb_options = osConfig.services.xserver.xkb.options; 100 | repeat_rate = 60; 101 | repeat_delay = 250; 102 | force_no_accel = 1; 103 | }; 104 | dwindle = { 105 | force_split = 2; 106 | pseudotile = false; 107 | preserve_split = true; 108 | }; 109 | misc = { 110 | font_family = config.stylix.fonts.serif.name; 111 | enable_swallow = true; 112 | force_default_wallpaper = 0; 113 | new_window_takes_over_fullscreen = 1; 114 | disable_splash_rendering = true; 115 | disable_hyprland_logo = true; 116 | swallow_regex = "^(foot).*$"; 117 | }; 118 | decoration = { 119 | rounding = 12; 120 | blur = { 121 | enabled = true; 122 | size = 5; 123 | passes = 2; 124 | }; 125 | shadow = { 126 | enabled = true; 127 | range = 15; 128 | }; 129 | dim_inactive = true; 130 | dim_strength = 0.1618; 131 | }; 132 | binds.workspace_back_and_forth = true; 133 | general = { 134 | gaps_in = 5; 135 | gaps_out = 8; 136 | border_size = 0; 137 | }; 138 | cursor.no_hardware_cursors = true; 139 | animations = { 140 | enabled = true; 141 | bezier = [ 142 | "overshot, 0.05, 0.9, 0.1, 1.05" 143 | "smoothOut, 0.36, 0, 0.66, -0.56" 144 | "smoothIn, 0.25, 1, 0.5, 1" 145 | "pace, 0.46, 1, 0.29, 0.99" 146 | ]; 147 | animation = [ 148 | "fade, 1, 3, smoothIn" 149 | "windowsIn, 1, 3, smoothIn" 150 | "windowsOut, 1, 3, smoothOut" 151 | "windowsMove, 1, 3, pace, slide" 152 | "workspaces, 1, 2, default" 153 | "layers, 1, 2, pace, slide" 154 | "specialWorkspace, 1, 3, pace, slidevert" 155 | ]; 156 | }; 157 | bindm = [ 158 | "$mod1, mouse:272, movewindow" 159 | "$mod1, mouse:273, resizewindow" 160 | ]; 161 | bindr = ["SUPER, SUPER_L, exec, pkill rofi || rofi -show drun"]; 162 | bindel = [ 163 | ",Print, exec,grimblast --notify copy area" 164 | ",XF86AudioRaiseVolume, exec, pulsemixer --change-volume +5" 165 | ",XF86AudioLowerVolume, exec, pulsemixer --change-volume -5" 166 | ",XF86AudioMute, exec, pulsemixer --toggle-mute" 167 | ",XF86AudioNext, exec, playerctl next --player=spotify_player" 168 | ",XF86AudioPrev, exec, playerctl previous --player=spotify_player" 169 | ",XF86AudioPlay, exec, playerctl play-pause" 170 | "$mod1, d, exec, playerctl next --player=spotify_player" 171 | "$mod1, a, exec, playerctl previous --player=spotify_player" 172 | "$mod1, s, exec, playerctl play-pause" 173 | "$mod1, n, exec, playerctld shift" 174 | "$mod1, m, exec, playerctld unshift" 175 | ]; 176 | binde = [ 177 | "$mod2, l, resizeactive, 40 0" 178 | "$mod2, h, resizeactive, -40 0" 179 | "$mod2, j, resizeactive, 0 40" 180 | "$mod2, k, resizeactive, 0 -40" 181 | 182 | "$mod3, l, moveactive, 60 0" 183 | "$mod3, h, moveactive, -60 0" 184 | "$mod3, j, moveactive, 0 60" 185 | "$mod3, k, moveactive, 0 -60" 186 | 187 | "$mod1, left, movewindow, l" 188 | "$mod1, right, movewindow, r" 189 | "$mod1, down, movewindow, d" 190 | "$mod1, up, movewindow, u" 191 | ]; 192 | bind = 193 | [ 194 | "$mod1, Print, exec, grimblast --notify copy screen" 195 | "$mod4, Print, exec, grimblast --notify edit area" 196 | 197 | "$mod2, f, exec, firefox" 198 | "$mod2, e, exec, emacs" 199 | "$mod2, p, exec, qbittorrent" 200 | "$mod2, g, exec, heroic" 201 | "$mod2, i, exec, $setwall" 202 | "$mod2, o, exec, rofi -theme preview -show filebrowser -selected-row 1" 203 | 204 | "$mod1, c, exec, rofi -show calc -modi calc -no-show-math -no-sort -calc-command 'echo '{result}' | wl-copy'" 205 | "$mod1, e, exec, echo ytdl://ytsearch:\"$(playerctl metadata --format '{{artist}} {{title}} {{album}}')\" | wl-copy && ${scripts.openMedia}" 206 | "$mod1, r, exec, pkill qalculate-qt || qalculate-qt" 207 | "$mod1, z, exec, pkill pulsemixer || footclient -T quick pulsemixer" 208 | 209 | "$mod1, return, exec, footclient" 210 | "$mod1, comma, exec, pkill btop || footclient -T quick btop" 211 | "$mod1, period, exec, ${lib.getExe pkgs.hdrop} -b -f -g 230 -w 85 -h 65 -c foot 'footclient -a terminal'" 212 | "$mod1, slash, exec, eww open romaji --toggle" 213 | 214 | "$mod1, o, exec, ${scripts.wlOcr}" 215 | "$mod1, p, exec, ${scripts.openMedia}" 216 | "$mod1, u, exec, ${scripts.rofiGuard}" 217 | "$mod1, w, exec, ${scripts.epubOpen}" 218 | "$mod1, i, exec, ${scripts.transLiner}" 219 | "$mod1, y, exec, ${scripts.copyVid}" 220 | "$mod1, v, exec, ${scripts.clipShow}" 221 | "$mod1, g, exec, ${scripts.glavaShow}" 222 | "$mod1, bracketleft, exec, ${scripts.copyPalette} glava" 223 | "$mod1, bracketright, exec, ${scripts.copyPalette} eww" 224 | "$mod1, apostrophe, exec, pkill wayvnc || ${scripts.openVNC}" 225 | 226 | "$mod1, q, killactive," 227 | "$mod1, x, togglesplit," 228 | "$mod1, t, fullscreen," 229 | "$mod1, f, fullscreenstate, -1 2" 230 | "$mod2, t, fullscreen, 1" 231 | "$mod2, q, exit," 232 | "$mod2, c, pseudo," 233 | "$mod2, s, togglefloating," 234 | "$mod2, r, exec, hyprctl reload" 235 | 236 | "$mod1, mouse_down, workspace, r+1" 237 | "$mod1, mouse_up, workspace, r-1" 238 | 239 | "$mod1, l, cyclenext," 240 | "$mod1, h, cyclenext, prev" 241 | "$mod1, Tab, cyclenext," 242 | "$mod1, Tab, bringactivetotop," 243 | "$mod2, Tab, bringactivetotop," 244 | "$mod2, Tab, cyclenext, prev" 245 | "$mod3, n, swapnext" 246 | "$mod3, p, swapnext, prev" 247 | 248 | "$mod1, 9, togglespecialworkspace, music" 249 | "$mod2, 9, movetoworkspacesilent, special:music" 250 | "$mod2, return, togglespecialworkspace, music" 251 | "$mod1, 0, togglespecialworkspace, mpv" 252 | "$mod2, 0, movetoworkspacesilent, special:mpv" 253 | "$mod3, return, togglespecialworkspace, mpv" 254 | ] 255 | ++ (builtins.concatLists (builtins.genList (x: let 256 | ws = let c = (x + 1) / 10; in toString (x + 1 - (c * 10)); 257 | in [ 258 | "$mod1, ${ws}, workspace, ${toString (x + 1)}" 259 | "$mod2, ${ws}, movetoworkspacesilent, ${toString (x + 1)}" 260 | ]) 261 | 8)); 262 | }; 263 | }; 264 | } 265 | -------------------------------------------------------------------------------- /home/modules.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | lib, 4 | pkgs, 5 | prog ? "", 6 | type ? "", 7 | ... 8 | }: let 9 | inherit (lib) mkEnableOption mkPackageOption mkOption mkIf; 10 | cfg = config.programs.${prog}; 11 | format = pkgs.formats.${type} {}; 12 | in { 13 | meta.maintainers = with lib.maintainers; [_71zenith]; 14 | options.programs.${prog} = { 15 | enable = mkEnableOption prog; 16 | 17 | package = mkPackageOption pkgs prog {}; 18 | 19 | settings = mkOption { 20 | inherit (format) type; 21 | default = {}; 22 | }; 23 | }; 24 | config = mkIf cfg.enable { 25 | home.packages = [cfg.package]; 26 | 27 | xdg.configFile = { 28 | "${prog}/config.${type}" = mkIf (cfg.settings != {}) { 29 | source = format.generate "${prog}-app" cfg.settings; 30 | }; 31 | }; 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /home/mpv.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | config, 4 | ... 5 | }: { 6 | programs.mpv = { 7 | enable = true; 8 | config = { 9 | osc = "no"; 10 | osd-bar = "no"; 11 | profile = "gpu-hq"; 12 | vo = "gpu"; 13 | loop-file = "inf"; 14 | hwdec = "vaapi"; 15 | scale = "ewa_lanczossharp"; 16 | cscale = "ewa_lanczossharp"; 17 | save-position-on-quit = "yes"; 18 | video-sync = "display-resample"; 19 | interpolation = "yes"; 20 | tscale = "oversample"; 21 | slang = "en,eng"; 22 | alang = "ja,jp,jpn,en,eng"; 23 | image-display-duration = "inf"; 24 | osd-font = config.stylix.fonts.monospace.name; 25 | cache = "yes"; 26 | demuxer-max-bytes = "300MiB"; 27 | demuxer-max-back-bytes = "50MiB"; 28 | demuxer-readahead-secs = "60"; 29 | border = "no"; 30 | keepaspect-window = "no"; 31 | screenshot-directory = config.xdg.userDirs.pictures; 32 | }; 33 | scriptOpts = { 34 | webtorrent.path = "${config.xdg.cacheHome}/mpv"; 35 | youtube-search = { 36 | key_youtube_search_replace = "CTRL+SHIFT+s"; 37 | key_youtube_music_search_replace = ""; 38 | key_youtube_search_append = ""; 39 | key_youtube_music_search_append = ""; 40 | key_search_results_update = ""; 41 | search_results = 1; 42 | osd_message_duration = 0; 43 | }; 44 | }; 45 | bindings = { 46 | "l" = "seek 5"; 47 | "h" = "seek -5"; 48 | "a" = "add chapter -1"; 49 | "d" = "add chapter 1"; 50 | "k" = "seek 60"; 51 | "j" = "seek -60"; 52 | "]" = "add speed 0.1"; 53 | "[" = "add speed -0.1"; 54 | "w" = "cycle-values speed 1 1.5 2"; 55 | "g" = "script-binding memo-history"; 56 | "tab" = "script-binding uosc/toggle-ui"; 57 | "c" = "script-binding uosc/chapters"; 58 | "q" = "script-binding uosc/stream-quality"; 59 | "t" = "script-binding uosc/audio"; 60 | "shift+f" = "script-binding uosc/keybinds"; 61 | "shift+p" = "script-binding uosc/items"; 62 | "s" = "script-binding uosc/subtitles"; 63 | "u" = "script-message-to youtube_upnext menu"; 64 | "shift+s" = "async screenshot"; 65 | "CTRL+1" = '' 66 | no-osd change-list glsl-shaders set "${pkgs.anime4k}/Anime4K_Clamp_Highlights.glsl:${pkgs.anime4k}/Anime4K_Restore_CNN_VL.glsl:${pkgs.anime4k}/Anime4K_Upscale_CNN_x2_VL.glsl:${pkgs.anime4k}/Anime4K_AutoDownscalePre_x2.glsl:${pkgs.anime4k}/Anime4K_AutoDownscalePre_x4.glsl:${pkgs.anime4k}/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode A (HQ)"''; 67 | "CTRL+2" = '' 68 | no-osd change-list glsl-shaders set "${pkgs.anime4k}/Anime4K_Clamp_Highlights.glsl:${pkgs.anime4k}/Anime4K_Restore_CNN_Soft_VL.glsl:${pkgs.anime4k}/Anime4K_Upscale_CNN_x2_VL.glsl:${pkgs.anime4k}/Anime4K_AutoDownscalePre_x2.glsl:${pkgs.anime4k}/Anime4K_AutoDownscalePre_x4.glsl:${pkgs.anime4k}/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode B (HQ)"''; 69 | "CTRL+3" = '' 70 | no-osd change-list glsl-shaders set "${pkgs.anime4k}/Anime4K_Clamp_Highlights.glsl:${pkgs.anime4k}/Anime4K_Upscale_Denoise_CNN_x2_VL.glsl:${pkgs.anime4k}/Anime4K_AutoDownscalePre_x2.glsl:${pkgs.anime4k}/Anime4K_AutoDownscalePre_x4.glsl:${pkgs.anime4k}/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode C (HQ)"''; 71 | "CTRL+4" = '' 72 | no-osd change-list glsl-shaders set "${pkgs.anime4k}/Anime4K_Clamp_Highlights.glsl:${pkgs.anime4k}/Anime4K_Restore_CNN_VL.glsl:${pkgs.anime4k}/Anime4K_Upscale_CNN_x2_VL.glsl:${pkgs.anime4k}/Anime4K_Restore_CNN_M.glsl:${pkgs.anime4k}/Anime4K_AutoDownscalePre_x2.glsl:${pkgs.anime4k}/Anime4K_AutoDownscalePre_x4.glsl:${pkgs.anime4k}/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode A+A (HQ)"''; 73 | "CTRL+5" = '' 74 | no-osd change-list glsl-shaders set "${pkgs.anime4k}/Anime4K_Clamp_Highlights.glsl:${pkgs.anime4k}/Anime4K_Restore_CNN_Soft_VL.glsl:${pkgs.anime4k}/Anime4K_Upscale_CNN_x2_VL.glsl:${pkgs.anime4k}/Anime4K_AutoDownscalePre_x2.glsl:${pkgs.anime4k}/Anime4K_AutoDownscalePre_x4.glsl:${pkgs.anime4k}/Anime4K_Restore_CNN_Soft_M.glsl:${pkgs.anime4k}/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode B+B (HQ)"''; 75 | "CTRL+6" = '' 76 | no-osd change-list glsl-shaders set "${pkgs.anime4k}/Anime4K_Clamp_Highlights.glsl:${pkgs.anime4k}/Anime4K_Upscale_Denoise_CNN_x2_VL.glsl:${pkgs.anime4k}/Anime4K_AutoDownscalePre_x2.glsl:${pkgs.anime4k}/Anime4K_AutoDownscalePre_x4.glsl:${pkgs.anime4k}/Anime4K_Restore_CNN_M.glsl:${pkgs.anime4k}/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode C+A (HQ)"''; 77 | "CTRL+0" = '' 78 | no-osd change-list glsl-shaders clr ""; show-text "GLSL shaders cleared"''; 79 | }; 80 | scripts = with pkgs.mpvScripts; 81 | [ 82 | mpris 83 | # autoload 84 | youtube-upnext 85 | memo 86 | uosc 87 | webtorrent-mpv-hook 88 | # thumbfast 89 | sponsorblock 90 | ] 91 | ++ (with pkgs; [mpv-youtube-search]); 92 | }; 93 | } 94 | -------------------------------------------------------------------------------- /home/nixpkgs.nix: -------------------------------------------------------------------------------- 1 | { 2 | allowBroken = true; 3 | allowUnfree = true; 4 | } 5 | -------------------------------------------------------------------------------- /home/nvim.nix: -------------------------------------------------------------------------------- 1 | { 2 | inputs, 3 | config, 4 | pkgs, 5 | ... 6 | }: let 7 | plugins = import ../pkgs/plugins-nvim.nix {inherit pkgs;}; 8 | in { 9 | imports = [inputs.nixvim.homeManagerModules.nixvim]; 10 | 11 | stylix.targets = { 12 | nixvim.enable = false; 13 | vim.enable = false; 14 | }; 15 | 16 | programs = { 17 | nixvim = { 18 | enable = true; 19 | luaLoader.enable = true; 20 | viAlias = true; 21 | vimAlias = true; 22 | defaultEditor = true; 23 | colorschemes.oxocarbon.enable = true; 24 | performance = { 25 | combinePlugins = { 26 | enable = true; 27 | standalonePlugins = ["nvim-treesitter" "nvim-treesitter-textobjects"]; 28 | }; 29 | byteCompileLua = { 30 | enable = true; 31 | nvimRuntime = true; 32 | plugins = true; 33 | }; 34 | }; 35 | extraConfigLuaPre = '' 36 | require("buffer_manager").setup({ focus_alternate_buffer = true}) 37 | require("which-key").setup({icons = {rules = false}}) 38 | require("supermaven-nvim").setup({}) 39 | ''; 40 | extraConfigLuaPost = '' 41 | require("cmp").event:on( 42 | 'confirm_done', 43 | require("nvim-autopairs.completion.cmp").on_confirm_done()) 44 | ''; 45 | # HACK: till upstream fix arrives 46 | highlight = with config.lib.stylix.colors.withHashtag; { 47 | WinBar.bg = base00; 48 | WinBarNC.bg = base00; 49 | }; 50 | globals = { 51 | mapleader = " "; 52 | maplocalleader = ";"; 53 | }; 54 | clipboard.providers.wl-copy.enable = true; 55 | enableMan = false; 56 | opts = { 57 | number = true; 58 | relativenumber = false; 59 | completeopt = "menu,menuone,noselect"; 60 | encoding = "utf-8"; 61 | fileencoding = "utf-8"; 62 | shiftwidth = 2; 63 | tabstop = 2; 64 | confirm = true; 65 | grepformat = "%f:%l:%c:%m"; 66 | grepprg = "rg --vimgrep"; 67 | expandtab = true; 68 | autoindent = true; 69 | laststatus = 3; 70 | autoread = true; 71 | history = 10000; 72 | foldlevelstart = 99; 73 | timeoutlen = 300; 74 | inccommand = "split"; 75 | cindent = true; 76 | wrap = false; 77 | ignorecase = true; 78 | autochdir = true; 79 | smarttab = true; 80 | listchars = { 81 | tab = " ──"; 82 | trail = "·"; 83 | nbsp = "␣"; 84 | precedes = "«"; 85 | extends = "»"; 86 | }; 87 | fillchars = { 88 | eob = " "; 89 | vert = " "; 90 | horiz = " "; 91 | diff = "╱"; 92 | foldclose = ""; 93 | foldopen = ""; 94 | fold = " "; 95 | msgsep = "─"; 96 | }; 97 | showmode = false; 98 | wildmode = "longest:full,full"; 99 | mouse = "a"; 100 | smartcase = true; 101 | smartindent = true; 102 | winminwidth = 5; 103 | cursorline = true; 104 | scrolloff = 999; 105 | sidescrolloff = 10; 106 | termguicolors = true; 107 | background = "dark"; 108 | signcolumn = "yes"; 109 | backspace = "indent,eol,start"; 110 | splitright = true; 111 | splitbelow = true; 112 | swapfile = false; 113 | clipboard = "unnamedplus"; 114 | undofile = true; 115 | undolevels = 10000; 116 | list = true; 117 | formatoptions = "jqlnt"; 118 | conceallevel = 0; 119 | spelllang = ["en_us"]; 120 | concealcursor = "nc"; 121 | autowrite = true; 122 | pumheight = 10; 123 | pumblend = 10; 124 | shiftround = true; 125 | updatetime = 200; 126 | showbreak = "⤷ "; 127 | }; 128 | extraPlugins = with plugins // pkgs.vimPlugins; [satellite-nvim supermaven-nvim buffer-manager lualine-so-fancy]; 129 | plugins = { 130 | nix.enable = false; 131 | nvim-bqf.enable = true; 132 | nvim-autopairs.enable = true; 133 | todo-comments.enable = true; 134 | barbecue = { 135 | enable = true; 136 | settings = { 137 | lead_custom_section = '' 138 | function() 139 | return {{" ","WinBar"}} 140 | end 141 | ''; 142 | }; 143 | }; 144 | dressing.enable = true; 145 | web-devicons.enable = true; 146 | debugprint.enable = true; 147 | lsp = { 148 | enable = true; 149 | inlayHints = true; 150 | preConfig = '' 151 | local signs = { Error = " ", Warn = " ", Hint = "󰠠 ", Info = " " } 152 | for type, icon in pairs(signs) do 153 | local hl = "DiagnosticSign" .. type 154 | vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) 155 | end 156 | ''; 157 | servers = { 158 | nil_ls = { 159 | enable = true; 160 | settings.nix.flake = { 161 | autoArchive = true; 162 | nixpkgsInputName = "nixos"; 163 | }; 164 | }; 165 | texlab.enable = true; 166 | bashls.enable = true; 167 | pyright.enable = true; 168 | zls.enable = true; 169 | ruff_lsp.enable = true; 170 | }; 171 | }; 172 | zig = { 173 | enable = true; 174 | settings = { 175 | fmt_autosave = 0; 176 | }; 177 | }; 178 | gitsigns = { 179 | enable = true; 180 | settings = { 181 | current_line_blame = true; 182 | linehl = true; 183 | }; 184 | }; 185 | cursorline = { 186 | enable = true; 187 | settings.cursorword.hl = { 188 | bold = true; 189 | underline = false; 190 | }; 191 | }; 192 | toggleterm = { 193 | enable = true; 194 | settings.direction = "float"; 195 | }; 196 | alpha = { 197 | enable = true; 198 | layout = [ 199 | { 200 | type = "padding"; 201 | val = 4; 202 | } 203 | { 204 | opts = { 205 | hl = "Type"; 206 | position = "center"; 207 | }; 208 | type = "text"; 209 | val = [ 210 | " =:+" 211 | " :+ #:#@@@" 212 | " *=-*# @*=%%%=#=:#**####" 213 | " .......::+#=+#%#=:*=**###%%%@" 214 | " =........::::-%%+-=+%.=******###%@" 215 | " #:............-:::-#==+++=+=**+******+@" 216 | " :.........::.....:-*---+%@#***===+++****+%" 217 | " :.........:-+%*:.....:=%#=*#********+===+*++#%" 218 | " -..........-=#@@@@%*-:-::-:.:#**********++*===+*#%" 219 | " :...........:=* @@@%++:=@%%@@@%#%##**************+*#%" 220 | " -.............= # #%#.:*-=@@@@%%@%%#***************#%" 221 | " -..............- -=@...-=@@*@@@@@%##*******#******#@" 222 | " +..............:# :=....:--++@@@@@%%*****%####****##@" 223 | " :.............:* *......::@+:=*@@@%%***#%%%%###***#%@" 224 | " +............-% *......:.=%@..:@@%####@@@@#######%%@" 225 | " *.........:=+=-- -........-:...:%@@##@@@@-:+%%#%#%@%" 226 | " *:...............- -:............+@@:=**@-:+=-%%%@%@@@" 227 | " *:................- #.............+@*#*+-*-#=--@%@%@@@" 228 | " =:..............-..- .............:@@*+:.*=-*:@@@@@@@@" 229 | " *::..........=+.....-...........:+@#@:.:-#@@@@@@@@@@" 230 | " =:::.....==:.......*=::::-----@%##::#%#@@@@@@@" 231 | " %+---===*.............%*=---@%*:...-@@@@@ @" 232 | " *==*:............=%=::-=@%#....=@" 233 | " +@@:.........::-%#::::-@%#....=*@" 234 | " *%=.::.....:.:*+--::-::@%=...:-#@%" 235 | " %@---:..:::.+%-..:-=-+=@#:........*" 236 | " @%--::::--%%..........%@.........:%" 237 | " @--::::-@@@@.........@#...:...+*-*" 238 | ]; 239 | } 240 | { 241 | type = "padding"; 242 | val = 4; 243 | } 244 | { 245 | type = "button"; 246 | val = "█"; 247 | } 248 | { 249 | opts = { 250 | hl = "Todo"; 251 | position = "center"; 252 | }; 253 | type = "text"; 254 | val = "let's all love lain"; 255 | } 256 | ]; 257 | }; 258 | direnv.enable = true; 259 | oil = { 260 | enable = true; 261 | settings = { 262 | keymaps = { 263 | "H" = "actions.parent"; 264 | "Q" = "actions.close"; 265 | "L" = "actions.select"; 266 | }; 267 | view_options = { 268 | show_hidden = true; 269 | }; 270 | }; 271 | }; 272 | vim-surround.enable = true; 273 | lastplace.enable = true; 274 | lsp-format.enable = true; 275 | none-ls = { 276 | enable = true; 277 | sources = { 278 | formatting = { 279 | alejandra.enable = true; 280 | black.enable = true; 281 | zprint.enable = true; 282 | }; 283 | diagnostics = { 284 | statix.enable = true; 285 | clj_kondo.enable = true; 286 | }; 287 | }; 288 | }; 289 | noice = { 290 | enable = true; 291 | settings = { 292 | lsp.override = { 293 | "cmp.entry.get_documentation" = true; 294 | "vim.lsp.util.convert_input_to_markdown_lines" = true; 295 | "vim.lsp.util.stylize_markdown" = true; 296 | }; 297 | views = { 298 | cmdline_popup.border.style = "single"; 299 | cmdline_popupmenu.border.style = "single"; 300 | }; 301 | presets = { 302 | bottom_search = true; 303 | command_palette = true; 304 | long_message_to_split = true; 305 | lsp_doc_border = false; 306 | }; 307 | }; 308 | }; 309 | neogit = { 310 | enable = true; 311 | settings.integrations.telescope = true; 312 | }; 313 | lualine = { 314 | enable = true; 315 | settings = { 316 | options = { 317 | disabled_filetypes = ["alpha" "trouble" "telescope" "oil" "toggleterm"]; 318 | section_separators = { 319 | left = ""; 320 | right = ""; 321 | }; 322 | component_separators = { 323 | left = ""; 324 | right = ""; 325 | }; 326 | }; 327 | sections = { 328 | lualine_a = ["fancy_mode"]; 329 | lualine_b = ["fancy_branch" "fancy_diff" "fancy_diagnostics"]; 330 | lualine_x = ["fancy_macro" "fancy_lsp_servers"]; 331 | lualine_y = ["fancy_filetype"]; 332 | lualine_z = ["fancy_searchcount" "fancy_location"]; 333 | }; 334 | }; 335 | }; 336 | which-key = { 337 | enable = true; 338 | settings.spec = [ 339 | { 340 | __unkeyed-1 = "f"; 341 | desc = "FILES"; 342 | } 343 | { 344 | __unkeyed-1 = "g"; 345 | desc = "GIT"; 346 | } 347 | { 348 | __unkeyed-1 = "l"; 349 | desc = "LSP"; 350 | } 351 | { 352 | __unkeyed-1 = "w"; 353 | desc = "WINDOW"; 354 | } 355 | ]; 356 | }; 357 | treesitter = { 358 | enable = true; 359 | settings = { 360 | highlight.disable = ["zig"]; 361 | highlight.enable = true; 362 | incremental_selection = { 363 | enable = true; 364 | keymaps = { 365 | init_selection = ""; 366 | node_incremental = ""; 367 | node_decremental = ""; 368 | }; 369 | }; 370 | }; 371 | }; 372 | treesitter-textobjects = let 373 | queryDesc = query: desc: {inherit query desc;}; 374 | in { 375 | enable = true; 376 | lspInterop = { 377 | enable = true; 378 | peekDefinitionCode."gd" = queryDesc "@function.outer" "Hover definition"; 379 | }; 380 | select = { 381 | enable = true; 382 | lookahead = true; 383 | keymaps = { 384 | "a=" = queryDesc "@assignment.outer" "Select outer part of an assignment"; 385 | "i=" = queryDesc "@assignment.inner" "Select inner part of an assignment"; 386 | "aj" = queryDesc "@assignment.lhs" "Select left hand side of an assignment"; 387 | "ak" = queryDesc "@assignment.rhs" "Select right hand side of an assignment"; 388 | "ai" = queryDesc "@conditional.outer" "Select outer part of a conditional"; 389 | "ii" = queryDesc "@conditional.inner" "Select inner part of a conditional"; 390 | "il" = queryDesc "@loop.inner" "Select inner part of a loop"; 391 | "al" = queryDesc "@loop.outer" "Select outer part of a loop"; 392 | "aa" = queryDesc "@parameter.outer" "Select outer part of a parameter"; 393 | "ia" = queryDesc "@parameter.inner" "Select inner part of a parameter"; 394 | "af" = queryDesc "@function.outer" "Select outer part of a function"; 395 | "if" = queryDesc "@function.inner" "Select inner part of a function"; 396 | "am" = queryDesc "@call.outer" "Select outer part of a method"; 397 | "im" = queryDesc "@call.inner" "Select inner part of a method"; 398 | }; 399 | }; 400 | move = { 401 | enable = true; 402 | setJumps = true; 403 | gotoNextStart = { 404 | "]f" = queryDesc "@function.outer" "Next function call start"; 405 | "]m" = queryDesc "@call.outer" "Next method call start"; 406 | "]l" = queryDesc "@loop.outer" "Next loop start"; 407 | "]i" = queryDesc "@conditional.outer" "Next conditional start"; 408 | }; 409 | gotoPreviousStart = { 410 | "[f" = queryDesc "@function.outer" "Previous function call start"; 411 | "[m" = queryDesc "@call.outer" "Previous method call start"; 412 | "[l" = queryDesc "@loop.outer" "Previous loop start"; 413 | "[i" = queryDesc "@conditional.outer" "Previous conditional start"; 414 | }; 415 | gotoPreviousEnd = { 416 | "[F" = queryDesc "@function.outer" "Previous function call end"; 417 | "[M" = queryDesc "@call.outer" "Previous method call end"; 418 | "[L" = queryDesc "@loop.outer" "Previous loop end"; 419 | "[I" = queryDesc "@conditional.outer" "Previous conditional end"; 420 | }; 421 | gotoNextEnd = { 422 | "]M" = queryDesc "@call.outer" "Next method call end"; 423 | "]F" = queryDesc "@function.outer" "Next function call end"; 424 | "]L" = queryDesc "@loop.outer" "Next loop end"; 425 | "]I" = queryDesc "@conditional.outer" "Next conditional end"; 426 | }; 427 | }; 428 | }; 429 | rainbow-delimiters.enable = true; 430 | cmp = { 431 | enable = true; 432 | settings = { 433 | sources = [ 434 | { 435 | name = "supermaven"; 436 | keyword_length = 1; 437 | } 438 | { 439 | name = "nvim_lsp"; 440 | keyword_length = 2; 441 | } 442 | { 443 | name = "path"; 444 | keyword_length = 4; 445 | } 446 | { 447 | name = "buffer"; 448 | keyword_length = 4; 449 | } 450 | ]; 451 | matching.disallow_fullfuzzy_matching = true; 452 | mapping = { 453 | "" = "cmp.mapping.complete()"; 454 | "" = "cmp.mapping.scroll_docs(-4)"; 455 | "" = "cmp.mapping.scroll_docs(4)"; 456 | "" = "cmp.mapping.close()"; 457 | "" = "cmp.mapping.confirm({ select = true })"; 458 | "" = "cmp.mapping.confirm({ select = true })"; 459 | "" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; 460 | "" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; 461 | "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; 462 | "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; 463 | "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; 464 | "" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; 465 | }; 466 | }; 467 | }; 468 | telescope = { 469 | enable = true; 470 | extensions = { 471 | frecency = { 472 | enable = true; 473 | settings.db_validate_threshold = 200; 474 | }; 475 | fzf-native.enable = true; 476 | }; 477 | settings.defaults.mappings.i = { 478 | "".__raw = "require('telescope.actions').move_selection_next"; 479 | "".__raw = "require('telescope.actions').close"; 480 | "".__raw = "require('telescope.actions').select_default"; 481 | "".__raw = "require('telescope.actions').move_selection_previous"; 482 | }; 483 | }; 484 | }; 485 | keymaps = let 486 | mkKeymap = key: mode: action: {inherit key mode action;}; 487 | mkKeymapDesc = key: mode: action: desc: (mkKeymap key mode action) // {options = {inherit desc;};}; 488 | mkKeymapExpr = key: mode: action: (mkKeymap key mode action) // {options = {expr = true;};}; 489 | in [ 490 | (mkKeymapDesc "la" "n" "lua vim.lsp.buf.code_action()" "Show code actions") 491 | (mkKeymapDesc "lo" "n" "lua vim.lsp.buf.definition()" "Goto definition") 492 | (mkKeymapDesc "lr" "n" "lua vim.lsp.buf.rename()" "Rename symbol") 493 | (mkKeymapDesc "lg" "n" "lua vim.diagnostic.setqflist()" "Diagnostics qflist") 494 | (mkKeymapDesc "ld" "n" "lua vim.diagnostic.open_float()" "Hover diagnostics") 495 | 496 | (mkKeymapDesc "fo" "n" "Telescope" "Open Telescope") 497 | (mkKeymapDesc "ls" "n" "Telescope lsp_document_symbols" "Document symbols") 498 | (mkKeymapDesc "ln" "n" "Telescope diagnostics" "List diagnostics") 499 | (mkKeymapDesc "li" "n" "Telescope lsp_implementations" "Goto implementations") 500 | (mkKeymapDesc "le" "n" "Telescope lsp_references" "List references") 501 | (mkKeymapDesc "b" "n" "lua require('buffer_manager.ui').toggle_quick_menu()" "Popup buffers") 502 | 503 | (mkKeymapDesc "fn" "n" "ene" "New file") 504 | (mkKeymapDesc "o" "n" "lua require('oil').toggle_float()" "Open oil") 505 | (mkKeymapDesc "" "n" "m .-2==" "Move up") 506 | (mkKeymapDesc "" "n" "m .+1==" "Move down") 507 | (mkKeymapDesc "" "i" "m .+1==gi" "Move down") 508 | (mkKeymapDesc "" "i" "m .-2==gi" "Move up") 509 | (mkKeymapDesc "K" ["x" "v"] ":move '<-2gv=gv" "Move up") 510 | (mkKeymapDesc "==" "n" "ggG" "Select all") 511 | (mkKeymapDesc "<" "v" "" "v" ">gv" "Increase indent") 513 | 514 | (mkKeymap "N" ["n" "x" "o"] "Nzzzv") 515 | (mkKeymap "n" ["n" "x" "o"] "nzzzv") 516 | (mkKeymap "" ["n" "x" "o"] "zz") 517 | (mkKeymap "" "n" "zz") 518 | (mkKeymap "p" "v" "P") 519 | 520 | (mkKeymapExpr "" ["n" "x"] "v:count == 0 ? 'gk' : 'k'") 521 | (mkKeymapExpr "" ["n" "x"] "v:count == 0 ? 'gj' : 'j'") 522 | (mkKeymapExpr "k" ["n" "x"] "v:count == 0 ? 'gk' : 'k'") 523 | (mkKeymapExpr "j" ["n" "x"] "v:count == 0 ? 'gj' : 'j'") 524 | 525 | (mkKeymapDesc "J" ["x" "v"] ":move '>+1gv=gv" "Move down") 526 | (mkKeymapDesc "fc" "n" "Telescope grep_string" "Find string under cursor") 527 | (mkKeymapDesc "ft" "n" "TodoTelescope" "Todo Telescope") 528 | (mkKeymapDesc "fg" "n" "Telescope live_grep" "Live grep") 529 | (mkKeymapDesc "fr" "n" "Telescope frecency" "Frecency files") 530 | (mkKeymapDesc "fe" "n" "Telescope oldfiles" "Recent files") 531 | (mkKeymapDesc "fu" "n" "Telescope colorscheme" "Change colorscheme") 532 | (mkKeymapDesc "fp" "n" "Telescope git_files" "Project files") 533 | (mkKeymapDesc "ff" "n" "Telescope fd" "Find files") 534 | 535 | (mkKeymapDesc "]g" "n" "Gitsigns prev_hunk" "Previous Git hunk") 536 | (mkKeymapDesc "[g" "n" "Gitsigns next_hunk" "Next Git hunk") 537 | (mkKeymapDesc "gg" "n" "Neogit" "Open Neogit") 538 | (mkKeymapDesc "gR" "n" "Gitsigns reset_buffer" "Reset buffer") 539 | (mkKeymapDesc "gd" "n" "Gitsigns toggle_deleted" "Toggle deleted") 540 | (mkKeymapDesc "gS" ["n" "v"] "Gitsigns stage_buffer" "Stage buffer") 541 | (mkKeymapDesc "gs" "n" "Gitsigns stage_hunk" "Stage hunk") 542 | (mkKeymapDesc "gu" "n" "Gitsigns undo_stage_hunk" "Unstage hunk") 543 | (mkKeymapDesc "gp" "n" "Gitsigns preview_hunk" "Preview hunk") 544 | (mkKeymapDesc "gr" ["n" "v"] "Gitsigns reset_hunk" "Reset hunk") 545 | 546 | (mkKeymapDesc "wv" "n" "v" "Split window vertically") 547 | (mkKeymapDesc "[t" ["n" "t"] "tabp" "Previous tab") 548 | (mkKeymapDesc "]t" ["n" "t"] "tabn" "Next tab") 549 | (mkKeymapDesc "wd" ["n" "t"] "tabp" "Previous tab") 550 | (mkKeymapDesc "wa" ["n" "t"] "tabn" "Next tab") 551 | (mkKeymapDesc "wc" "n" "close!" "Close current split") 552 | (mkKeymapDesc "wh" "n" "s" "Split window horizontally") 553 | (mkKeymapDesc "wn" "n" "tabnew" "Open new tab") 554 | (mkKeymapDesc "wk" "n" "bd!" "Close current tab") 555 | (mkKeymapDesc "wb" "n" "e #" "Switch to other buffer") 556 | (mkKeymapDesc "[b" "n" "bprevious" "Previous buffer") 557 | (mkKeymapDesc "]b" "n" "bnext" "Next buffer") 558 | 559 | (mkKeymapDesc "" "n" "h" "Navigate to pane left") 560 | (mkKeymapDesc "" "n" "l" "Navigate to pane right") 561 | (mkKeymapDesc "" "n" "k" "Navigate to pane up") 562 | (mkKeymapDesc "" "n" "j" "Navigate to pane down") 563 | (mkKeymapDesc "" "n" "vertical resize +2" "Resize pane right") 564 | (mkKeymapDesc "" "n" "vertical resize -2" "Resize pane left") 565 | (mkKeymapDesc "" "n" "resize +2" "Resize pane up") 566 | (mkKeymapDesc "" "n" "resize -2" "Resize pane down") 567 | 568 | (mkKeymapDesc "-" "n" "" "Decrement number") 569 | (mkKeymapDesc "+" "n" "" "Increment number") 570 | (mkKeymapDesc "]T" "n" "lua require('todo-comments').jump_next()" "Next TODO") 571 | (mkKeymapDesc "[T" "n" "lua require('todo-comments').jump_prev()" "Prev TODO") 572 | (mkKeymapDesc "" ["n" "v"] ":" "Open cmdline") 573 | (mkKeymapDesc "" "n" "noh" "Clear highlights") 574 | (mkKeymapDesc "K" "n" "qa" "Quit") 575 | (mkKeymapDesc "s" "n" "w" "Save Buffer") 576 | 577 | (mkKeymap "" "c" "") 578 | (mkKeymap "" "c" "") 579 | (mkKeymap "" "c" "") 580 | (mkKeymap "" "c" "") 581 | 582 | (mkKeymapDesc "]q" "n" "cnext" "Next quickfix") 583 | (mkKeymapDesc "[q" "n" "cprev" "Prev quickfix") 584 | (mkKeymapDesc "v" ["n" "t"] "1ToggleTerm direction=float name=はい " "Open terminal") 585 | (mkKeymapDesc "." ["n" "v"] "~" "Change case") 586 | (mkKeymapDesc "" ["n" "i" "c"] "" "Ctrl+Backspace to delete word") 587 | ]; 588 | }; 589 | }; 590 | } 591 | -------------------------------------------------------------------------------- /home/rofi.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | ... 5 | }: { 6 | stylix.targets.rofi.enable = false; 7 | programs.rofi = { 8 | enable = true; 9 | cycle = true; 10 | package = pkgs.rofi-wayland; 11 | plugins = with pkgs; [ 12 | # HACK: temporary fix until ABI update 13 | (rofi-calc.override { 14 | rofi-unwrapped = rofi-wayland-unwrapped; 15 | }) 16 | rofi-emoji-wayland 17 | ]; 18 | extraConfig = { 19 | modi = "drun,calc,window,emoji,run"; 20 | sidebar-mode = true; 21 | terminal = "footclient"; 22 | show-icons = true; 23 | kb-remove-char-back = "BackSpace"; 24 | kb-accept-entry = "Control+m,Return,KP_Enter"; 25 | kb-mode-next = "Control+l"; 26 | kb-mode-previous = "Control+h"; 27 | kb-row-up = "Control+k,Up"; 28 | kb-row-down = "Control+j,Down"; 29 | kb-row-left = "Control+u"; 30 | kb-row-right = "Control+d"; 31 | kb-delete-entry = "Control+semicolon"; 32 | kb-remove-char-forward = ""; 33 | kb-remove-to-sol = ""; 34 | kb-remove-to-eol = ""; 35 | kb-mode-complete = ""; 36 | display-drun = ""; 37 | display-run = ""; 38 | display-emoji = "󰞅"; 39 | display-calc = "󰃬"; 40 | display-window = ""; 41 | display-filebrowser = ""; 42 | drun-display-format = "{name} [({generic})]"; 43 | window-format = "{w} · {c} · {t}"; 44 | }; 45 | theme = let 46 | inherit (config.lib.formats.rasi) mkLiteral; 47 | in { 48 | "*" = with config.lib.stylix.colors.withHashtag; { 49 | font = "${config.stylix.fonts.serif.name} ${toString config.stylix.fonts.sizes.popups}"; 50 | background = with config.lib.stylix.colors; mkLiteral "rgba(${base00-rgb-r}, ${base00-rgb-g}, ${base00-rgb-b}, ${toString config.stylix.opacity.popups})"; 51 | border = mkLiteral base01; 52 | background-alt = mkLiteral base01; 53 | foreground = mkLiteral base06; 54 | foreground-alt = mkLiteral base02; 55 | selected = mkLiteral base0C; 56 | active = mkLiteral base0B; 57 | urgent = mkLiteral base0D; 58 | }; 59 | "window" = { 60 | transparency = "real"; 61 | location = mkLiteral "center"; 62 | anchor = mkLiteral "center"; 63 | fullscreen = mkLiteral "false"; 64 | width = mkLiteral "900px"; 65 | x-offset = mkLiteral "0px"; 66 | y-offset = mkLiteral "0px"; 67 | enabled = mkLiteral "true"; 68 | border-radius = mkLiteral "10px"; 69 | border = mkLiteral "2px solid"; 70 | border-color = mkLiteral "@border"; 71 | cursor = "default"; 72 | background-color = mkLiteral "@background"; 73 | }; 74 | "mainbox" = { 75 | enabled = true; 76 | spacing = mkLiteral "0px"; 77 | margin = mkLiteral "0px"; 78 | padding = mkLiteral "0px"; 79 | border = mkLiteral "0px solid"; 80 | border-radius = mkLiteral "0px 0px 0px 0px"; 81 | border-color = mkLiteral "@border"; 82 | background-color = mkLiteral "transparent"; 83 | children = mkLiteral "[inputbar,message,listview]"; 84 | }; 85 | "inputbar" = { 86 | enabled = true; 87 | spacing = mkLiteral "0px"; 88 | margin = mkLiteral "0px"; 89 | padding = mkLiteral "0px"; 90 | border = mkLiteral "0px 0px 2px 0px"; 91 | border-radius = mkLiteral "0px"; 92 | border-color = mkLiteral "@border"; 93 | background-color = mkLiteral "transparent"; 94 | text-color = mkLiteral "@foreground"; 95 | children = mkLiteral "[prompt,entry]"; 96 | }; 97 | "prompt" = { 98 | enabled = true; 99 | padding = mkLiteral "15px"; 100 | border = mkLiteral "0px 2px 0px 0px"; 101 | border-radius = mkLiteral "0px"; 102 | border-color = mkLiteral "@background-alt"; 103 | background-color = mkLiteral "inherit"; 104 | text-color = mkLiteral "inherit"; 105 | }; 106 | "textbox-prompt-colon" = { 107 | enabled = true; 108 | expand = false; 109 | str = "::"; 110 | background-color = mkLiteral "inherit"; 111 | text-color = mkLiteral "inherit"; 112 | }; 113 | "entry" = { 114 | enabled = true; 115 | padding = mkLiteral "15px"; 116 | background-color = mkLiteral "inherit"; 117 | text-color = mkLiteral "inherit"; 118 | cursor = mkLiteral "text"; 119 | placeholder-color = mkLiteral "inherit"; 120 | }; 121 | "mode-switcher" = { 122 | enabled = true; 123 | spacing = mkLiteral "10px"; 124 | margin = mkLiteral "0px"; 125 | padding = mkLiteral "0px"; 126 | border = mkLiteral "0px solid"; 127 | border-radius = mkLiteral "0px"; 128 | background-color = mkLiteral "transparent"; 129 | text-color = mkLiteral "@foreground"; 130 | }; 131 | "button" = { 132 | padding = mkLiteral "10px"; 133 | border-radius = mkLiteral "0px"; 134 | border = mkLiteral "0px solid"; 135 | border-color = mkLiteral "@border"; 136 | background-color = mkLiteral "transparent"; 137 | text-color = mkLiteral "inherit"; 138 | cursor = mkLiteral "pointer"; 139 | }; 140 | "button selected" = { 141 | background-color = mkLiteral "@selected"; 142 | text-color = mkLiteral "@foreground"; 143 | }; 144 | "listview" = { 145 | enabled = true; 146 | columns = 1; 147 | lines = 12; 148 | cycle = true; 149 | dynamic = true; 150 | scrollbar = false; 151 | layout = mkLiteral "vertical"; 152 | reverse = false; 153 | fixed-height = true; 154 | fixed-columns = true; 155 | spacing = mkLiteral "0px"; 156 | margin = mkLiteral "0px"; 157 | padding = mkLiteral "0px"; 158 | border = mkLiteral "0px solid"; 159 | border-radius = mkLiteral "0px"; 160 | border-color = mkLiteral "@border"; 161 | background-color = mkLiteral "transparent"; 162 | text-color = mkLiteral "@foreground"; 163 | cursor = mkLiteral "default"; 164 | }; 165 | "element" = { 166 | enabled = true; 167 | spacing = mkLiteral "10px"; 168 | margin = mkLiteral "0px"; 169 | padding = mkLiteral "8px 15px"; 170 | border = mkLiteral "0px 0px 0px 0px"; 171 | border-radius = mkLiteral "0px"; 172 | border-color = mkLiteral "@border"; 173 | background-color = mkLiteral "transparent"; 174 | text-color = mkLiteral "@foreground"; 175 | cursor = mkLiteral "pointer"; 176 | }; 177 | "element normal.normal" = { 178 | background-color = mkLiteral "inherit"; 179 | text-color = mkLiteral "inherit"; 180 | }; 181 | "element normal.urgent" = { 182 | background-color = mkLiteral "@urgent"; 183 | text-color = mkLiteral "@active"; 184 | }; 185 | "element normal.active" = { 186 | background-color = mkLiteral "@background"; 187 | text-color = mkLiteral "@active"; 188 | }; 189 | "element selected.normal" = { 190 | background-color = mkLiteral "@selected"; 191 | text-color = mkLiteral "@background"; 192 | }; 193 | "element selected.urgent" = { 194 | background-color = mkLiteral "@urgent"; 195 | text-color = mkLiteral "@foreground"; 196 | }; 197 | "element selected.active" = { 198 | background-color = mkLiteral "@urgent"; 199 | text-color = mkLiteral "@background-alt"; 200 | }; 201 | "element-icon" = { 202 | background-color = mkLiteral "transparent"; 203 | text-color = mkLiteral "inherit"; 204 | size = mkLiteral "32px"; 205 | cursor = mkLiteral "inherit"; 206 | }; 207 | "element-text" = { 208 | background-color = mkLiteral "transparent"; 209 | text-color = mkLiteral "inherit"; 210 | cursor = mkLiteral "inherit"; 211 | vertical-align = mkLiteral "0.5"; 212 | horizontal-align = mkLiteral "0.0"; 213 | }; 214 | "message" = { 215 | enabled = true; 216 | margin = mkLiteral "0px"; 217 | padding = mkLiteral "8px 15px"; 218 | border = mkLiteral "0px solid"; 219 | border-radius = mkLiteral "0px 0px 0px 0px"; 220 | border-color = mkLiteral "@border"; 221 | background-color = mkLiteral "transparent"; 222 | text-color = mkLiteral "@foreground"; 223 | }; 224 | "textbox" = { 225 | padding = mkLiteral "10px"; 226 | border = mkLiteral "0px solid"; 227 | border-radius = mkLiteral "0px"; 228 | border-color = mkLiteral "@border"; 229 | background-color = mkLiteral "@background-alt"; 230 | text-color = mkLiteral "@foreground"; 231 | vertical-align = mkLiteral "0.5"; 232 | horizontal-align = mkLiteral "0.0"; 233 | highlight = mkLiteral "none"; 234 | placeholder-color = mkLiteral "@foreground-alt"; 235 | blink = true; 236 | markup = true; 237 | }; 238 | "error-message" = { 239 | padding = mkLiteral "0px"; 240 | border = mkLiteral "0px solid"; 241 | border-color = mkLiteral "@border"; 242 | border-radius = mkLiteral "0px"; 243 | background-color = mkLiteral "@background"; 244 | text-color = mkLiteral "@foreground"; 245 | }; 246 | }; 247 | }; 248 | xdg.dataFile."rofi/themes/preview.rasi".text = '' 249 | @theme "custom" 250 | icon-current-entry { 251 | enabled: true; 252 | size: 50%; 253 | dynamic: true; 254 | padding: 10px; 255 | background-color: inherit; 256 | } 257 | listview-split { 258 | background-color: transparent; 259 | border-radius: 0px; 260 | cycle: true; 261 | dynamic : true; 262 | orientation: horizontal; 263 | border: 0px solid; 264 | children: [listview,icon-current-entry]; 265 | } 266 | listview { 267 | lines: 10; 268 | } 269 | mainbox { 270 | children: [inputbar,listview-split]; 271 | } 272 | configuration { 273 | display-filebrowser: ""; 274 | modi: "filebrowser"; 275 | filebrowser { 276 | directories-first: false; 277 | directory: "${pkgs.my-walls}/share/wallpapers"; 278 | command: "swww img -f Mitchell -t any --transition-fps 75 --transition-duration 2"; 279 | } 280 | } 281 | ''; 282 | } 283 | -------------------------------------------------------------------------------- /home/spotify-player.nix: -------------------------------------------------------------------------------- 1 | { 2 | inputs, 3 | config, 4 | pkgs, 5 | ... 6 | }: { 7 | imports = [inputs.sops-nix.homeManagerModules.sops]; 8 | sops = { 9 | defaultSopsFile = ../secrets/secrets.yaml; 10 | age.sshKeyPaths = ["${config.home.homeDirectory}/.ssh/id_ed25519"]; 11 | secrets = { 12 | spot_username = {}; 13 | spot_auth_data = {}; 14 | spot_client_id = {}; 15 | }; 16 | templates."credentials.json" = { 17 | content = builtins.toJSON { 18 | username = config.sops.placeholder.spot_username; 19 | auth_type = 1; 20 | auth_data = config.sops.placeholder.spot_auth_data; 21 | }; 22 | path = "${config.xdg.cacheHome}/spotify-player/credentials.json"; 23 | }; 24 | }; 25 | systemd.user.services.changeCover = { 26 | Unit = { 27 | PartOf = ["graphical-session.target"]; 28 | After = ["graphical-session-pre.target"]; 29 | }; 30 | Service = { 31 | ExecStart = pkgs.writeShellScript "changeCover" '' 32 | playerctl metadata --format '{{playerName}} {{mpris:artUrl}}' -F --ignore-player firefox | while read -r player url; do 33 | if [ "$player" = "spotify_player" ] && [ -n "$url" ]; then 34 | curl "$url" > /tmp/cover.jpg 35 | pkill -RTMIN+8 waybar 36 | magick /tmp/cover.jpg -resize 1x1\! -format "fg = #%[hex:u]\n" info: 2>/dev/null > /tmp/cover.info 37 | fi 38 | done 39 | ''; 40 | Restart = "always"; 41 | RestartSec = "5s"; 42 | }; 43 | Install = { 44 | WantedBy = ["graphical-session.target"]; 45 | }; 46 | }; 47 | programs.spotify-player = { 48 | enable = true; 49 | settings = { 50 | client_id_command = "cat ${config.xdg.configHome}/sops-nix/secrets/spot_client_id"; 51 | client_port = 8080; 52 | play_icon = " "; 53 | pause_icon = " "; 54 | enable_media_control = true; 55 | default_device = "ur-mom"; 56 | theme = config.stylix.base16Scheme.slug; 57 | seek_duration_secs = 10; 58 | liked_icon = "󰋑 "; 59 | border_type = "Hidden"; 60 | progress_bar_type = "Rectangle"; 61 | cover_img_scale = 1.9; 62 | cover_img_length = 10; 63 | layout.playback_window_position = "Bottom"; 64 | device = { 65 | name = "lain"; 66 | device_type = "speaker"; 67 | bitrate = 320; 68 | audio_cache = false; 69 | autoplay = true; 70 | }; 71 | }; 72 | actions = [ 73 | { 74 | action = "ToggleLiked"; 75 | key_sequence = "C-l"; 76 | } 77 | { 78 | action = "AddToLibrary"; 79 | key_sequence = "C-a"; 80 | } 81 | { 82 | action = "Follow"; 83 | key_sequence = "C-f"; 84 | } 85 | ]; 86 | keymaps = [ 87 | { 88 | command = "PreviousPage"; 89 | key_sequence = "esc"; 90 | } 91 | { 92 | command = "ClosePopup"; 93 | key_sequence = "q"; 94 | } 95 | { 96 | command = "Repeat"; 97 | key_sequence = "R"; 98 | } 99 | { 100 | command = "Shuffle"; 101 | key_sequence = "S"; 102 | } 103 | { 104 | command = "Quit"; 105 | key_sequence = "C-c"; 106 | } 107 | { 108 | command = "SeekForward"; 109 | key_sequence = "L"; 110 | } 111 | { 112 | command = "SeekBackward"; 113 | key_sequence = "H"; 114 | } 115 | { 116 | command = "PageSelectPreviousOrScrollUp"; 117 | key_sequence = "C-u"; 118 | } 119 | { 120 | command = "PageSelectNextOrScrollDown"; 121 | key_sequence = "C-d"; 122 | } 123 | { 124 | command = "LikedTrackPage"; 125 | key_sequence = "g o"; 126 | } 127 | ]; 128 | themes = [ 129 | { 130 | name = config.stylix.base16Scheme.slug; 131 | palette = with config.lib.stylix.colors.withHashtag; { 132 | black = base00; 133 | foreground = base03; 134 | bright_black = base01; 135 | yellow = base02; 136 | green = base03; 137 | bright_yellow = base04; 138 | white = base05; 139 | bright_white = base06; 140 | cyan = base07; 141 | bright_cyan = base08; 142 | blue = base09; 143 | bright_red = base0A; 144 | bright_blue = base0B; 145 | red = base0C; 146 | bright_green = base0D; 147 | magenta = base07; 148 | bright_magenta = base0F; 149 | }; 150 | component_style = { 151 | block_title = { 152 | fg = "BrightGreen"; 153 | modifiers = ["Italic" "Bold"]; 154 | }; 155 | like = { 156 | fg = "Red"; 157 | modifiers = ["Bold"]; 158 | }; 159 | playback_track = { 160 | fg = "BrightMagenta"; 161 | modifiers = ["Italic"]; 162 | }; 163 | playback_album = { 164 | fg = "BrightRed"; 165 | modifiers = ["Italic"]; 166 | }; 167 | playback_artists = { 168 | fg = "BrightCyan"; 169 | modifiers = []; 170 | }; 171 | playback_metadata = { 172 | fg = "BrightBlue"; 173 | modifiers = []; 174 | }; 175 | playback_progress_bar = { 176 | fg = "BrightGreen"; 177 | modifiers = ["Italic"]; 178 | }; 179 | current_playing = { 180 | fg = "Red"; 181 | modifiers = ["Bold" "Italic"]; 182 | }; 183 | playlist_desc = { 184 | fg = "White"; 185 | modifiers = ["Italic"]; 186 | }; 187 | page_desc = { 188 | fg = "Magenta"; 189 | modifiers = ["Bold" "Italic"]; 190 | }; 191 | table_header = { 192 | fg = "Blue"; 193 | modifiers = ["Bold"]; 194 | }; 195 | border = {fg = "BrightYellow";}; 196 | selection = { 197 | fg = "Red"; 198 | modifiers = ["Bold" "Reversed"]; 199 | }; 200 | secondary_row = {bg = "BrightBlack";}; 201 | }; 202 | } 203 | ]; 204 | }; 205 | } 206 | -------------------------------------------------------------------------------- /home/waybar.nix: -------------------------------------------------------------------------------- 1 | { 2 | osConfig, 3 | config, 4 | pkgs, 5 | lib, 6 | ... 7 | }: let 8 | scripts = import ../pkgs/scripts.nix {inherit pkgs config;}; 9 | in { 10 | stylix.targets.waybar = { 11 | enableLeftBackColors = false; 12 | enableRightBackColors = false; 13 | enableCenterBackColors = false; 14 | }; 15 | programs.waybar = { 16 | enable = true; 17 | settings = { 18 | mainBar = { 19 | layer = "top"; 20 | position = "top"; 21 | modules-left = ["hyprland/workspaces" "group/win"]; 22 | modules-center = ["image#cover" "group/music"]; 23 | modules-right = ["network" "pulseaudio" "clock#date" "clock#time" "gamemode" "privacy" "tray"]; 24 | "hyprland/workspaces" = { 25 | format = "{icon}"; 26 | show-special = true; 27 | on-scroll-up = "hyprctl dispatch workspace r-1"; 28 | on-scroll-down = "hyprctl dispatch workspace r+1"; 29 | format-icons = { 30 | "1" = "一"; 31 | "2" = "二"; 32 | "3" = "三"; 33 | "4" = "四"; 34 | "5" = "五"; 35 | "6" = "六"; 36 | "7" = "七"; 37 | "8" = "八"; 38 | "music" = ""; 39 | "mpv" = ""; 40 | }; 41 | persistent-workspaces = { 42 | "1" = []; 43 | "2" = []; 44 | "3" = []; 45 | "4" = []; 46 | "5" = []; 47 | "6" = []; 48 | "7" = []; 49 | "8" = []; 50 | "special:music" = []; 51 | }; 52 | ignore-workspaces = ["special:hdrop"]; 53 | }; 54 | "group/win" = { 55 | orientation = "inherit"; 56 | drawer.transition-duration = 250; 57 | modules = [ 58 | "hyprland/window" 59 | "wlr/taskbar" 60 | ]; 61 | }; 62 | "wlr/taskbar" = { 63 | active-first = true; 64 | markup = true; 65 | on-click = "activate"; 66 | on-click-middle = "close"; 67 | ignore-list = ["GLava"]; 68 | icon-size = 24; 69 | }; 70 | "hyprland/window" = { 71 | icon = true; 72 | rewrite = { 73 | ".+" = ""; 74 | }; 75 | }; 76 | "tray" = {spacing = 10;}; 77 | "clock#time" = { 78 | format = "{:%H:%M}"; 79 | tooltip-format = "{tz_list}"; 80 | timezones = [ 81 | osConfig.time.timeZone 82 | "Europe/Berlin" 83 | "Asia/Tokyo" 84 | ]; 85 | }; 86 | "clock#date" = { 87 | format = "{:%a %d %b}"; 88 | tooltip-format = "{calendar}"; 89 | }; 90 | "network" = { 91 | format-ethernet = "{bandwidthUpBytes} {bandwidthDownBytes}"; 92 | min-width = 20; 93 | fixed-width = 20; 94 | interface = "enp7s0"; 95 | interval = 1; 96 | }; 97 | "pulseaudio" = { 98 | format = "{volume}%"; 99 | format-muted = "{volume}%"; 100 | on-click = "pulsemixer --toggle-mute"; 101 | on-scroll-up = "pulsemixer --change-volume +5"; 102 | on-scroll-down = "pulsemixer --change-volume -5"; 103 | on-click-right = "pkill pulsemixer || footclient -T quick pulsemixer"; 104 | }; 105 | "privacy" = { 106 | icon-size = 16; 107 | icon-spacing = 5; 108 | on-click = "pkill glava"; 109 | }; 110 | "group/music" = { 111 | orientation = "vertical"; 112 | modules = [ 113 | "mpris" 114 | "custom/progress" 115 | ]; 116 | }; 117 | "mpris" = with config.lib.stylix.colors.withHashtag; { 118 | format = "{dynamic}"; 119 | format-paused = "{dynamic}"; 120 | dynamic-order = ["title" "artist"]; 121 | dynamic-separator = ""; 122 | on-scroll-up = "playerctld shift"; 123 | on-scroll-down = "playerctld unshift"; 124 | max-length = 100; 125 | }; 126 | "custom/progress" = { 127 | return-type = "json"; 128 | exec = pkgs.writeShellScript "centWay" '' 129 | while :; do 130 | echo "{ \"text\" : \"_\" , \"class\" : \"$(playerctl --ignore-player firefox metadata --format 'cent{{ (position / 100) / (mpris:length / 100) * 100 }}' | cut -d. -f1)\" }" 131 | sleep 1 132 | done 133 | ''; 134 | }; 135 | "image#cover" = { 136 | on-click = "pkill nsxiv || nsxiv /tmp/cover.jpg"; 137 | on-click-right = "spotify_player like"; 138 | on-click-middle = scripts.glavaShow; 139 | path = "/tmp/cover.jpg"; 140 | size = 31; 141 | signal = 8; 142 | }; 143 | }; 144 | }; 145 | style = 146 | '' 147 | * { border: 0; border-radius: 0; min-height: 0; } 148 | * { font-family: ${builtins.concatStringsSep "," (map (font: ''"${font}"'') osConfig.fonts.fontconfig.defaultFonts.sansSerif)}; } 149 | #waybar { transition: background-color .1s; } 150 | #waybar.hidden { opacity: .1; } 151 | 152 | 153 | #clock, #mpris, #network, #tray, #pulseaudio, #workspaces, 154 | #image.toggle, privacy, #gamemode, #submap { 155 | color: @base05; 156 | padding: 2px 4px; 157 | background-color: alpha(@base00, 0); 158 | margin: 2px 4px; 159 | } 160 | 161 | #image.cover { margin: 4px 0; } 162 | #workspaces button { 163 | color: @base04; 164 | box-shadow: inset 0 -3px transparent; 165 | padding: 0 6px; 166 | transition: all .1s cubic-bezier(.55, -.68, .48, 1.68); 167 | } 168 | #workspaces button.empty { color: @base03; } 169 | #workspaces button.active { color: @base0B; } 170 | 171 | #mpris { margin-top: 3px; margin-bottom: 1px; color: @base09; } 172 | #pulseaudio { color: @base0D; } 173 | #pulseaudio.muted, #network.disconnected { color: @base0A; } 174 | #network { color: @base0F; } 175 | #clock.time { color: @base0E; } 176 | #clock.date { color: @base08; } 177 | 178 | tooltip { padding: 3px; background-color: alpha(@base01, .75); } 179 | #tray > .passive { -gtk-icon-effect: dim; } 180 | #tray > .needs-attention { -gtk-icon-effect: highlight; background-color: @base0A; } 181 | 182 | #taskbar button:hover { background-color: @base01; } 183 | 184 | #window { margin-bottom: 2px; margin-right: 0; padding-right: 0; } 185 | #taskbar { margin-bottom: 2px; margin-left: 0; padding-left: 0; } 186 | #taskbar button { padding: 0 7px; } 187 | 188 | #privacy, #gamemode, #image.toggle { margin: 0 2px; padding: 0 2px; } 189 | 190 | #custom-progress { 191 | font-size: 2pt; 192 | margin: 2px 7px 0; 193 | color: transparent; 194 | }'' 195 | + builtins.concatStringsSep "\n" (map (p: '' 196 | #custom-progress.cent${toString p} { 197 | background: linear-gradient(to right, @base07 ${toString p}%, @base01 ${toString p}.1%); 198 | } 199 | '') (lib.range 0 100)); 200 | }; 201 | } 202 | -------------------------------------------------------------------------------- /home/xdg.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | ... 5 | }: { 6 | xdg = { 7 | enable = true; 8 | 9 | portal = { 10 | enable = true; 11 | config.common.default = ["hyprland" "gtk"]; 12 | xdgOpenUsePortal = true; 13 | extraPortals = with pkgs; [xdg-desktop-portal-hyprland xdg-desktop-portal-gtk]; 14 | }; 15 | 16 | mime.enable = true; 17 | mimeApps = { 18 | enable = true; 19 | defaultApplications = let 20 | browser = ["firefox.desktop"]; 21 | fileManager = ["org.gnome.Nautilus.desktop"]; 22 | editor = ["nvim.desktop"]; 23 | player = ["mpv.desktop"]; 24 | viewer = ["nsxiv.desktop"]; 25 | reader = ["org.pwmt.zathura.desktop"]; 26 | in { 27 | "application/pdf" = reader; 28 | "application/epub" = reader; 29 | 30 | "text/html" = browser; 31 | "text/xml" = browser; 32 | "text/plain" = editor; 33 | "application/x-wine-extension-ini" = editor; 34 | 35 | "application/json" = browser; 36 | "application/xml" = browser; 37 | "application/xhtml+xml" = browser; 38 | "application/xhtml_xml" = browser; 39 | "application/rdf+xml" = browser; 40 | "application/rss+xml" = browser; 41 | "application/x-extension-htm" = browser; 42 | "application/x-extension-html" = browser; 43 | "application/x-extension-shtml" = browser; 44 | "application/x-extension-xht" = browser; 45 | "application/x-extension-xhtml" = browser; 46 | 47 | "x-scheme-handler/about" = browser; 48 | "x-scheme-handler/ftp" = browser; 49 | "x-scheme-handler/http" = browser; 50 | "x-scheme-handler/https" = browser; 51 | 52 | "inode/directory" = fileManager; 53 | "application/zip" = fileManager; 54 | 55 | "audio/mpeg" = player; 56 | "audio/aac" = player; 57 | "audio/flac" = player; 58 | "audio/wav" = player; 59 | "video/mp4" = player; 60 | "video/vnd.mpegurl" = player; 61 | "video/x-matroska" = player; 62 | "application/x-mpegURL" = player; 63 | 64 | "image/gif" = viewer; 65 | "image/jpeg" = viewer; 66 | "image/png" = viewer; 67 | "image/webp" = viewer; 68 | }; 69 | }; 70 | 71 | userDirs = { 72 | enable = true; 73 | createDirectories = true; 74 | download = "${config.home.homeDirectory}/dl"; 75 | documents = "${config.home.homeDirectory}/dl/dox"; 76 | desktop = "${config.home.homeDirectory}/dl/desk"; 77 | videos = "${config.home.homeDirectory}/dl/vid"; 78 | pictures = "${config.home.homeDirectory}/pix"; 79 | music = "${config.home.homeDirectory}/dl/music"; 80 | templates = "${config.home.homeDirectory}/.local/share/templates"; 81 | publicShare = "${config.home.homeDirectory}/.local/share/public"; 82 | }; 83 | 84 | configFile."electron-flags.conf".text = '' 85 | --enable-features=WaylandWindowDecorations 86 | --enable-features=UseOzonePlatform 87 | --ozone-platform-hint=wayland 88 | --disable-gpu-compositing 89 | ''; 90 | }; 91 | } 92 | -------------------------------------------------------------------------------- /nixos/boot.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | modulesPath, 4 | myUserName, 5 | ... 6 | }: { 7 | imports = [(modulesPath + "/installer/scan/not-detected.nix")]; 8 | 9 | boot = { 10 | initrd.availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"]; 11 | initrd.kernelModules = []; 12 | kernelModules = ["kvm-amd"]; 13 | extraModulePackages = []; 14 | }; 15 | fileSystems = { 16 | "/" = { 17 | device = "/dev/disk/by-uuid/a712d0ab-a784-4a07-bcfa-c538173722c2"; 18 | fsType = "btrfs"; 19 | options = ["subvol=@" "compress=zstd"]; 20 | }; 21 | 22 | "/boot" = { 23 | device = "/dev/disk/by-uuid/43BE-E69D"; 24 | fsType = "vfat"; 25 | }; 26 | 27 | "/home/${myUserName}/mnt" = { 28 | device = "/dev/disk/by-uuid/d574db64-7098-4a82-8837-3f4f43f3b003"; 29 | fsType = "ext4"; 30 | options = ["noauto"]; 31 | }; 32 | }; 33 | 34 | swapDevices = [{device = "/dev/disk/by-uuid/9ff583e8-b9bb-46f3-a68d-0883d3f71fe6";}]; 35 | 36 | networking.useDHCP = lib.mkDefault true; 37 | 38 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 39 | 40 | systemd.services = { 41 | systemd-udev-settle.enable = false; 42 | NetworkManager-wait-online.enable = false; 43 | }; 44 | } 45 | -------------------------------------------------------------------------------- /nixos/config.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | pkgs-stable, 4 | config, 5 | inputs, 6 | lib, 7 | pcName, 8 | myUserName, 9 | mailId, 10 | ... 11 | }: let 12 | home = user: "/home/${user}"; 13 | in { 14 | imports = [ 15 | ./boot.nix 16 | ./hardware.nix 17 | ./packages.nix 18 | ./stylix.nix 19 | inputs.nix-gaming.nixosModules.platformOptimizations 20 | ]; 21 | 22 | sops = { 23 | defaultSopsFile = ../secrets/secrets.yaml; 24 | age.sshKeyPaths = ["${home myUserName}/.ssh/id_ed25519"]; 25 | secrets = { 26 | root_pass.neededForUsers = true; 27 | user_pass.neededForUsers = true; 28 | ssh_public = {}; 29 | vpn_private_jp = {}; 30 | vpn_private_us = {}; 31 | vpn_private_nl = {}; 32 | }; 33 | }; 34 | 35 | networking = { 36 | stevenBlackHosts.enable = true; 37 | # NOTE: VNC server 38 | firewall.allowedTCPPorts = [5900]; 39 | }; 40 | 41 | nix = { 42 | settings = { 43 | auto-optimise-store = true; 44 | experimental-features = ["nix-command" "flakes"]; 45 | warn-dirty = false; 46 | trusted-users = ["root" "@wheel"]; 47 | log-lines = 30; 48 | http-connections = 50; 49 | }; 50 | nixPath = ["nixpkgs=${inputs.nixpkgs}"]; 51 | registry.nixpkgs.flake = inputs.nixpkgs; 52 | gc = { 53 | automatic = true; 54 | dates = "weekly"; 55 | options = "--delete-older-than 7d"; 56 | }; 57 | optimise = { 58 | automatic = true; 59 | dates = ["weekly"]; 60 | }; 61 | }; 62 | 63 | boot = { 64 | loader = { 65 | systemd-boot = { 66 | enable = true; 67 | consoleMode = "max"; 68 | }; 69 | efi.canTouchEfiVariables = true; 70 | }; 71 | kernelPackages = pkgs.linuxPackages_xanmod; 72 | }; 73 | 74 | documentation = { 75 | enable = true; 76 | dev.enable = true; 77 | }; 78 | 79 | services = { 80 | mysql = { 81 | enable = false; 82 | package = pkgs.mysql84; 83 | }; 84 | 85 | greetd = { 86 | enable = true; 87 | settings = { 88 | default_session = { 89 | command = lib.getExe pkgs.hyprland; 90 | user = myUserName; 91 | }; 92 | }; 93 | }; 94 | 95 | audiobookshelf = { 96 | enable = true; 97 | openFirewall = true; 98 | group = "users"; 99 | }; 100 | 101 | # NOTE: calibre drive detection 102 | udisks2.enable = true; 103 | 104 | # NOTE: nautilus trash support 105 | gvfs.enable = true; 106 | }; 107 | 108 | systemd.coredump.extraConfig = "Storage=none"; 109 | 110 | environment = { 111 | pathsToLink = ["/share/xdg-desktop-portal" "/share/applications"]; 112 | 113 | # NOTE: font stem darkening 114 | variables.FREETYPE_PROPERTIES = "cff:no-stem-darkening=0 autofitter:no-stem-darkening=0"; 115 | }; 116 | 117 | security.sudo.wheelNeedsPassword = false; 118 | 119 | time.timeZone = "Asia/Kolkata"; 120 | i18n = { 121 | defaultLocale = "ja_JP.UTF-8"; 122 | extraLocaleSettings = { 123 | LC_NUMERIC = "en_US.UTF-8"; 124 | LC_ADDRESS = "en_IN"; 125 | LC_IDENTIFICATION = "en_IN"; 126 | LC_MEASUREMENT = "en_IN"; 127 | LC_MONETARY = "en_IN"; 128 | LC_PAPER = "en_IN"; 129 | LC_TELEPHONE = "en_IN"; 130 | LC_TIME = "en_IN"; 131 | }; 132 | }; 133 | 134 | console = { 135 | earlySetup = true; 136 | font = "${pkgs.terminus_font}/share/consolefonts/ter-132n.psf.gz"; 137 | useXkbConfig = true; 138 | }; 139 | 140 | programs = { 141 | # NOTE: completions/integration/root access 142 | fish.enable = true; 143 | foot.enable = true; 144 | hyprland.enable = true; 145 | 146 | steam = { 147 | enable = true; 148 | gamescopeSession.enable = true; 149 | protontricks.enable = true; 150 | protontricks.package = pkgs-stable.protontricks; 151 | platformOptimizations.enable = true; 152 | }; 153 | 154 | gamemode.enable = true; 155 | 156 | nh = { 157 | enable = true; 158 | flake = "${home myUserName}/kiseki"; 159 | }; 160 | 161 | nix-ld.enable = true; 162 | }; 163 | 164 | users.users = { 165 | root = { 166 | hashedPasswordFile = config.sops.secrets.root_pass.path; 167 | }; 168 | ${myUserName} = { 169 | isNormalUser = true; 170 | shell = pkgs.fish; 171 | homeMode = "770"; 172 | openssh.authorizedKeys.keyFiles = [config.sops.secrets.ssh_public.path]; 173 | hashedPasswordFile = config.sops.secrets.user_pass.path; 174 | extraGroups = ["wheel" "libvirtd" "input"]; 175 | }; 176 | }; 177 | 178 | home-manager = { 179 | backupFileExtension = "bak"; 180 | useGlobalPkgs = true; 181 | useUserPackages = true; 182 | extraSpecialArgs = { 183 | inherit inputs pkgs-stable; 184 | inherit pcName myUserName mailId; 185 | }; 186 | users.${myUserName} = import ../home; 187 | }; 188 | 189 | nixpkgs.config = import ../home/nixpkgs.nix; 190 | 191 | # NOTE: virt-manager setup 192 | # virtualisation.libvirtd.enable = true; 193 | # programs.virt-manager.enable = true; 194 | 195 | system.stateVersion = "25.05"; 196 | } 197 | -------------------------------------------------------------------------------- /nixos/hardware.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | inputs, 4 | pcName, 5 | ... 6 | }: { 7 | imports = [ 8 | inputs.nix-gaming.nixosModules.pipewireLowLatency 9 | ]; 10 | services = { 11 | xserver = { 12 | xkb = { 13 | layout = "us"; 14 | variant = ""; 15 | options = "caps:escape,altwin:swap_lalt_lwin"; 16 | }; 17 | videoDrivers = ["nvidia"]; 18 | }; 19 | 20 | blueman.enable = true; 21 | 22 | pipewire = { 23 | enable = true; 24 | alsa.enable = true; 25 | alsa.support32Bit = true; 26 | jack.enable = true; 27 | pulse.enable = true; 28 | lowLatency.enable = true; 29 | }; 30 | }; 31 | 32 | hardware = { 33 | bluetooth = { 34 | enable = true; 35 | powerOnBoot = true; 36 | }; 37 | 38 | graphics = { 39 | enable = true; 40 | enable32Bit = true; 41 | }; 42 | 43 | nvidia = { 44 | modesetting.enable = true; 45 | open = true; 46 | powerManagement.enable = true; 47 | forceFullCompositionPipeline = true; 48 | nvidiaSettings = true; 49 | package = config.boot.kernelPackages.nvidiaPackages.beta; 50 | }; 51 | 52 | cpu.amd.updateMicrocode = true; 53 | 54 | # NOTE: wacom fix 55 | # opentabletdriver.enable = true; 56 | }; 57 | 58 | networking = { 59 | hostName = pcName; 60 | wireless.enable = false; 61 | useNetworkd = true; 62 | 63 | wg-quick.interfaces = { 64 | jp = { 65 | autostart = false; 66 | address = ["10.2.0.2/32"]; 67 | dns = ["10.2.0.1"]; 68 | privateKeyFile = config.sops.secrets.vpn_private_jp.path; 69 | peers = [ 70 | { 71 | publicKey = "5fFhuzIQPu8C4tySJuCJYg/13g75APFtMnqn3oeCpxk="; 72 | allowedIPs = ["0.0.0.0/0"]; 73 | endpoint = "193.148.16.2:51820"; 74 | persistentKeepalive = 25; 75 | } 76 | ]; 77 | }; 78 | us = { 79 | autostart = false; 80 | address = ["10.2.0.2/32"]; 81 | dns = ["10.2.0.1"]; 82 | privateKeyFile = config.sops.secrets.vpn_private_us.path; 83 | peers = [ 84 | { 85 | publicKey = "ksK3faRBQlFLul2FcKPphBR9LYR+6/FbP1etg0T2liA="; 86 | allowedIPs = ["0.0.0.0/0"]; 87 | endpoint = "37.19.221.198:51820"; 88 | persistentKeepalive = 25; 89 | } 90 | ]; 91 | }; 92 | nl = { 93 | autostart = false; 94 | address = ["10.2.0.2/32"]; 95 | dns = ["10.2.0.1"]; 96 | privateKeyFile = config.sops.secrets.vpn_private_nl.path; 97 | peers = [ 98 | { 99 | publicKey = "jA3Pf5MWpHk8STrLXVPyM28aV3yAZgw9nEGoIFAyxiI="; 100 | allowedIPs = ["0.0.0.0/0"]; 101 | endpoint = "185.177.124.190:51820"; 102 | persistentKeepalive = 25; 103 | } 104 | ]; 105 | }; 106 | }; 107 | }; 108 | 109 | boot.kernelModules = ["nvidia_uvm"]; 110 | 111 | boot.kernel.sysctl = { 112 | "kernel.sysrq" = 0; 113 | "net.ipv4.icmp_ignore_bogus_error_responses" = 1; 114 | "net.ipv4.conf.default.rp_filter" = 1; 115 | "net.ipv4.conf.all.rp_filter" = 1; 116 | "net.ipv4.conf.all.accept_source_route" = 0; 117 | "net.ipv6.conf.all.accept_source_route" = 0; 118 | "net.ipv4.conf.all.send_redirects" = 0; 119 | "net.ipv4.conf.default.send_redirects" = 0; 120 | "net.ipv4.conf.all.accept_redirects" = 0; 121 | "net.ipv4.conf.default.accept_redirects" = 0; 122 | "net.ipv4.conf.all.secure_redirects" = 0; 123 | "net.ipv4.conf.default.secure_redirects" = 0; 124 | "net.ipv6.conf.all.accept_redirects" = 0; 125 | "net.ipv6.conf.default.accept_redirects" = 0; 126 | "net.ipv4.tcp_syncookies" = 1; 127 | "net.ipv4.tcp_rfc1337" = 1; 128 | "net.ipv4.tcp_fastopen" = 3; 129 | "net.ipv4.tcp_congestion_control" = "bbr"; 130 | "net.core.default_qdisc" = "cake"; 131 | }; 132 | } 133 | -------------------------------------------------------------------------------- /nixos/packages.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | inputs, 4 | pkgs-stable, 5 | ... 6 | }: { 7 | environment.systemPackages = with pkgs; [ 8 | # CLI 9 | ## internet 10 | aria2 11 | curl 12 | wget 13 | yt-dlp 14 | rsync 15 | rclone 16 | (ani-cli.override {mpv = null;}) 17 | 18 | ## rusty unix 19 | dust 20 | xcp 21 | duf 22 | fd 23 | file 24 | sd 25 | ripgrep 26 | jaq 27 | 28 | ## helpful 29 | gcc 30 | xdg-utils 31 | ffmpeg 32 | nvtopPackages.nvidia 33 | sqlite 34 | timg 35 | imagemagick 36 | playerctl 37 | translate-shell 38 | pulsemixer 39 | 40 | ## wayland 41 | grimblast 42 | cliphist 43 | swww 44 | wl-clipboard 45 | eww 46 | wayvnc 47 | 48 | ## nix 49 | microfetch 50 | nix-output-monitor 51 | nurl 52 | nix-tree 53 | nix-init 54 | nvd 55 | sops 56 | 57 | ## compression 58 | zip 59 | unzip 60 | rar 61 | unrar 62 | _7zz 63 | 64 | # GUI 65 | pkgs-stable.calibre 66 | pkgs-stable.vesktop 67 | pkgs-stable.qbittorrent 68 | nautilus 69 | qalculate-qt 70 | glava 71 | pkgs-stable.nsxiv 72 | gimp 73 | 74 | ## games 75 | heroic 76 | (prismlauncher.override {jdks = with pkgs; [jdk23 jdk21 jdk17];}) 77 | protonup-qt 78 | # shipwright 79 | yuzu 80 | 81 | ### VNs 82 | pkgs-stable.onscripter-en 83 | 84 | ### emulators 85 | pkgs-stable.desmume 86 | pkgs-stable.mgba 87 | snes9x-gtk 88 | inputs.zen-browser.packages."${system}".default 89 | 90 | pkgs-stable.pcsx2 91 | 92 | # DEV 93 | 94 | ## libs 95 | libnotify 96 | gtk3 97 | libsixel 98 | openssl 99 | xwayland 100 | 101 | ## docs 102 | man-pages 103 | man-pages-posix 104 | 105 | ## langs 106 | python3 107 | python312Packages.ipython 108 | zig 109 | zls 110 | leiningen 111 | 112 | ## editors 113 | neovim 114 | emacs30-pgtk 115 | emacs-lsp-booster 116 | ]; 117 | } 118 | -------------------------------------------------------------------------------- /nixos/stylix.nix: -------------------------------------------------------------------------------- 1 | {pkgs, ...}: { 2 | stylix = { 3 | enable = true; 4 | polarity = "dark"; 5 | image = "${pkgs.my-misc}/share/passive/oxocarbon.png"; 6 | base16Scheme = { 7 | slug = "oxocarbon-dark"; 8 | name = "Oxocarbon Dark"; 9 | author = "shaunsingh/IBM"; 10 | palette = { 11 | base00 = "161616"; 12 | base01 = "262626"; 13 | base02 = "393939"; 14 | base03 = "525252"; 15 | base04 = "dde1e6"; 16 | base05 = "f2f4f8"; 17 | base06 = "ffffff"; 18 | base07 = "08bdba"; 19 | base08 = "3ddbd9"; 20 | base09 = "78a9ff"; 21 | base0A = "ee5396"; 22 | base0B = "33b1ff"; 23 | base0C = "ff7eb6"; 24 | base0D = "42be65"; 25 | base0E = "be95ff"; 26 | base0F = "82cfff"; 27 | }; 28 | }; 29 | fonts = rec { 30 | serif = { 31 | package = pkgs.my-fonts; 32 | name = "Kollektif"; 33 | }; 34 | sansSerif = serif; 35 | monospace = { 36 | package = pkgs.my-fonts; 37 | name = "Zenbones Proto"; 38 | }; 39 | emoji = { 40 | package = pkgs.noto-fonts-emoji; 41 | name = "Noto Color Emoji"; 42 | }; 43 | sizes = { 44 | applications = 13; 45 | desktop = 13; 46 | popups = 14; 47 | terminal = 15; 48 | }; 49 | }; 50 | opacity = { 51 | terminal = 0.90; 52 | popups = 0.85; 53 | desktop = 0.80; 54 | }; 55 | cursor = { 56 | package = pkgs.phinger-cursors; 57 | name = "phinger-cursors-light"; 58 | size = 32; 59 | }; 60 | }; 61 | fonts = { 62 | fontconfig.defaultFonts = rec { 63 | sansSerif = ["Yutapon coding Regular"]; 64 | serif = sansSerif; 65 | monospace = ["Symbols Nerd Font Mono" "Yutapon coding Regular"]; 66 | }; 67 | packages = with pkgs; [ 68 | my-fonts 69 | nerd-fonts.symbols-only 70 | ]; 71 | }; 72 | } 73 | -------------------------------------------------------------------------------- /pkgs/default.nix: -------------------------------------------------------------------------------- 1 | self: super: { 2 | fcitx5-fluent = self.callPackage ./fcitx5-fluent.nix {}; 3 | yuzu = self.callPackage ./yuzu.nix {}; 4 | mpv-youtube-search = self.mpvScripts.callPackage ./mpv-youtube-search.nix {}; 5 | 6 | librewolf = super.librewolf.override { 7 | extraPrefs = '' 8 | pref("devtools.source-map.client-service.enabled", false); 9 | pref("librewolf.console.logging_disabled", true) 10 | pref("devtools.toolbox.host", "window"); 11 | pref("privacy.resistFingerprinting", false); 12 | pref("webgl.disabled", false); 13 | pref("librewolf.debugger.force_detach", true); 14 | ''; 15 | }; 16 | 17 | onscripter-en = super.onscripter-en.overrideAttrs (oldAttrs: { 18 | version = "unstable-2024-07-21"; 19 | src = super.fetchFromGitHub { 20 | owner = "Galladite27"; 21 | repo = oldAttrs.pname; 22 | rev = "398b0328efe1e060301e7f8bfd2623c202646dd3"; 23 | hash = "sha256-AqvKiqRzA5ICu1BT3PW7PCSwsgzFsg1DunNErKi4SoI="; 24 | }; 25 | }); 26 | 27 | sptlrx = super.sptlrx.overrideAttrs (oldAttrs: { 28 | version = "unstable-2024-10-27"; 29 | src = super.fetchFromGitHub { 30 | owner = "raitonoberu"; 31 | repo = oldAttrs.pname; 32 | rev = "be71eb5defec847b467f5d69d10f0037e71fdfbe"; 33 | hash = "sha256-8dq7cxihrjSrJeOga7Jgzv5k4lbhavYJRi4uv60GkGc="; 34 | }; 35 | vendorHash = "sha256-N02+B8btheskAAhWnPpFN/E/aarCxmCi07sYnfsYDmY="; 36 | checkPhase = null; 37 | }); 38 | 39 | # NOTE: fuck glava; version below has --pipe and **actually** builds (fuck meson too) 40 | glava = super.glava.overrideAttrs (oldAttrs: { 41 | version = "unstable-no-meson"; 42 | src = super.fetchFromGitHub { 43 | owner = "wacossusca34"; 44 | repo = oldAttrs.pname; 45 | rev = "c766c574a6e952aff96920f66892d0503281f8aa"; 46 | sha256 = "sha256-Ay9p75z/bc2/2p6GkPiVGag0iMj/7w4loyr34iX98Z4="; 47 | }; 48 | postPatch = '' 49 | substituteInPlace shaders/bars.glsl \ 50 | --replace-fail "#define BAR_WIDTH 5" "#define BAR_WIDTH 8" \ 51 | --replace-fail "#define BAR_GAP 1" "#define BAR_GAP 2" 52 | ''; 53 | }); 54 | 55 | nix-output-monitor = let 56 | icons = { 57 | "↑" = "f062"; 58 | "↓" = "f063"; 59 | "⏱" = "f520"; 60 | "⏵" = "f04b"; 61 | "✔" = "f00c"; 62 | "⏸" = "f04c"; 63 | "⚠" = "f071"; 64 | "∅" = "f1da"; 65 | "∑" = "f04a0"; 66 | }; 67 | in 68 | super.nix-output-monitor.overrideAttrs { 69 | postPatch = '' 70 | substituteInPlace lib/NOM/Print.hs \ 71 | ${super.lib.concatLines (super.lib.mapAttrsToList (old: new: "--replace-fail '${old}' '\\x${new}' \\") icons)} 72 | ''; 73 | }; 74 | } 75 | -------------------------------------------------------------------------------- /pkgs/fcitx5-fluent.nix: -------------------------------------------------------------------------------- 1 | { 2 | stdenvNoCC, 3 | fetchFromGitHub, 4 | lib, 5 | }: 6 | stdenvNoCC.mkDerivation (finalAttrs: { 7 | pname = "fcitx5-fluentdark"; 8 | version = "v0.4.0"; 9 | 10 | src = fetchFromGitHub { 11 | owner = "Reverier-Xu"; 12 | repo = "FluentDark-fcitx5"; 13 | rev = finalAttrs.version; 14 | hash = "sha256-wefleY3dMM3rk1/cZn36n2WWLuRF9dTi3aeDDNiR6NU="; 15 | }; 16 | 17 | installPhase = '' 18 | mkdir -p $out/share/fcitx5/themes/FluentDark/ 19 | cp -r FluentDark/* $out/share/fcitx5/themes/FluentDark/ 20 | 21 | mkdir -p $out/share/fcitx5/themes/FluentDark-solid/ 22 | cp -r FluentDark-solid/* $out/share/fcitx5/themes/FluentDark-solid/ 23 | ''; 24 | 25 | meta = { 26 | description = "Fcitx5 theme based on Fluent Dark Colors"; 27 | homepage = "https://github.com/Reverier-Xu/FluentDark-fcitx5"; 28 | maintainers = [lib.maintainers._71zenith]; 29 | platforms = lib.platforms.all; 30 | }; 31 | }) 32 | -------------------------------------------------------------------------------- /pkgs/mpv-youtube-search.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | fetchFromGitHub, 4 | unstableGitUpdater, 5 | buildLua, 6 | }: 7 | buildLua (finalAttrs: { 8 | pname = "mpv-youtube-search"; 9 | 10 | version = "v1.0.0"; 11 | src = fetchFromGitHub { 12 | owner = "willswats"; 13 | repo = finalAttrs.pname; 14 | rev = "51dc4e5ef1f2b6953755427122cf4706b8f98a80"; 15 | hash = "sha256-LD3uhE0uELlOZlSbWe2+sqozqOmfRY4m75Cxu3LgUaw="; 16 | }; 17 | passthru.updateScript = unstableGitUpdater {}; 18 | meta = { 19 | description = "Search youtube from MPV"; 20 | homepage = "https://github.com/willswats/mpv-youtube-search"; 21 | license = lib.licenses.mit; 22 | maintainers = [lib.maintainers._71zenith]; 23 | }; 24 | }) 25 | -------------------------------------------------------------------------------- /pkgs/plugins-nvim.nix: -------------------------------------------------------------------------------- 1 | {pkgs, ...}: let 2 | inherit (pkgs) fetchFromGitHub; 3 | inherit (pkgs.vimUtils) buildVimPlugin; 4 | in { 5 | lualine-so-fancy = buildVimPlugin { 6 | name = "lualine-so-fancy"; 7 | doCheck = false; 8 | src = fetchFromGitHub { 9 | owner = "meuter"; 10 | repo = "lualine-so-fancy.nvim"; 11 | rev = "45197358e5274d301d98638bf079f3437d6eacf8"; 12 | hash = "sha256-j6XI4cw1ouYEvSiKdam8RAqxefDqeLwe37Qir/UO+8g="; 13 | }; 14 | }; 15 | buffer-manager = buildVimPlugin { 16 | name = "buffer-manager"; 17 | doCheck = false; 18 | src = fetchFromGitHub { 19 | owner = "j-morano"; 20 | repo = "buffer_manager.nvim"; 21 | rev = "fd36131b2b3e0f03fd6353ae2ffc88cf920b3bbb"; 22 | hash = "sha256-abe9ZGmL7U9rC+LxC3LO5/bOn8lHke1FCKO0V3TZGs0="; 23 | }; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /pkgs/scripts.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | pkgs, 4 | }: let 5 | inherit (pkgs) writeShellScriptBin writeShellScript wtype tesseract5 socat; 6 | _ = pkgs.lib.getExe; 7 | in { 8 | wlOcr = writeShellScript "wlOcr" '' 9 | grimblast save area - | ${_ tesseract5} -l eng+jpn+jpn_vert+kor+kor_vert+deu+rus - - | wl-copy 10 | echo "$(wl-paste)" 11 | notify-send -- "$(wl-paste)" 12 | ''; 13 | transLiner = writeShellScript "transLiner" '' 14 | wl-paste | trans -no-warn -no-autocorrect -b -t en | wl-copy 15 | echo "$(wl-paste)" 16 | notify-send -- "$(wl-paste)" 17 | ''; 18 | openMedia = writeShellScript "openMedia" '' 19 | trap 'rm -rf /tmp/mpvsocket' EXIT TERM KILL 20 | case "$(wl-paste --list-types)" in 21 | *text*) 22 | notify-send 'Opening URL' 23 | if [ -e "$(wl-paste)" ]; then 24 | wl-paste | xargs -0 xdg-open || notify-send 'Clipboard content is not media' 25 | else 26 | if [ -e /tmp/mpvsocket ]; then 27 | echo "loadfile $(wl-paste)" | ${_ socat} - /tmp/mpvsocket 28 | else 29 | mpv "$(wl-paste)" --title="mpvplay" --no-resume-playback --input-ipc-server="/tmp/mpvsocket" || notify-send "Not a valid URL !!" 30 | fi 31 | fi 32 | ;; 33 | *image*) 34 | notify-send 'Opening image' 35 | wl-paste | mpv - 36 | ;; 37 | *) 38 | wl-paste | xargs -0 xdg-open || notify-send 'Clipboard content is not media' 39 | exit 1 40 | ;; 41 | esac 42 | ''; 43 | copyVid = writeShellScript "copyVid" '' 44 | url=$(wl-paste | sed 's/x.com/twitter.com/g') 45 | notify-send "Downloading..." 46 | ! yt-dlp -f "best[ext=mp4]" --embed-thumbnail --force-overwrites "$url" --paths "/tmp" --output send.mp4 && notify-send "Not a valid URL !!" && exit 1 47 | wl-copy -t text/uri-list "file:///tmp/send.mp4" && notify-send "Copied to clipboard" 48 | ''; 49 | rofiGuard = writeShellScript "rofiGuard" '' 50 | build_rofi() { 51 | gv="$(systemctl list-unit-files --type=service --all | sed -nE 's/^(wg-quick.+).service.*/\1/p')" 52 | echo "$gv" | rofi -theme-str 'window { width: 300px; }' -dmenu -p "󰖂" -mesg "$1" -l "$(echo "$gv" | wc -l) -filter" 53 | } 54 | act_on_rofi() { 55 | [ -z "$1" ] && exit 1 56 | [ "$1" = "$2" ] && sudo systemctl stop "$1" && notify-send "Switched OFF" "$1" && exit 0 57 | [ -n "$2" ] && sudo systemctl stop "$2" && notify-send "Switched OFF" "$2" 58 | sudo systemctl start "$1" && notify "ON" "$1" && exit 0 59 | } 60 | if [ -z "$(sudo wg)" ]; then 61 | act_on_rofi "$(build_rofi "STATUS: OFF")" 62 | else 63 | ga=$(systemctl list-units --type=service | sed -nE 's/(wg-quick.+).service.*/\1/p' | tr -d ' ') 64 | act_on_rofi "$(build_rofi "STATUS: ON $ga")" "$ga" 65 | fi 66 | ''; 67 | _4khd = writeShellScriptBin "4khd" '' 68 | player=debug 69 | while [ $# -gt 0 ]; do 70 | case "$1" in 71 | -d | --download ) player=download ;; 72 | -p | --player ) 73 | [ "$#" -lt 2 ] && printf "\033[2K\r\033[1;31m%s\033[0m\n" "missing argument!" && exit 1 74 | player=$2 75 | shift 76 | ;; 77 | -h | --help) 78 | printf "%s\n" "''${0##*/} -d | --download | -p | --player | -h | --help" 79 | exit 0 80 | ;; 81 | *) query="''${query} ''${1}";; 82 | esac 83 | shift 84 | done 85 | [ -z "$query" ] && printf "%s\n" "''${0##*/} -d | --download | -p | --player | -h | --help" && exit 1 86 | for i in $query; do 87 | html=$(curl -Ls "$i" | tr -d '\0') 88 | links=$(printf "%s" "$html" | sed -nE 's|^(

)?([^<]*).*/\1/p') 91 | 92 | for j in $pages; do 93 | extra_links=$(curl -Ls "''${i}/''${j}" | sed -nE 's|^(

)?&1 >/dev/null 111 | while [ -z $input ]; do 112 | ${_ wtype} -M ctrl -M shift f -m ctrl -m shift 113 | input="$(tr ' ' '\n' < /tmp/console | tr -d \' | tr -d \" | tr -d \[ | tr -d \] | tr -d \{ | tr -d \} | tr -d \( | tr -d \) | sed 's|=|\n|' | tr -s '\n')" 114 | done 115 | IFS=" 116 | " 117 | for i in $input; do 118 | [ -e "$i" ] && echo "$i" 119 | done 120 | ''; 121 | epubOpen = writeShellScript "epubOpen" '' 122 | epubs=$(fd -e=epub . ~/kindle/) 123 | IFS=" 124 | " 125 | open() { 126 | file=$(cat -) 127 | [ -n "$file" ] && zathura "$file.epub" 128 | } 129 | for i in $epubs; do 130 | image="$(dirname "$i")/cover.jpg" 131 | echo -en "''${i%.epub}\0icon\x1f$image\n" 132 | done | rofi -i -dmenu -display-column-separator "/" -display-columns 7 -theme preview -p "" -theme-str 'icon-current-entry { size: 35%;}' | open 133 | ''; 134 | glavaShow = writeShellScript "glavaShow" '' 135 | id=$(pulsemixer -l | grep glava | sed -nE 's/.*ID: (.+?), Name.*/\1/p') 136 | ([ -n "$id" ] && pulsemixer --id $id --toggle-mute) || (tail -f /tmp/cover.info 2>/dev/null | glava --pipe=fg) 137 | ''; 138 | openVNC = writeShellScript "openVNC" '' 139 | set -e 140 | wayvnc 0.0.0.0 & 141 | notify-send "Starting VNC session" 142 | wait 143 | trap 'notify-send "Ending VNC session"' EXIT 144 | ''; 145 | copyPalette = let 146 | colorsWithNames = builtins.concatStringsSep "\n" ( 147 | map 148 | (colorName: let 149 | colorValue = config.stylix.base16Scheme.palette.${colorName}; 150 | in "#${toString colorValue} (${builtins.substring 4 2 colorName})") 151 | (builtins.attrNames config.stylix.base16Scheme.palette) 152 | ); 153 | in 154 | writeShellScript "copyPalette" '' 155 | echo "${colorsWithNames}" | rofi -i -dmenu -theme-str 'listview { columns: 2; lines: 8; } window { width: 500px; }' -markup-rows -p "🎨" -mesg "Choose a color" | cut -d\' -f2 | wl-copy && ([ "$1" = "glava" ] && echo "fg = $(wl-paste)" > /tmp/cover.info || eww update col="$(wl-paste)") 156 | ''; 157 | } 158 | -------------------------------------------------------------------------------- /pkgs/yuzu.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchurl, 3 | appimageTools, 4 | ... 5 | }: let 6 | pname = "yuzu"; 7 | version = "EA-4176"; 8 | 9 | src = fetchurl { 10 | url = "https://archive.org/download/citra-qt-and-yuzu-EA/Linux-Yuzu-EA-4176.AppImage"; 11 | sha256 = "sha256-bUTVL8br2POy5HB1FszlNQNChdRWcwIlG6/RCceXIlg="; 12 | }; 13 | 14 | appimage-contents = appimageTools.extract { 15 | inherit pname version src; 16 | }; 17 | 18 | desktop-file-name = "org.yuzu_emu.yuzu"; 19 | in 20 | appimageTools.wrapAppImage { 21 | inherit pname version; 22 | src = appimage-contents; 23 | extraInstallCommands = '' 24 | install -m 444 -D ${appimage-contents}/${desktop-file-name}.desktop -t $out/share/applications 25 | cp -r ${appimage-contents}/usr/share/icons $out/share 26 | ''; 27 | } 28 | -------------------------------------------------------------------------------- /secrets/secrets.yaml: -------------------------------------------------------------------------------- 1 | welcome: ENC[AES256_GCM,data:XReKAcBqiU6lweF+StFNyg==,iv:Wz8KzUYEXljGn92c0YEVw93HnGhUT2xsQvvgSas4Wk8=,tag:jL/lA9VJwY+vLjdQgYCeqw==,type:str] 2 | root_pass: ENC[AES256_GCM,data:EEca6h1NWe59sQZVdEJpB5KwsbOY+DWlSsdBhjyrTavc4MaaJVWcSoj55guCXiZN1LVLsNMo5B8h2GQp46Gp6vl8L1rfccwreg==,iv:2aStFBRO3Z78IfYb+S8gmE89ZRzeHNLYrLLBMoIkiHI=,tag:BUalKIjX63e8oeD3Af0PvQ==,type:str] 3 | user_pass: ENC[AES256_GCM,data:ADG/Rv1u++5set3woTBR4689x+RYJZslJPbHTmLipc3jt/OG2ZWWBkZPykx7CsQD1hQMbR2U1K6c8vndTf4t6FLKoMNUVuOoAA==,iv:FRmeM0v9AiPNsVzPEmAT0AizQK1USxAkHKBebDymns0=,tag:uIW0J6GE9O/ypA409LvqaQ==,type:str] 4 | spot_username: ENC[AES256_GCM,data:/ezCbbpNVvhMfk56oFzOMbqZ8uxSNb1TG+k7Mg==,iv:bnoH5+dprMuAyAVgeAnEYVNgDYoDa+U/qEhbZkmnPYg=,tag:yOq5qAd6fkvYD4A801G92Q==,type:str] 5 | spot_auth_data: ENC[AES256_GCM,data:aBPRzukvxBz7MsVnmcRVdYxgjtRgOVJ84Oqdr9ViE7WzhU8zHMb1xEcCJ3b4hxj49y85Npvxcb8Ejcekn/5TG61RhmDXuXH/RG4EjHbhMG234HC4uLqxjB+ryMIxw2BVv7icmpXGY45pCny7NPUJgYT8SeCWGk/7PXEPnhnNmfgqA+QYoHreDnqkoGP4u3WMo0NiTiBwX/qHy724VUWpV2zm3XyH3vcIPORRCXBJhUsF3QyekKenJj9+5kjn48x2Qtv78ZrX53/vCLyJlRFvY42ucTr7L30eC81qAQiNapIvUFF9wFKCualuGoAhF3avQSTUVB2CGnwL4mbbLQdsIhzagqEoz9hKNeuGhmQRY3CjY16edtEeNcWdzJy5s8fFqsVAAO7p8qRhLDJ4,iv:ZOrkSkLt7DFjIEwZ0zpuvmcNdPRrtwbPBkSua18bvpc=,tag:XsLhez13RVH76HGQgv1Ylg==,type:str] 6 | spot_client_id: ENC[AES256_GCM,data:H3AZab1oIXQlLlutylbZxHD4z7o7hKGMflLXb8SHUw0=,iv:Eeq2OVEVnc/t1MVG2ZeGo5oD5GyChCqlNsR/4slLhWo=,tag:Glt7dkrG2nOydicYIQM8kg==,type:str] 7 | vpn_private_jp: ENC[AES256_GCM,data:QRLB9FNbkIXIBIie+hR/2rfdcM57se0IIJ9DvvAqkgYWOflzEOkLhqcdRmI=,iv:s1n0Fq7/Kub9vPkro1wFQDBu7zD+4Iy6zDfn3QeF5VI=,tag:uhbsTVZegInS1pWXqykpUQ==,type:str] 8 | vpn_private_nl: ENC[AES256_GCM,data:88COOiqNV4YjrmRdrSOVW9wflEgCtjF8iw3CWLVdHvvTAgcNp6XnKwiEIj4=,iv:+Sviyh+8ih4o2gwtCggyF8m4QvQxZEduqWOpTCbybyE=,tag:+t886I56ULbhleT8oLvruw==,type:str] 9 | vpn_private_us: ENC[AES256_GCM,data:1kkRfRfK1WL9Royezl6le/HFipLu1nnKLUGcvHcn7xLIW1WgguMtMw6QQM4=,iv:AQ5Rt+jZPLOvbYSdBNtMVbhvfpVnOLPafzLRIKxx608=,tag:BB8NC0yGtQ24vH8B+ShbHw==,type:str] 10 | ssh_public: ENC[AES256_GCM,data:BJtDekq1KCiQATObplh56avD0Egn8vr9/s9+bwCOz5D9UpdRVCCvmeOMUPLhTFuRZWG0AhcM6Tdhd9T24ZK2RB4w/IhjoOhdw3GDaluHLcg=,iv:HVze1C0zk7oDErx4cjEsbjX8fKieyDjZsa6Ga/pfw4Y=,tag:K+8qwRbgYvn9efIIUiIB+Q==,type:str] 11 | sops: 12 | kms: [] 13 | gcp_kms: [] 14 | azure_kv: [] 15 | hc_vault: [] 16 | age: 17 | - recipient: age15s6yzdcqkknkele2lw77utgze3cul8vzt9jmtvquu26mckcutslsdpm6x4 18 | enc: | 19 | -----BEGIN AGE ENCRYPTED FILE----- 20 | YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBuQ0svUDMzMU1FcnRiRzdX 21 | VkJqQVZERCt3T09pYUJhLzdCOVVSR0JmYkdFCkpYZGltdE5kYnArVEYzdnZnUEFT 22 | UmpEbWZuN1pGM2wzUnY4cTNmUEpHRFUKLS0tIE94QjRBdDNvSnYwQ0J3dGJoTjh2 23 | YXJ6dlkrMENtZGlQK1p6TEd0MnZ3c28KURTvKmzkWX07KY7xF/+OUtpAq+UQkSuk 24 | VRnnExRp49ZNuGmz/DjzfTx4nywfXih4NjMagRmhDGv5iIL7rIuFPg== 25 | -----END AGE ENCRYPTED FILE----- 26 | lastmodified: "2025-01-01T05:55:09Z" 27 | mac: ENC[AES256_GCM,data:uMef0ezkGo7XvJjDz3Ympr7797rIWmkca2yDnBmu0CN2b24tdJkdqjMMopHW2P6Q6iA8ddvAMvw9izuvWbJD3vLy32ozTVGFT0C1RnTYKC96e2NDsnQT1uHagITj+IsayKmTFbcUDhnhbSeWPafSIBmaaD9q9V/5xl/EFjE+GM4=,iv:ECQ6jhEyKAhnvOJ4cUM13vhgkUoGtHheenPfuVHd1oc=,tag:ZQQWJG8y9kk1eSAeH2lfTQ==,type:str] 28 | pgp: [] 29 | unencrypted_suffix: _unencrypted 30 | version: 3.9.2 31 | --------------------------------------------------------------------------------