├── .editorconfig ├── .envrc ├── .github ├── CODEOWNERS ├── dependabot.yml └── workflows │ ├── build.yml │ ├── check.yml │ ├── nix.yml │ ├── update-flake.yml │ └── update-pkgs.yml ├── .gitignore ├── LICENSE ├── README.md ├── default.nix ├── flake.lock ├── flake.nix ├── npins ├── default.nix └── sources.json ├── pkgs ├── ai-robots-txt │ └── package.nix ├── alejandra-custom │ ├── 0001-no-ads.patch │ ├── 0002-spaced-elements.patch │ └── package.nix ├── ani-cli-git │ └── package.nix ├── foot-git │ ├── package.nix │ └── patches │ │ └── foot_fullscreen_alpha.patch ├── fuzzel-git │ └── package.nix ├── headscale-ui │ └── package.nix ├── mastodon-bird-ui │ └── package.nix └── zsh-stripped │ ├── 0001-globquote.patch │ ├── 0001-remote-complete-files.patch │ └── package.nix └── shell.nix /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_style = space 7 | indent_size = 4 8 | insert_final_newline = true 9 | tab_width = 4 10 | trim_trailing_whitespace = true 11 | 12 | [*.md] 13 | indent_style = space 14 | indent_size = 2 15 | trim_trailing_whitespace = false 16 | 17 | [*.{nix,sh,yml,yaml}] 18 | indent_style = space 19 | indent_size = 2 20 | tab_width = 2 21 | 22 | [*.{lock,diff,patch}] 23 | indent_style = unset 24 | indent_size = unset 25 | insert_final_newline = unset 26 | trim_trailing_whitespace = unset 27 | end_of_line = unset 28 | 29 | 30 | -------------------------------------------------------------------------------- /.envrc: -------------------------------------------------------------------------------- 1 | use flake 2 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @notashelf 2 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: github-actions 4 | directory: "/" 5 | schedule: 6 | interval: weekly 7 | time: "01:00" 8 | open-pull-requests-limit: 10 9 | reviewers: 10 | - NotAShelf 11 | assignees: 12 | - NotAShelf 13 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: 4 | workflow_dispatch: 5 | workflow_call: 6 | secrets: 7 | CACHIX_AUTH_TOKEN: 8 | required: false 9 | 10 | jobs: 11 | build: 12 | strategy: 13 | matrix: 14 | package: 15 | - ai-robots-txt 16 | - alejandra-custom 17 | - ani-cli-git 18 | - foot-git 19 | - fuzzel-git 20 | - headscale-ui 21 | - mastodon-bird-ui 22 | - zsh-stripped 23 | 24 | uses: ./.github/workflows/nix.yml 25 | with: 26 | command: nix build -L .#${{ matrix.package }} -v 27 | secrets: inherit 28 | -------------------------------------------------------------------------------- /.github/workflows/check.yml: -------------------------------------------------------------------------------- 1 | name: Checks 2 | 3 | on: [push, pull_request, workflow_dispatch] 4 | 5 | jobs: 6 | check: 7 | strategy: 8 | matrix: 9 | command: 10 | - NIXPKGS_ALLOW_INSECURE=1 nix flake check --accept-flake-config --impure 11 | - nix run .#alejandra-custom -- -c . -e ./npins 12 | 13 | uses: ./.github/workflows/nix.yml 14 | with: 15 | command: ${{ matrix.command }} 16 | 17 | build: 18 | needs: check 19 | uses: ./.github/workflows/build.yml 20 | secrets: inherit 21 | -------------------------------------------------------------------------------- /.github/workflows/nix.yml: -------------------------------------------------------------------------------- 1 | name: Nix 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | command: 7 | required: true 8 | type: string 9 | secrets: 10 | CACHIX_AUTH_TOKEN: 11 | required: false 12 | 13 | jobs: 14 | nix: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/checkout@v4 18 | - name: Install Lix 19 | uses: DeterminateSystems/nix-installer-action@main 20 | with: 21 | source-url: https://install.lix.systems/lix/lix-installer-x86_64-linux 22 | logger: pretty 23 | - uses: cachix/cachix-action@v16 24 | with: 25 | name: nyx 26 | authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" 27 | - run: ${{ inputs.command }} 28 | -------------------------------------------------------------------------------- /.github/workflows/update-flake.yml: -------------------------------------------------------------------------------- 1 | name: Update flake 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: "0 0 * * 0" # weekly 7 | 8 | jobs: 9 | update: 10 | if: github.repository == 'notashelf/nyxexprs' 11 | runs-on: ubuntu-latest 12 | 13 | permissions: 14 | contents: write 15 | 16 | steps: 17 | - name: Checkout 18 | uses: actions/checkout@v4 19 | with: 20 | token: "${{ secrets.GH_TOKEN}}" 21 | 22 | - uses: DeterminateSystems/nix-installer-action@main 23 | 24 | - uses: cachix/cachix-action@v16 25 | with: 26 | name: nyx 27 | authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" 28 | 29 | - name: Update flake 30 | run: nix flake update 31 | 32 | - uses: stefanzweifel/git-auto-commit-action@v5 33 | with: 34 | commit_message: "[CI]: update flake inputs" 35 | push_options: "--force" 36 | commit_user_name: GitHub Actions 37 | 38 | build: 39 | needs: update 40 | uses: ./.github/workflows/build.yml 41 | secrets: inherit 42 | -------------------------------------------------------------------------------- /.github/workflows/update-pkgs.yml: -------------------------------------------------------------------------------- 1 | name: Update packages 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: "0 0 * * *" # daily 7 | 8 | jobs: 9 | update: 10 | if: github.repository == 'notashelf/nyxexprs' 11 | runs-on: ubuntu-latest 12 | 13 | permissions: 14 | contents: write 15 | 16 | steps: 17 | - name: Checkout 18 | uses: actions/checkout@v4 19 | with: 20 | token: "${{ secrets.GH_TOKEN}}" 21 | 22 | - uses: DeterminateSystems/nix-installer-action@main 23 | 24 | - uses: cachix/cachix-action@v16 25 | with: 26 | name: nyx 27 | authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" 28 | 29 | - name: Update npins 30 | run: nix run nixpkgs#npins update 31 | 32 | - uses: stefanzweifel/git-auto-commit-action@v5 33 | with: 34 | commit_message: "[CI]: update npins" 35 | push_options: "--force" 36 | commit_user_name: GitHub Actions 37 | 38 | build: 39 | needs: update 40 | uses: ./.github/workflows/build.yml 41 | secrets: inherit 42 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # ignore build symlinks 2 | result* 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | EUROPEAN UNION PUBLIC LICENCE v. 1.2 2 | EUPL © the European Union 2007, 2016 3 | 4 | This European Union Public Licence (the ‘EUPL’) applies to the Work (as defined 5 | below) which is provided under the terms of this Licence. Any use of the Work, 6 | other than as authorised under this Licence is prohibited (to the extent such 7 | use is covered by a right of the copyright holder of the Work). 8 | 9 | The Work is provided under the terms of this Licence when the Licensor (as 10 | defined below) has placed the following notice immediately following the 11 | copyright notice for the Work: 12 | 13 | Licensed under the EUPL 14 | 15 | or has expressed by any other means his willingness to license under the EUPL. 16 | 17 | 1. Definitions 18 | 19 | In this Licence, the following terms have the following meaning: 20 | 21 | - ‘The Licence’: this Licence. 22 | 23 | - ‘The Original Work’: the work or software distributed or communicated by the 24 | Licensor under this Licence, available as Source Code and also as Executable 25 | Code as the case may be. 26 | 27 | - ‘Derivative Works’: the works or software that could be created by the 28 | Licensee, based upon the Original Work or modifications thereof. This Licence 29 | does not define the extent of modification or dependence on the Original Work 30 | required in order to classify a work as a Derivative Work; this extent is 31 | determined by copyright law applicable in the country mentioned in Article 15. 32 | 33 | - ‘The Work’: the Original Work or its Derivative Works. 34 | 35 | - ‘The Source Code’: the human-readable form of the Work which is the most 36 | convenient for people to study and modify. 37 | 38 | - ‘The Executable Code’: any code which has generally been compiled and which is 39 | meant to be interpreted by a computer as a program. 40 | 41 | - ‘The Licensor’: the natural or legal person that distributes or communicates 42 | the Work under the Licence. 43 | 44 | - ‘Contributor(s)’: any natural or legal person who modifies the Work under the 45 | Licence, or otherwise contributes to the creation of a Derivative Work. 46 | 47 | - ‘The Licensee’ or ‘You’: any natural or legal person who makes any usage of 48 | the Work under the terms of the Licence. 49 | 50 | - ‘Distribution’ or ‘Communication’: any act of selling, giving, lending, 51 | renting, distributing, communicating, transmitting, or otherwise making 52 | available, online or offline, copies of the Work or providing access to its 53 | essential functionalities at the disposal of any other natural or legal 54 | person. 55 | 56 | 2. Scope of the rights granted by the Licence 57 | 58 | The Licensor hereby grants You a worldwide, royalty-free, non-exclusive, 59 | sublicensable licence to do the following, for the duration of copyright vested 60 | in the Original Work: 61 | 62 | - use the Work in any circumstance and for all usage, 63 | - reproduce the Work, 64 | - modify the Work, and make Derivative Works based upon the Work, 65 | - communicate to the public, including the right to make available or display 66 | the Work or copies thereof to the public and perform publicly, as the case may 67 | be, the Work, 68 | - distribute the Work or copies thereof, 69 | - lend and rent the Work or copies thereof, 70 | - sublicense rights in the Work or copies thereof. 71 | 72 | Those rights can be exercised on any media, supports and formats, whether now 73 | known or later invented, as far as the applicable law permits so. 74 | 75 | In the countries where moral rights apply, the Licensor waives his right to 76 | exercise his moral right to the extent allowed by law in order to make effective 77 | the licence of the economic rights here above listed. 78 | 79 | The Licensor grants to the Licensee royalty-free, non-exclusive usage rights to 80 | any patents held by the Licensor, to the extent necessary to make use of the 81 | rights granted on the Work under this Licence. 82 | 83 | 3. Communication of the Source Code 84 | 85 | The Licensor may provide the Work either in its Source Code form, or as 86 | Executable Code. If the Work is provided as Executable Code, the Licensor 87 | provides in addition a machine-readable copy of the Source Code of the Work 88 | along with each copy of the Work that the Licensor distributes or indicates, in 89 | a notice following the copyright notice attached to the Work, a repository where 90 | the Source Code is easily and freely accessible for as long as the Licensor 91 | continues to distribute or communicate the Work. 92 | 93 | 4. Limitations on copyright 94 | 95 | Nothing in this Licence is intended to deprive the Licensee of the benefits from 96 | any exception or limitation to the exclusive rights of the rights owners in the 97 | Work, of the exhaustion of those rights or of other applicable limitations 98 | thereto. 99 | 100 | 5. Obligations of the Licensee 101 | 102 | The grant of the rights mentioned above is subject to some restrictions and 103 | obligations imposed on the Licensee. Those obligations are the following: 104 | 105 | Attribution right: The Licensee shall keep intact all copyright, patent or 106 | trademarks notices and all notices that refer to the Licence and to the 107 | disclaimer of warranties. The Licensee must include a copy of such notices and a 108 | copy of the Licence with every copy of the Work he/she distributes or 109 | communicates. The Licensee must cause any Derivative Work to carry prominent 110 | notices stating that the Work has been modified and the date of modification. 111 | 112 | Copyleft clause: If the Licensee distributes or communicates copies of the 113 | Original Works or Derivative Works, this Distribution or Communication will be 114 | done under the terms of this Licence or of a later version of this Licence 115 | unless the Original Work is expressly distributed only under this version of the 116 | Licence — for example by communicating ‘EUPL v. 1.2 only’. The Licensee 117 | (becoming Licensor) cannot offer or impose any additional terms or conditions on 118 | the Work or Derivative Work that alter or restrict the terms of the Licence. 119 | 120 | Compatibility clause: If the Licensee Distributes or Communicates Derivative 121 | Works or copies thereof based upon both the Work and another work licensed under 122 | a Compatible Licence, this Distribution or Communication can be done under the 123 | terms of this Compatible Licence. For the sake of this clause, ‘Compatible 124 | Licence’ refers to the licences listed in the appendix attached to this Licence. 125 | Should the Licensee's obligations under the Compatible Licence conflict with 126 | his/her obligations under this Licence, the obligations of the Compatible 127 | Licence shall prevail. 128 | 129 | Provision of Source Code: When distributing or communicating copies of the Work, 130 | the Licensee will provide a machine-readable copy of the Source Code or indicate 131 | a repository where this Source will be easily and freely available for as long 132 | as the Licensee continues to distribute or communicate the Work. 133 | 134 | Legal Protection: This Licence does not grant permission to use the trade names, 135 | trademarks, service marks, or names of the Licensor, except as required for 136 | reasonable and customary use in describing the origin of the Work and 137 | reproducing the content of the copyright notice. 138 | 139 | 6. Chain of Authorship 140 | 141 | The original Licensor warrants that the copyright in the Original Work granted 142 | hereunder is owned by him/her or licensed to him/her and that he/she has the 143 | power and authority to grant the Licence. 144 | 145 | Each Contributor warrants that the copyright in the modifications he/she brings 146 | to the Work are owned by him/her or licensed to him/her and that he/she has the 147 | power and authority to grant the Licence. 148 | 149 | Each time You accept the Licence, the original Licensor and subsequent 150 | Contributors grant You a licence to their contributions to the Work, under the 151 | terms of this Licence. 152 | 153 | 7. Disclaimer of Warranty 154 | 155 | The Work is a work in progress, which is continuously improved by numerous 156 | Contributors. It is not a finished work and may therefore contain defects or 157 | ‘bugs’ inherent to this type of development. 158 | 159 | For the above reason, the Work is provided under the Licence on an ‘as is’ basis 160 | and without warranties of any kind concerning the Work, including without 161 | limitation merchantability, fitness for a particular purpose, absence of defects 162 | or errors, accuracy, non-infringement of intellectual property rights other than 163 | copyright as stated in Article 6 of this Licence. 164 | 165 | This disclaimer of warranty is an essential part of the Licence and a condition 166 | for the grant of any rights to the Work. 167 | 168 | 8. Disclaimer of Liability 169 | 170 | Except in the cases of wilful misconduct or damages directly caused to natural 171 | persons, the Licensor will in no event be liable for any direct or indirect, 172 | material or moral, damages of any kind, arising out of the Licence or of the use 173 | of the Work, including without limitation, damages for loss of goodwill, work 174 | stoppage, computer failure or malfunction, loss of data or any commercial 175 | damage, even if the Licensor has been advised of the possibility of such damage. 176 | However, the Licensor will be liable under statutory product liability laws as 177 | far such laws apply to the Work. 178 | 179 | 9. Additional agreements 180 | 181 | While distributing the Work, You may choose to conclude an additional agreement, 182 | defining obligations or services consistent with this Licence. However, if 183 | accepting obligations, You may act only on your own behalf and on your sole 184 | responsibility, not on behalf of the original Licensor or any other Contributor, 185 | and only if You agree to indemnify, defend, and hold each Contributor harmless 186 | for any liability incurred by, or claims asserted against such Contributor by 187 | the fact You have accepted any warranty or additional liability. 188 | 189 | 10. Acceptance of the Licence 190 | 191 | The provisions of this Licence can be accepted by clicking on an icon ‘I agree’ 192 | placed under the bottom of a window displaying the text of this Licence or by 193 | affirming consent in any other similar way, in accordance with the rules of 194 | applicable law. Clicking on that icon indicates your clear and irrevocable 195 | acceptance of this Licence and all of its terms and conditions. 196 | 197 | Similarly, you irrevocably accept this Licence and all of its terms and 198 | conditions by exercising any rights granted to You by Article 2 of this Licence, 199 | such as the use of the Work, the creation by You of a Derivative Work or the 200 | Distribution or Communication by You of the Work or copies thereof. 201 | 202 | 11. Information to the public 203 | 204 | In case of any Distribution or Communication of the Work by means of electronic 205 | communication by You (for example, by offering to download the Work from a 206 | remote location) the distribution channel or media (for example, a website) must 207 | at least provide to the public the information requested by the applicable law 208 | regarding the Licensor, the Licence and the way it may be accessible, concluded, 209 | stored and reproduced by the Licensee. 210 | 211 | 12. Termination of the Licence 212 | 213 | The Licence and the rights granted hereunder will terminate automatically upon 214 | any breach by the Licensee of the terms of the Licence. 215 | 216 | Such a termination will not terminate the licences of any person who has 217 | received the Work from the Licensee under the Licence, provided such persons 218 | remain in full compliance with the Licence. 219 | 220 | 13. Miscellaneous 221 | 222 | Without prejudice of Article 9 above, the Licence represents the complete 223 | agreement between the Parties as to the Work. 224 | 225 | If any provision of the Licence is invalid or unenforceable under applicable 226 | law, this will not affect the validity or enforceability of the Licence as a 227 | whole. Such provision will be construed or reformed so as necessary to make it 228 | valid and enforceable. 229 | 230 | The European Commission may publish other linguistic versions or new versions of 231 | this Licence or updated versions of the Appendix, so far this is required and 232 | reasonable, without reducing the scope of the rights granted by the Licence. New 233 | versions of the Licence will be published with a unique version number. 234 | 235 | All linguistic versions of this Licence, approved by the European Commission, 236 | have identical value. Parties can take advantage of the linguistic version of 237 | their choice. 238 | 239 | 14. Jurisdiction 240 | 241 | Without prejudice to specific agreement between parties, 242 | 243 | - any litigation resulting from the interpretation of this License, arising 244 | between the European Union institutions, bodies, offices or agencies, as a 245 | Licensor, and any Licensee, will be subject to the jurisdiction of the Court 246 | of Justice of the European Union, as laid down in article 272 of the Treaty on 247 | the Functioning of the European Union, 248 | 249 | - any litigation arising between other parties and resulting from the 250 | interpretation of this License, will be subject to the exclusive jurisdiction 251 | of the competent court where the Licensor resides or conducts its primary 252 | business. 253 | 254 | 15. Applicable Law 255 | 256 | Without prejudice to specific agreement between parties, 257 | 258 | - this Licence shall be governed by the law of the European Union Member State 259 | where the Licensor has his seat, resides or has his registered office, 260 | 261 | - this licence shall be governed by Belgian law if the Licensor has no seat, 262 | residence or registered office inside a European Union Member State. 263 | 264 | Appendix 265 | 266 | ‘Compatible Licences’ according to Article 5 EUPL are: 267 | 268 | - GNU General Public License (GPL) v. 2, v. 3 269 | - GNU Affero General Public License (AGPL) v. 3 270 | - Open Software License (OSL) v. 2.1, v. 3.0 271 | - Eclipse Public License (EPL) v. 1.0 272 | - CeCILL v. 2.0, v. 2.1 273 | - Mozilla Public Licence (MPL) v. 2 274 | - GNU Lesser General Public Licence (LGPL) v. 2.1, v. 3 275 | - Creative Commons Attribution-ShareAlike v. 3.0 Unported (CC BY-SA 3.0) for 276 | works other than software 277 | - European Union Public Licence (EUPL) v. 1.1, v. 1.2 278 | - Québec Free and Open-Source Licence — Reciprocity (LiLiQ-R) or Strong 279 | Reciprocity (LiLiQ-R+). 280 | 281 | The European Commission may update this Appendix to later versions of the above 282 | licences without producing a new version of the EUPL, as long as they provide 283 | the rights granted in Article 2 of this Licence and protect the covered Source 284 | Code from exclusive appropriation. 285 | 286 | All other changes or additions to this Appendix require the production of a new 287 | EUPL version. 288 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🌙 nyxexprs 2 | 3 | My personal package overlay for sharing my most commonly used derivations. Kept 4 | up to date with Github workflows and npins. Contributions welcome. 5 | 6 | ## Usage 7 | 8 | All packages in Nyxexprs are exposed in the flake outputs. 9 | 10 | ### Flakes 11 | 12 | ```nix 13 | # flake.nix 14 | inputs = { 15 | # Add an input as such. Avoid adding "follows" lines if you would 16 | # like to benefit from the binary cache. 17 | nyxexprs.url = "github:notashelf/nyxexprs"; 18 | # ... 19 | }; 20 | ``` 21 | 22 | If you are using Nix on a non-NixOS distro, you may nix run to try out packages, 23 | or `nix profile install` to install them on your system profile. If using 24 | home-manager on non-NixOS, I recommend using `home.packages` instead. 25 | 26 | ### Binary Cache 27 | 28 | Regardless of your setup,you may want to add the 29 | [binary cache](https://app.cachix.org/cache/nyx) to your substituters to avoid 30 | building the provided packages on each pull. You may follow the example below to 31 | add the binary cache to your system. 32 | 33 | ```nix 34 | nix.settings = { 35 | builders-use-substitutes = true; 36 | substituters = [ 37 | # other substituters 38 | "https://nyx.cachix.org" 39 | ]; 40 | 41 | trusted-public-keys = [ 42 | # other trusted keys 43 | "nyx.cachix.org-1:xH6G0MO9PrpeGe7mHBtj1WbNzmnXr7jId2mCiq6hipE=" 44 | ]; 45 | }; 46 | ``` 47 | 48 | ## 🫂 Credits 49 | 50 | [@fufexan]: https://github.com/fufexan 51 | [nix-gaming]: https://github.com/fufexan/nix-gaming 52 | 53 | The repository structure is mostly borrowed from [@fufexan] 's [nix-gaming] 54 | repository. Thank you fuf! 55 | 56 | ## 📜 License 57 | 58 | This repository (Nix, patches, ettc.) is released under EUPL v1.2. Please see 59 | the [license file](./LICENSE) for more details. 60 | -------------------------------------------------------------------------------- /default.nix: -------------------------------------------------------------------------------- 1 | ( 2 | import 3 | ( 4 | let 5 | lock = builtins.fromJSON (builtins.readFile ./flake.lock); 6 | nodeName = lock.nodes.root.inputs.flake-compat; 7 | in 8 | fetchTarball { 9 | url = 10 | lock.nodes.${ 11 | nodeName 12 | }.locked.url 13 | or "https://github.com/edolstra/flake-compat/archive/${ 14 | lock.nodes.${nodeName}.locked.rev 15 | }.tar.gz"; 16 | sha256 = lock.nodes.${nodeName}.locked.narHash; 17 | } 18 | ) 19 | {src = ./.;} 20 | ) 21 | .defaultNix 22 | -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "flake-compat": { 4 | "flake": false, 5 | "locked": { 6 | "lastModified": 1747046372, 7 | "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", 8 | "owner": "edolstra", 9 | "repo": "flake-compat", 10 | "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", 11 | "type": "github" 12 | }, 13 | "original": { 14 | "owner": "edolstra", 15 | "repo": "flake-compat", 16 | "type": "github" 17 | } 18 | }, 19 | "flake-parts": { 20 | "inputs": { 21 | "nixpkgs-lib": "nixpkgs-lib" 22 | }, 23 | "locked": { 24 | "lastModified": 1743550720, 25 | "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", 26 | "owner": "hercules-ci", 27 | "repo": "flake-parts", 28 | "rev": "c621e8422220273271f52058f618c94e405bb0f5", 29 | "type": "github" 30 | }, 31 | "original": { 32 | "owner": "hercules-ci", 33 | "repo": "flake-parts", 34 | "type": "github" 35 | } 36 | }, 37 | "nixpkgs": { 38 | "locked": { 39 | "lastModified": 1748460289, 40 | "narHash": "sha256-7doLyJBzCllvqX4gszYtmZUToxKvMUrg45EUWaUYmBg=", 41 | "owner": "NixOS", 42 | "repo": "nixpkgs", 43 | "rev": "96ec055edbe5ee227f28cdbc3f1ddf1df5965102", 44 | "type": "github" 45 | }, 46 | "original": { 47 | "owner": "NixOS", 48 | "ref": "nixos-unstable", 49 | "repo": "nixpkgs", 50 | "type": "github" 51 | } 52 | }, 53 | "nixpkgs-lib": { 54 | "locked": { 55 | "lastModified": 1743296961, 56 | "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=", 57 | "owner": "nix-community", 58 | "repo": "nixpkgs.lib", 59 | "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa", 60 | "type": "github" 61 | }, 62 | "original": { 63 | "owner": "nix-community", 64 | "repo": "nixpkgs.lib", 65 | "type": "github" 66 | } 67 | }, 68 | "root": { 69 | "inputs": { 70 | "flake-compat": "flake-compat", 71 | "flake-parts": "flake-parts", 72 | "nixpkgs": "nixpkgs", 73 | "systems": "systems" 74 | } 75 | }, 76 | "systems": { 77 | "locked": { 78 | "lastModified": 1689347949, 79 | "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", 80 | "owner": "nix-systems", 81 | "repo": "default-linux", 82 | "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", 83 | "type": "github" 84 | }, 85 | "original": { 86 | "owner": "nix-systems", 87 | "repo": "default-linux", 88 | "type": "github" 89 | } 90 | } 91 | }, 92 | "root": "root", 93 | "version": 7 94 | } 95 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "A personal package overlay"; 3 | 4 | inputs = { 5 | nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 6 | flake-parts.url = "github:hercules-ci/flake-parts"; 7 | systems.url = "github:nix-systems/default-linux"; 8 | 9 | flake-compat = { 10 | url = "github:edolstra/flake-compat"; 11 | flake = false; 12 | }; 13 | }; 14 | 15 | outputs = { 16 | self, 17 | nixpkgs, 18 | flake-parts, 19 | ... 20 | } @ inputs: 21 | flake-parts.lib.mkFlake {inherit inputs self;} { 22 | systems = import inputs.systems; 23 | imports = [flake-parts.flakeModules.easyOverlay]; 24 | 25 | perSystem = { 26 | system, 27 | config, 28 | pkgs, 29 | lib, 30 | ... 31 | }: let 32 | inherit (builtins) concatStringsSep match; 33 | inherit (lib.attrsets) recursiveUpdate; 34 | inherit (lib.filesystem) packagesFromDirectoryRecursive; 35 | inherit (lib.customisation) callPackageWith; 36 | 37 | pins = import ./npins; 38 | date = concatStringsSep "-" (match "(.{4})(.{2})(.{2}).*" self.lastModifiedDate); 39 | in { 40 | _module.args.pkgs = import nixpkgs { 41 | inherit system; 42 | config.allowUnfree = true; 43 | }; 44 | 45 | overlayAttrs = config.packages; 46 | packages = packagesFromDirectoryRecursive { 47 | callPackage = callPackageWith (recursiveUpdate pkgs {inherit pins date;}); 48 | directory = ./pkgs; 49 | }; 50 | 51 | formatter = config.packages.alejandra-custom; 52 | devShells = { 53 | default = self.devShells.${system}.npins; 54 | npins = pkgs.mkShellNoCC { 55 | packages = [pkgs.npins]; 56 | }; 57 | }; 58 | }; 59 | }; 60 | } 61 | -------------------------------------------------------------------------------- /npins/default.nix: -------------------------------------------------------------------------------- 1 | /* 2 | This file is provided under the MIT licence: 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | */ 10 | # Generated by npins. Do not modify; will be overwritten regularly 11 | let 12 | data = builtins.fromJSON (builtins.readFile ./sources.json); 13 | version = data.version; 14 | 15 | # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/lists.nix#L295 16 | range = first: last: 17 | if first > last 18 | then [] 19 | else builtins.genList (n: first + n) (last - first + 1); 20 | 21 | # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L257 22 | stringToCharacters = s: map (p: builtins.substring p 1 s) (range 0 (builtins.stringLength s - 1)); 23 | 24 | # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L269 25 | stringAsChars = f: s: concatStrings (map f (stringToCharacters s)); 26 | concatMapStrings = f: list: concatStrings (map f list); 27 | concatStrings = builtins.concatStringsSep ""; 28 | 29 | # If the environment variable NPINS_OVERRIDE_${name} is set, then use 30 | # the path directly as opposed to the fetched source. 31 | # (Taken from Niv for compatibility) 32 | mayOverride = name: path: let 33 | envVarName = "NPINS_OVERRIDE_${saneName}"; 34 | saneName = stringAsChars (c: 35 | if (builtins.match "[a-zA-Z0-9]" c) == null 36 | then "_" 37 | else c) 38 | name; 39 | ersatz = builtins.getEnv envVarName; 40 | in 41 | if ersatz == "" 42 | then path 43 | else 44 | # this turns the string into an actual Nix path (for both absolute and 45 | # relative paths) 46 | builtins.trace "Overriding path of \"${name}\" with \"${ersatz}\" due to set \"${envVarName}\"" ( 47 | if builtins.substring 0 1 ersatz == "/" 48 | then /. + ersatz 49 | else /. + builtins.getEnv "PWD" + "/${ersatz}" 50 | ); 51 | 52 | mkSource = name: spec: 53 | assert spec ? type; let 54 | path = 55 | if spec.type == "Git" 56 | then mkGitSource spec 57 | else if spec.type == "GitRelease" 58 | then mkGitSource spec 59 | else if spec.type == "PyPi" 60 | then mkPyPiSource spec 61 | else if spec.type == "Channel" 62 | then mkChannelSource spec 63 | else if spec.type == "Tarball" 64 | then mkTarballSource spec 65 | else builtins.throw "Unknown source type ${spec.type}"; 66 | in 67 | spec // {outPath = mayOverride name path;}; 68 | 69 | mkGitSource = { 70 | repository, 71 | revision, 72 | url ? null, 73 | submodules, 74 | hash, 75 | branch ? null, 76 | ... 77 | }: 78 | assert repository ? type; 79 | # At the moment, either it is a plain git repository (which has an url), or it is a GitHub/GitLab repository 80 | # In the latter case, there we will always be an url to the tarball 81 | if url != null && !submodules 82 | then 83 | builtins.fetchTarball { 84 | inherit url; 85 | sha256 = hash; # FIXME: check nix version & use SRI hashes 86 | } 87 | else let 88 | url = 89 | if repository.type == "Git" 90 | then repository.url 91 | else if repository.type == "GitHub" 92 | then "https://github.com/${repository.owner}/${repository.repo}.git" 93 | else if repository.type == "GitLab" 94 | then "${repository.server}/${repository.repo_path}.git" 95 | else throw "Unrecognized repository type ${repository.type}"; 96 | urlToName = url: rev: let 97 | matched = builtins.match "^.*/([^/]*)(\\.git)?$" url; 98 | 99 | short = builtins.substring 0 7 rev; 100 | 101 | appendShort = 102 | if (builtins.match "[a-f0-9]*" rev) != null 103 | then "-${short}" 104 | else ""; 105 | in "${ 106 | if matched == null 107 | then "source" 108 | else builtins.head matched 109 | }${appendShort}"; 110 | name = urlToName url revision; 111 | in 112 | builtins.fetchGit { 113 | rev = revision; 114 | inherit name; 115 | # hash = hash; 116 | inherit url submodules; 117 | }; 118 | 119 | mkPyPiSource = { 120 | url, 121 | hash, 122 | ... 123 | }: 124 | builtins.fetchurl { 125 | inherit url; 126 | sha256 = hash; 127 | }; 128 | 129 | mkChannelSource = { 130 | url, 131 | hash, 132 | ... 133 | }: 134 | builtins.fetchTarball { 135 | inherit url; 136 | sha256 = hash; 137 | }; 138 | 139 | mkTarballSource = { 140 | url, 141 | locked_url ? url, 142 | hash, 143 | ... 144 | }: 145 | builtins.fetchTarball { 146 | url = locked_url; 147 | sha256 = hash; 148 | }; 149 | in 150 | if version == 5 151 | then builtins.mapAttrs mkSource data.pins 152 | else throw "Unsupported format version ${toString version} in sources.json. Try running `npins upgrade`" 153 | -------------------------------------------------------------------------------- /npins/sources.json: -------------------------------------------------------------------------------- 1 | { 2 | "pins": { 3 | "ai-robots-txt": { 4 | "type": "GitRelease", 5 | "repository": { 6 | "type": "GitHub", 7 | "owner": "ai-robots-txt", 8 | "repo": "ai.robots.txt" 9 | }, 10 | "pre_releases": false, 11 | "version_upper_bound": null, 12 | "release_prefix": null, 13 | "submodules": false, 14 | "version": "v1.31", 15 | "revision": "7bf7f9164d55a58e0d6080dff52eea3ed5d3584e", 16 | "url": "https://api.github.com/repos/ai-robots-txt/ai.robots.txt/tarball/v1.31", 17 | "hash": "1bvq24w8pq56knhdacjkq93v6l719jcj3jf4fsknlmp9m6izm3zj" 18 | }, 19 | "ani-cli": { 20 | "type": "GitRelease", 21 | "repository": { 22 | "type": "GitHub", 23 | "owner": "pystardust", 24 | "repo": "ani-cli" 25 | }, 26 | "pre_releases": false, 27 | "version_upper_bound": null, 28 | "release_prefix": null, 29 | "submodules": false, 30 | "version": "v4.10", 31 | "revision": "a67e23f82e08e6f17b970dcec92794663211ad4f", 32 | "url": "https://api.github.com/repos/pystardust/ani-cli/tarball/v4.10", 33 | "hash": "17yjddnky3dkdl0v6gm2rmdmhb8yh9b5lwmmrq2c0k9dcz9i1xj7" 34 | }, 35 | "cloneit": { 36 | "type": "GitRelease", 37 | "repository": { 38 | "type": "GitHub", 39 | "owner": "alok8bb", 40 | "repo": "cloneit" 41 | }, 42 | "pre_releases": false, 43 | "version_upper_bound": null, 44 | "release_prefix": null, 45 | "submodules": false, 46 | "version": "1.0.0", 47 | "revision": "6198556e810d964cc5938c446ef42fc21b55fe0b", 48 | "url": "https://api.github.com/repos/alok8bb/cloneit/tarball/1.0.0", 49 | "hash": "1v97nfwwcnjw5l5c4kv4yylpv474s8xp4yp0648jr5c0mf93zza4" 50 | }, 51 | "foot": { 52 | "type": "Git", 53 | "repository": { 54 | "type": "Git", 55 | "url": "https://codeberg.org/dnkl/foot" 56 | }, 57 | "branch": "master", 58 | "submodules": false, 59 | "revision": "eeaecba7238fb3a501cb25b55b7d2ada2bc4d023", 60 | "url": null, 61 | "hash": "0wr6q1g8xzmyzg5gnir4h8p9g7q3xv145nifrblpzj78sjjf4083" 62 | }, 63 | "fuzzel": { 64 | "type": "Git", 65 | "repository": { 66 | "type": "Git", 67 | "url": "https://codeberg.org/dnkl/fuzzel.git" 68 | }, 69 | "branch": "master", 70 | "submodules": false, 71 | "revision": "35ce4b595e75ca28e4772df968d1e8dea3b32aa8", 72 | "url": null, 73 | "hash": "1x0qyrp9qzna54d2hlhzxjn703gd2347czsvqbcl0b0gz53vwwj5" 74 | }, 75 | "headscale-ui": { 76 | "type": "GitRelease", 77 | "repository": { 78 | "type": "GitHub", 79 | "owner": "gurucomputing", 80 | "repo": "headscale-ui" 81 | }, 82 | "pre_releases": false, 83 | "version_upper_bound": null, 84 | "release_prefix": null, 85 | "submodules": false, 86 | "version": "2025.05.22", 87 | "revision": "5e97c523036e07e14a5cf96618c6bf2349c1f9aa", 88 | "url": "https://api.github.com/repos/gurucomputing/headscale-ui/tarball/2025.05.22", 89 | "hash": "1mhb40f5wd717p78c5w9bfcqvgx1v1fvf6j11kghfjjr8gyf807z" 90 | }, 91 | "mov-cli": { 92 | "type": "GitRelease", 93 | "repository": { 94 | "type": "GitHub", 95 | "owner": "mov-cli", 96 | "repo": "mov-cli" 97 | }, 98 | "pre_releases": false, 99 | "version_upper_bound": null, 100 | "release_prefix": null, 101 | "submodules": false, 102 | "version": "4.4.19", 103 | "revision": "19943349e68b3a8d2f927d4f215dbd90b2dcbd18", 104 | "url": "https://api.github.com/repos/mov-cli/mov-cli/tarball/4.4.19", 105 | "hash": "1djyi8n1b9cpqx72v0j1wzp2fi7p8id10kmypq01wqchg5q95mxh" 106 | }, 107 | "nixpkgs": { 108 | "type": "Channel", 109 | "name": "nixpkgs-unstable", 110 | "url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre809520.5929de975bcf/nixexprs.tar.xz", 111 | "hash": "1fg1ab448wdbrs6yjbjc5ijcvqa38xq4wai0i5qp844saflag4fd" 112 | }, 113 | "rat": { 114 | "type": "GitRelease", 115 | "repository": { 116 | "type": "GitHub", 117 | "owner": "thinkingsand", 118 | "repo": "rat" 119 | }, 120 | "pre_releases": false, 121 | "version_upper_bound": null, 122 | "release_prefix": null, 123 | "submodules": false, 124 | "version": "2.0.1", 125 | "revision": "03d2e16ea0ebe280d7dd472612ced8b4ee71960f", 126 | "url": "https://api.github.com/repos/thinkingsand/rat/tarball/2.0.1", 127 | "hash": "1lvqr06z2vs48a9hckim12268zfa2d0sckynpn4b0d7lv9hkn2hi" 128 | }, 129 | "rofi-calc": { 130 | "type": "GitRelease", 131 | "repository": { 132 | "type": "GitHub", 133 | "owner": "svenstaro", 134 | "repo": "rofi-calc" 135 | }, 136 | "pre_releases": false, 137 | "version_upper_bound": null, 138 | "release_prefix": null, 139 | "submodules": false, 140 | "version": "v2.3.0", 141 | "revision": "68d79346e60d264c298201e219867593e8e2f90a", 142 | "url": "https://api.github.com/repos/svenstaro/rofi-calc/tarball/v2.3.0", 143 | "hash": "041i50rbk7cdbrmn43hz4kx4ijdzff4pw1jv2symwfn07z9a6f30" 144 | }, 145 | "rofi-emoji": { 146 | "type": "GitRelease", 147 | "repository": { 148 | "type": "GitHub", 149 | "owner": "Mange", 150 | "repo": "rofi-emoji" 151 | }, 152 | "pre_releases": false, 153 | "version_upper_bound": null, 154 | "release_prefix": null, 155 | "submodules": false, 156 | "version": "v4.1.0", 157 | "revision": "685ff771805f7d80e4f9b79bdddfb73ec3aaf4f6", 158 | "url": "https://api.github.com/repos/Mange/rofi-emoji/tarball/v4.1.0", 159 | "hash": "1bv8vbmfkzd7jf4zjqik0zjnwb4897xapncqzaggnj76rpxv6rh2" 160 | } 161 | }, 162 | "version": 5 163 | } 164 | -------------------------------------------------------------------------------- /pkgs/ai-robots-txt/package.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | stdenvNoCC, 4 | fetchurl, 5 | pins, 6 | }: let 7 | pin = pins.ai-robots-txt; 8 | in 9 | stdenvNoCC.mkDerivation (finalAttrs: { 10 | pname = "ai-robots-txt"; 11 | inherit (pin) version; 12 | 13 | src = fetchurl { 14 | url = "https://github.com/ai-robots-txt/ai.robots.txt/releases/download/${finalAttrs.version}/robots.txt"; 15 | hash = "sha256-i1ZD9aN7qzwUDMx9qhMxxi/HFwGsSONjpYe4twy1r5s="; 16 | }; 17 | 18 | dontUnpack = true; 19 | dontConfigure = true; 20 | dontBuild = true; 21 | 22 | installPhase = '' 23 | runHook preInstall 24 | 25 | mkdir -p $out/share 26 | cp $src $out/share/robots.txt 27 | 28 | runHook postInstall 29 | ''; 30 | 31 | meta = { 32 | description = "List of AI agents and robots to block"; 33 | homepage = "https://github.com/ai-robots-txt/ai.robots.txt"; 34 | license = lib.licenses.mit; 35 | maintainers = with lib.maintainers; [NotAShelf]; 36 | platforms = lib.platforms.all; 37 | }; 38 | }) 39 | -------------------------------------------------------------------------------- /pkgs/alejandra-custom/0001-no-ads.patch: -------------------------------------------------------------------------------- 1 | diff --git i/src/alejandra_cli/src/cli.rs w/src/alejandra_cli/src/cli.rs 2 | index bab102c..b90bf1d 100644 3 | --- i/src/alejandra_cli/src/cli.rs 4 | +++ w/src/alejandra_cli/src/cli.rs 5 | @@ -7,7 +7,6 @@ use futures::future::RemoteHandle; 6 | use futures::stream::FuturesUnordered; 7 | use futures::task::SpawnExt; 8 | 9 | -use crate::ads::random_ad; 10 | use crate::verbosity::Verbosity; 11 | 12 | /// The Uncompromising Nix Code Formatter. 13 | @@ -203,11 +202,6 @@ pub fn main() -> std::io::Result<()> { 14 | (true, false) => "requires formatting", 15 | } 16 | ); 17 | - 18 | - if in_place { 19 | - eprintln!(); 20 | - eprint!("{}", random_ad()); 21 | - } 22 | } 23 | 24 | std::process::exit(if in_place { 0 } else { 2 }); 25 | @@ -218,8 +212,6 @@ pub fn main() -> std::io::Result<()> { 26 | eprintln!( 27 | "Congratulations! Your code complies with the Alejandra style." 28 | ); 29 | - eprintln!(); 30 | - eprint!("{}", random_ad()); 31 | } 32 | 33 | std::process::exit(0); 34 | diff --git i/src/alejandra_cli/src/lib.rs w/src/alejandra_cli/src/lib.rs 35 | index fd49ce8..258f656 100644 36 | --- i/src/alejandra_cli/src/lib.rs 37 | +++ w/src/alejandra_cli/src/lib.rs 38 | @@ -1,4 +1,3 @@ 39 | -mod ads; 40 | pub mod cli; 41 | mod find; 42 | mod verbosity; 43 | -------------------------------------------------------------------------------- /pkgs/alejandra-custom/0002-spaced-elements.patch: -------------------------------------------------------------------------------- 1 | diff --git i/src/alejandra/src/rules/attr_set.rs w/src/alejandra/src/rules/attr_set.rs 2 | index 9459977..8b637a1 100644 3 | --- i/src/alejandra/src/rules/attr_set.rs 4 | +++ w/src/alejandra/src/rules/attr_set.rs 5 | @@ -62,6 +62,8 @@ pub(crate) fn rule( 6 | steps.push_back(crate::builder::Step::Format(child)); 7 | if vertical { 8 | steps.push_back(crate::builder::Step::Indent); 9 | + } else if items_count >= 1 { 10 | + steps.push_back(crate::builder::Step::Whitespace); 11 | } 12 | 13 | let mut item_index: usize = 0; 14 | @@ -120,6 +122,8 @@ pub(crate) fn rule( 15 | steps.push_back(crate::builder::Step::Dedent); 16 | steps.push_back(crate::builder::Step::NewLine); 17 | steps.push_back(crate::builder::Step::Pad); 18 | + } else if items_count >= 1 { 19 | + steps.push_back(crate::builder::Step::Whitespace); 20 | } 21 | steps.push_back(crate::builder::Step::Format(child)); 22 | 23 | diff --git i/src/alejandra/src/rules/list.rs w/src/alejandra/src/rules/list.rs 24 | index 3e33e14..df9b9e6 100644 25 | --- i/src/alejandra/src/rules/list.rs 26 | +++ w/src/alejandra/src/rules/list.rs 27 | @@ -23,7 +23,9 @@ pub(crate) fn rule( 28 | steps.push_back(crate::builder::Step::Format(child)); 29 | if vertical { 30 | steps.push_back(crate::builder::Step::Indent); 31 | - } 32 | + } else if items_count >= 1 { 33 | + steps.push_back(crate::builder::Step::Whitespace); 34 | + } 35 | 36 | let mut item_index: usize = 0; 37 | let mut inline_next_comment = false; 38 | @@ -90,6 +92,8 @@ pub(crate) fn rule( 39 | steps.push_back(crate::builder::Step::Dedent); 40 | steps.push_back(crate::builder::Step::NewLine); 41 | steps.push_back(crate::builder::Step::Pad); 42 | + } else if items_count >= 1 { 43 | + steps.push_back(crate::builder::Step::Whitespace); 44 | } 45 | steps.push_back(crate::builder::Step::Format(child)); 46 | 47 | diff --git i/src/alejandra/tests/cases/apply/out.nix w/src/alejandra/tests/cases/apply/out.nix 48 | index 77a7d97..7a0bd11 100644 49 | --- i/src/alejandra/tests/cases/apply/out.nix 50 | +++ w/src/alejandra/tests/cases/apply/out.nix 51 | @@ -41,19 +41,19 @@ 52 | name1 = 53 | function 54 | arg 55 | - {asdf = 1;}; 56 | + { asdf = 1; }; 57 | 58 | name2 = 59 | function 60 | arg 61 | - {asdf = 1;} 62 | + { asdf = 1; } 63 | argument; 64 | 65 | name3 = 66 | function 67 | arg 68 | - {asdf = 1;} 69 | - {qwer = 12345;} 70 | + { asdf = 1; } 71 | + { qwer = 12345; } 72 | argument; 73 | } 74 | { 75 | @@ -79,7 +79,7 @@ 76 | name4 = 77 | function 78 | arg 79 | - {asdf = 1;} 80 | + { asdf = 1; } 81 | { 82 | qwer = 12345; 83 | qwer2 = 54321; 84 | @@ -88,21 +88,21 @@ 85 | } 86 | { 87 | option1 = 88 | - function arg {asdf = 1;} { 89 | + function arg { asdf = 1; } { 90 | qwer = 12345; 91 | qwer2 = 54321; 92 | } 93 | lastArg; 94 | 95 | option2 = 96 | - function arg {asdf = 1;} { 97 | + function arg { asdf = 1; } { 98 | qwer = 12345; 99 | qwer2 = 54321; 100 | } 101 | lastArg; 102 | 103 | option3 = 104 | - function arg {asdf = 1;} 105 | + function arg { asdf = 1; } 106 | { 107 | qwer = 12345; 108 | qwer2 = 54321; 109 | diff --git i/src/alejandra/tests/cases/attr_set/out.nix w/src/alejandra/tests/cases/attr_set/out.nix 110 | index 18e6026..e5ac999 100644 111 | --- i/src/alejandra/tests/cases/attr_set/out.nix 112 | +++ w/src/alejandra/tests/cases/attr_set/out.nix 113 | @@ -5,12 +5,12 @@ 114 | a 115 | */ 116 | } 117 | - {a = 1;} 118 | + { a = 1; } 119 | { 120 | a = 1; 121 | } 122 | 123 | - {b = 1;} 124 | + { b = 1; } 125 | { 126 | b = 1; 127 | /* 128 | @@ -33,7 +33,7 @@ 129 | */ 130 | } 131 | 132 | - rec {c = 1;} 133 | + rec { c = 1; } 134 | rec { 135 | c = 1; 136 | /* 137 | @@ -101,7 +101,7 @@ 138 | a = { 139 | a = rec { 140 | a = { 141 | - a = rec {a = {a = rec {a = {a = rec {a = {};};};};};}; 142 | + a = rec { a = { a = rec { a = { a = rec { a = {}; }; }; }; }; }; 143 | }; 144 | }; 145 | }; 146 | diff --git i/src/alejandra/tests/cases/idioms_lib_2/out.nix w/src/alejandra/tests/cases/idioms_lib_2/out.nix 147 | index 9911edf..2a3b2d8 100644 148 | --- i/src/alejandra/tests/cases/idioms_lib_2/out.nix 149 | +++ w/src/alejandra/tests/cases/idioms_lib_2/out.nix 150 | @@ -387,7 +387,7 @@ 151 | Type: string -> a -> a 152 | */ 153 | warn = 154 | - if lib.elem (builtins.getEnv "NIX_ABORT_ON_WARN") ["1" "true" "yes"] 155 | + if lib.elem (builtins.getEnv "NIX_ABORT_ON_WARN") [ "1" "true" "yes" ] 156 | then msg: builtins.trace "warning: ${msg}" (abort "NIX_ABORT_ON_WARN=true; warnings are treated as unrecoverable errors.") 157 | else msg: builtins.trace "warning: ${msg}"; 158 | 159 | @@ -526,12 +526,12 @@ 160 | toBaseDigits = base: i: let 161 | go = i: 162 | if i < base 163 | - then [i] 164 | + then [ i ] 165 | else let 166 | r = i - ((i / base) * base); 167 | q = (i - r) / base; 168 | in 169 | - [r] ++ go q; 170 | + [ r ] ++ go q; 171 | in 172 | assert (base >= 2); 173 | assert (i >= 0); 174 | diff --git i/src/alejandra/tests/cases/idioms_nixos_1/out.nix w/src/alejandra/tests/cases/idioms_nixos_1/out.nix 175 | index ae087c2..27f0329 100644 176 | --- i/src/alejandra/tests/cases/idioms_nixos_1/out.nix 177 | +++ w/src/alejandra/tests/cases/idioms_nixos_1/out.nix 178 | @@ -33,7 +33,7 @@ in { 179 | 180 | boot.kernelPackages = mkOption { 181 | default = pkgs.linuxPackages; 182 | - type = types.unspecified // {merge = mergeEqualOption;}; 183 | + type = types.unspecified // { merge = mergeEqualOption; }; 184 | apply = kernelPackages: 185 | kernelPackages.extend (self: super: { 186 | kernel = super.kernel.override (originalArgs: { 187 | @@ -134,7 +134,7 @@ in { 188 | boot.initrd.availableKernelModules = mkOption { 189 | type = types.listOf types.str; 190 | default = []; 191 | - example = ["sata_nv" "ext3"]; 192 | + example = [ "sata_nv" "ext3" ]; 193 | description = '' 194 | The set of kernel modules in the initial ramdisk used during the 195 | boot process. This set must include all modules necessary for 196 | @@ -263,22 +263,22 @@ in { 197 | }) 198 | 199 | (mkIf (!config.boot.isContainer) { 200 | - system.build = {inherit kernel;}; 201 | + system.build = { inherit kernel; }; 202 | 203 | - system.modulesTree = [kernel] ++ config.boot.extraModulePackages; 204 | + system.modulesTree = [ kernel ] ++ config.boot.extraModulePackages; 205 | 206 | # Implement consoleLogLevel both in early boot and using sysctl 207 | # (so you don't need to reboot to have changes take effect). 208 | boot.kernelParams = 209 | - ["loglevel=${toString config.boot.consoleLogLevel}"] 210 | - ++ optionals config.boot.vesa ["vga=0x317" "nomodeset"]; 211 | + [ "loglevel=${toString config.boot.consoleLogLevel}" ] 212 | + ++ optionals config.boot.vesa [ "vga=0x317" "nomodeset" ]; 213 | 214 | boot.kernel.sysctl."kernel.printk" = mkDefault config.boot.consoleLogLevel; 215 | 216 | - boot.kernelModules = ["loop" "atkbd"]; 217 | + boot.kernelModules = [ "loop" "atkbd" ]; 218 | 219 | # The Linux kernel >= 2.6.27 provides firmware. 220 | - hardware.firmware = [kernel]; 221 | + hardware.firmware = [ kernel ]; 222 | 223 | # Create /etc/modules-load.d/nixos.conf, which is read by 224 | # systemd-modules-load.service to load required kernel modules. 225 | @@ -287,8 +287,8 @@ in { 226 | }; 227 | 228 | systemd.services.systemd-modules-load = { 229 | - wantedBy = ["multi-user.target"]; 230 | - restartTriggers = [kernelModulesConf]; 231 | + wantedBy = [ "multi-user.target" ]; 232 | + restartTriggers = [ kernelModulesConf ]; 233 | serviceConfig = { 234 | # Ignore failed module loads. Typically some of the 235 | # modules in ‘boot.kernelModules’ are "nice to have but 236 | diff --git i/src/alejandra/tests/cases/idioms_pkgs_1/out.nix w/src/alejandra/tests/cases/idioms_pkgs_1/out.nix 237 | index dbee48d..129d59d 100644 238 | --- i/src/alejandra/tests/cases/idioms_pkgs_1/out.nix 239 | +++ w/src/alejandra/tests/cases/idioms_pkgs_1/out.nix 240 | @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { 241 | url = "example/${version}"; 242 | }; 243 | meta = with lib; { 244 | - maintainers = with maintainers; [someone]; 245 | + maintainers = with maintainers; [ someone ]; 246 | description = "something"; 247 | }; 248 | } 249 | diff --git i/src/alejandra/tests/cases/idioms_pkgs_2/out.nix w/src/alejandra/tests/cases/idioms_pkgs_2/out.nix 250 | index dd0a2b5..2448b6e 100644 251 | --- i/src/alejandra/tests/cases/idioms_pkgs_2/out.nix 252 | +++ w/src/alejandra/tests/cases/idioms_pkgs_2/out.nix 253 | @@ -19,13 +19,13 @@ stdenv.mkDerivation rec { 254 | doCheck = true; 255 | 256 | passthru.tests = { 257 | - version = testVersion {package = hello;}; 258 | + version = testVersion { package = hello; }; 259 | 260 | invariant-under-noXlibs = 261 | testEqualDerivation 262 | "hello must not be rebuilt when environment.noXlibs is set." 263 | hello 264 | - (nixos {environment.noXlibs = true;}).pkgs.hello; 265 | + (nixos { environment.noXlibs = true; }).pkgs.hello; 266 | }; 267 | 268 | meta = with lib; { 269 | @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { 270 | homepage = "https://www.gnu.org/software/hello/manual/"; 271 | changelog = "https://git.savannah.gnu.org/cgit/hello.git/plain/NEWS?h=v${version}"; 272 | license = licenses.gpl3Plus; 273 | - maintainers = [maintainers.eelco]; 274 | + maintainers = [ maintainers.eelco ]; 275 | platforms = platforms.all; 276 | }; 277 | } 278 | diff --git i/src/alejandra/tests/cases/idioms_pkgs_3/out.nix w/src/alejandra/tests/cases/idioms_pkgs_3/out.nix 279 | index ae087c2..27f0329 100644 280 | --- i/src/alejandra/tests/cases/idioms_pkgs_3/out.nix 281 | +++ w/src/alejandra/tests/cases/idioms_pkgs_3/out.nix 282 | @@ -33,7 +33,7 @@ in { 283 | 284 | boot.kernelPackages = mkOption { 285 | default = pkgs.linuxPackages; 286 | - type = types.unspecified // {merge = mergeEqualOption;}; 287 | + type = types.unspecified // { merge = mergeEqualOption; }; 288 | apply = kernelPackages: 289 | kernelPackages.extend (self: super: { 290 | kernel = super.kernel.override (originalArgs: { 291 | @@ -134,7 +134,7 @@ in { 292 | boot.initrd.availableKernelModules = mkOption { 293 | type = types.listOf types.str; 294 | default = []; 295 | - example = ["sata_nv" "ext3"]; 296 | + example = [ "sata_nv" "ext3" ]; 297 | description = '' 298 | The set of kernel modules in the initial ramdisk used during the 299 | boot process. This set must include all modules necessary for 300 | @@ -263,22 +263,22 @@ in { 301 | }) 302 | 303 | (mkIf (!config.boot.isContainer) { 304 | - system.build = {inherit kernel;}; 305 | + system.build = { inherit kernel; }; 306 | 307 | - system.modulesTree = [kernel] ++ config.boot.extraModulePackages; 308 | + system.modulesTree = [ kernel ] ++ config.boot.extraModulePackages; 309 | 310 | # Implement consoleLogLevel both in early boot and using sysctl 311 | # (so you don't need to reboot to have changes take effect). 312 | boot.kernelParams = 313 | - ["loglevel=${toString config.boot.consoleLogLevel}"] 314 | - ++ optionals config.boot.vesa ["vga=0x317" "nomodeset"]; 315 | + [ "loglevel=${toString config.boot.consoleLogLevel}" ] 316 | + ++ optionals config.boot.vesa [ "vga=0x317" "nomodeset" ]; 317 | 318 | boot.kernel.sysctl."kernel.printk" = mkDefault config.boot.consoleLogLevel; 319 | 320 | - boot.kernelModules = ["loop" "atkbd"]; 321 | + boot.kernelModules = [ "loop" "atkbd" ]; 322 | 323 | # The Linux kernel >= 2.6.27 provides firmware. 324 | - hardware.firmware = [kernel]; 325 | + hardware.firmware = [ kernel ]; 326 | 327 | # Create /etc/modules-load.d/nixos.conf, which is read by 328 | # systemd-modules-load.service to load required kernel modules. 329 | @@ -287,8 +287,8 @@ in { 330 | }; 331 | 332 | systemd.services.systemd-modules-load = { 333 | - wantedBy = ["multi-user.target"]; 334 | - restartTriggers = [kernelModulesConf]; 335 | + wantedBy = [ "multi-user.target" ]; 336 | + restartTriggers = [ kernelModulesConf ]; 337 | serviceConfig = { 338 | # Ignore failed module loads. Typically some of the 339 | # modules in ‘boot.kernelModules’ are "nice to have but 340 | diff --git i/src/alejandra/tests/cases/inherit/out.nix w/src/alejandra/tests/cases/inherit/out.nix 341 | index c3b983d..65da28b 100644 342 | --- i/src/alejandra/tests/cases/inherit/out.nix 343 | +++ w/src/alejandra/tests/cases/inherit/out.nix 344 | @@ -7,7 +7,7 @@ 345 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 346 | ; 347 | } 348 | - {inherit b d;} 349 | + { inherit b d; } 350 | { 351 | inherit 352 | b 353 | diff --git i/src/alejandra/tests/cases/inherit_from/out.nix w/src/alejandra/tests/cases/inherit_from/out.nix 354 | index 0155df5..7252bc4 100644 355 | --- i/src/alejandra/tests/cases/inherit_from/out.nix 356 | +++ w/src/alejandra/tests/cases/inherit_from/out.nix 357 | @@ -1,5 +1,5 @@ 358 | [ 359 | - {inherit (c) f h;} 360 | + { inherit (c) f h; } 361 | { 362 | inherit 363 | (c) 364 | diff --git i/src/alejandra/tests/cases/key_value/out.nix w/src/alejandra/tests/cases/key_value/out.nix 365 | index af2f520..f817892 100644 366 | --- i/src/alejandra/tests/cases/key_value/out.nix 367 | +++ w/src/alejandra/tests/cases/key_value/out.nix 368 | @@ -4,7 +4,7 @@ rec 369 | a = 4; 370 | a = a: b; 371 | 372 | - a = {a = 1;}; 373 | + a = { a = 1; }; 374 | 375 | b = { 376 | a = 377 | @@ -79,7 +79,7 @@ rec 378 | */ 379 | ; 380 | }; 381 | - j = a: {b = 1;}; 382 | + j = a: { b = 1; }; 383 | k = a: { 384 | b = 1; 385 | c = 2; 386 | @@ -88,7 +88,7 @@ rec 387 | /* 388 | b 389 | */ 390 | - {b = 1;}; 391 | + { b = 1; }; 392 | m = a: 393 | /* 394 | b 395 | diff --git i/src/alejandra/tests/cases/lists/out.nix w/src/alejandra/tests/cases/lists/out.nix 396 | index dedee64..43a9de3 100644 397 | --- i/src/alejandra/tests/cases/lists/out.nix 398 | +++ w/src/alejandra/tests/cases/lists/out.nix 399 | @@ -1,11 +1,11 @@ 400 | [ 401 | - [1] 402 | + [ 1 ] 403 | 404 | [ 405 | 1 406 | ] 407 | 408 | - [b d] 409 | + [ b d ] 410 | [ 411 | b 412 | d 413 | diff --git i/src/alejandra/tests/cases/monsters_3/out.nix w/src/alejandra/tests/cases/monsters_3/out.nix 414 | index 25ff805..fd242fb 100644 415 | --- i/src/alejandra/tests/cases/monsters_3/out.nix 416 | +++ w/src/alejandra/tests/cases/monsters_3/out.nix 417 | @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { 418 | wrapGAppsHook4 419 | glib # for glib-compile-resources 420 | ]; 421 | - buildInputs = [cairo glib gtk4 libadwaita pango]; 422 | + buildInputs = [ cairo glib gtk4 libadwaita pango ]; 423 | postPatch = '' 424 | patchShebangs build-aux/meson_post_install.py 425 | # https://gitlab.gnome.org/World/design/contrast/-/merge_requests/23 426 | @@ -56,7 +56,7 @@ stdenv.mkDerivation rec { 427 | description = "Checks whether the contrast between two colors meet the WCAG requirements"; 428 | homepage = "https://gitlab.gnome.org/World/design/contrast"; 429 | license = licenses.gpl3Plus; 430 | - maintainers = with maintainers; [jtojnar]; 431 | + maintainers = with maintainers; [ jtojnar ]; 432 | platforms = platforms.unix; 433 | }; 434 | } 435 | diff --git i/src/alejandra/tests/cases/with/out.nix w/src/alejandra/tests/cases/with/out.nix 436 | index cd15509..b31b2f0 100644 437 | --- i/src/alejandra/tests/cases/with/out.nix 438 | +++ w/src/alejandra/tests/cases/with/out.nix 439 | @@ -21,9 +21,9 @@ 440 | c) 441 | (with b; cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc) 442 | (with b; cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc) 443 | - {a = with b; 1;} 444 | - {a = with b; 1 + 1;} 445 | - {a = with b; {c = 1;};} 446 | + { a = with b; 1; } 447 | + { a = with b; 1 + 1; } 448 | + { a = with b; { c = 1; }; } 449 | { 450 | a = with b; { 451 | c = 1; 452 | @@ -40,7 +40,7 @@ 453 | a = with b; 1; 454 | # comment 455 | } 456 | - (with a; with b; with c; {a = 1;}) 457 | + (with a; with b; with c; { a = 1; }) 458 | (with a; 459 | with b; 460 | with c; { 461 | -------------------------------------------------------------------------------- /pkgs/alejandra-custom/package.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | alejandra, 4 | ... 5 | }: 6 | alejandra.overrideAttrs (prev: { 7 | pname = "alejandra-custom"; 8 | 9 | patches = 10 | (prev.patches or []) 11 | ++ [./0001-no-ads.patch]; 12 | 13 | doCheck = false; 14 | 15 | meta = { 16 | description = "Custom build of Alejandra without ads & spaces around lists and attrsets"; 17 | mainProgram = "alejandra"; 18 | maintainers = [lib.maintainers.NotAShelf]; 19 | }; 20 | }) 21 | -------------------------------------------------------------------------------- /pkgs/ani-cli-git/package.nix: -------------------------------------------------------------------------------- 1 | { 2 | pins, 3 | lib, 4 | fetchFromGitHub, 5 | ani-cli, 6 | ... 7 | }: 8 | ani-cli.overrideAttrs (let 9 | pin = pins.ani-cli; 10 | in { 11 | pname = "ani-cli"; 12 | inherit (pin) version; 13 | 14 | src = fetchFromGitHub { 15 | inherit (pin.repository) owner repo; 16 | sha256 = pin.hash; 17 | rev = pin.revision; 18 | }; 19 | 20 | meta = { 21 | description = "An auto-upgrading version of ani-cli to ensure we are always up to date with scrapers"; 22 | maintainers = with lib.maintainers; [NotAShelf]; 23 | }; 24 | }) 25 | -------------------------------------------------------------------------------- /pkgs/foot-git/package.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | fetchFromGitea, 4 | foot, 5 | pins, 6 | date, 7 | # Settings 8 | withAlphaPatch ? true, 9 | ... 10 | }: 11 | foot.overrideAttrs (oldAttrs: let 12 | pin = pins.foot; 13 | in { 14 | pname = "foot-transparent"; 15 | version = "0-unstable-${date}"; 16 | 17 | src = fetchFromGitea { 18 | domain = "codeberg.org"; 19 | owner = "dnkl"; 20 | repo = "foot"; 21 | rev = pin.revision; 22 | sha256 = pin.hash; 23 | }; 24 | 25 | patches = 26 | (oldAttrs.patches or []) 27 | # Bring back fullscreen transparency (i.e., fullscreen alpha) 28 | ++ (lib.optionals withAlphaPatch [ 29 | # Taken with the explicit permission of Fazzi, thank you :) 30 | # 31 | ./patches/foot_fullscreen_alpha.patch 32 | ]); 33 | 34 | meta = { 35 | description = "An auto-upgrading version of Foot to ensure we are always up to dates"; 36 | mainProgram = "foot"; 37 | maintainers = with lib.maintainers; [NotAShelf]; 38 | }; 39 | }) 40 | -------------------------------------------------------------------------------- /pkgs/foot-git/patches/foot_fullscreen_alpha.patch: -------------------------------------------------------------------------------- 1 | From cd75128c89dc083524667d2fb1d4ca50874ace9b Mon Sep 17 00:00:00 2001 2 | From: Fazzi 3 | Date: Fri, 18 Apr 2025 21:15:19 +0100 4 | Subject: [PATCH] config: add transparent_fullscreen option 5 | 6 | --- 7 | config.c | 5 +++++ 8 | config.h | 2 ++ 9 | render.c | 8 +++++--- 10 | 3 files changed, 12 insertions(+), 3 deletions(-) 11 | 12 | diff --git a/config.c b/config.c 13 | index 07f781d6..8304729a 100644 14 | --- a/config.c 15 | +++ b/config.c 16 | @@ -1098,6 +1098,10 @@ parse_section_main(struct context *ctx) 17 | (int *)&conf->initial_color_theme); 18 | } 19 | 20 | + else if (streq(key, "transparent-fullscreen")) { 21 | + return value_to_bool(ctx, &conf->transparent_fullscreen); 22 | + } 23 | + 24 | else { 25 | LOG_CONTEXTUAL_ERR("not a valid option: %s", key); 26 | return false; 27 | @@ -3389,6 +3393,7 @@ config_load(struct config *conf, const char *conf_path, 28 | }, 29 | .multiplier = 3., 30 | }, 31 | + .transparent_fullscreen = false, 32 | .colors = { 33 | .fg = default_foreground, 34 | .bg = default_background, 35 | diff --git a/config.h b/config.h 36 | index 7cf6f6f5..2ab21716 100644 37 | --- a/config.h 38 | +++ b/config.h 39 | @@ -237,6 +237,8 @@ struct config { 40 | 41 | enum { STARTUP_WINDOWED, STARTUP_MAXIMIZED, STARTUP_FULLSCREEN } startup_mode; 42 | 43 | + bool transparent_fullscreen; 44 | + 45 | bool dpi_aware; 46 | bool gamma_correct; 47 | struct config_font_list fonts[4]; 48 | diff --git a/render.c b/render.c 49 | index 83a160bc..ba0f6097 100644 50 | --- a/render.c 51 | +++ b/render.c 52 | @@ -768,7 +768,8 @@ render_cell(struct terminal *term, pixman_image_t *pix, 53 | _bg = swap; 54 | } 55 | 56 | - else if (!term->window->is_fullscreen && term->colors.alpha != 0xffff) { 57 | + else if ((!term->window->is_fullscreen || term->conf->transparent_fullscreen) 58 | + && term->colors.alpha != 0xffff) { 59 | switch (term->conf->colors.alpha_mode) { 60 | case ALPHA_MODE_DEFAULT: { 61 | if (cell->attrs.bg_src == COLOR_DEFAULT) { 62 | @@ -1234,7 +1235,7 @@ render_margin(struct terminal *term, struct buffer *buf, 63 | const uint32_t _bg = !term->reverse ? term->colors.bg : term->colors.fg; 64 | uint16_t alpha = term->colors.alpha; 65 | 66 | - if (term->window->is_fullscreen) { 67 | + if (term->window->is_fullscreen && !term->conf->transparent_fullscreen) { 68 | /* Disable alpha in fullscreen - see render_cell() for details */ 69 | alpha = 0xffff; 70 | } 71 | @@ -3264,7 +3265,8 @@ grid_render(struct terminal *term) 72 | xassert(term->height > 0); 73 | 74 | struct buffer_chain *chain = term->render.chains.grid; 75 | - bool use_alpha = !term->window->is_fullscreen && 76 | + bool use_alpha = (!term->window->is_fullscreen || 77 | + term->conf->transparent_fullscreen) && 78 | term->colors.alpha != 0xffff; 79 | struct buffer *buf = shm_get_buffer( 80 | chain, term->width, term->height, use_alpha); 81 | -------------------------------------------------------------------------------- /pkgs/fuzzel-git/package.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | fetchFromGitea, 4 | fuzzel, 5 | pins, 6 | date, 7 | ... 8 | }: 9 | fuzzel.overrideAttrs (let 10 | pin = pins.fuzzel; 11 | in { 12 | pname = "foot-transparent"; 13 | version = "0-unstable-${date}"; 14 | src = fetchFromGitea { 15 | domain = "codeberg.org"; 16 | owner = "dnkl"; 17 | repo = "fuzzel"; 18 | rev = pin.revision; 19 | sha256 = pin.hash; 20 | }; 21 | 22 | meta = { 23 | description = "Patched version of Fuzzel app launcher that tracks latest git revision"; 24 | mainProgram = "fuzzel"; 25 | maintainers = with lib.maintainers; [NotAShelf]; 26 | }; 27 | }) 28 | -------------------------------------------------------------------------------- /pkgs/headscale-ui/package.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | stdenvNoCC, 4 | fetchzip, 5 | }: 6 | stdenvNoCC.mkDerivation (finalAttrs: { 7 | pname = "headscale-ui"; 8 | version = "2025.05.22"; 9 | 10 | src = fetchzip { 11 | url = "https://github.com/gurucomputing/headscale-ui/releases/download/${finalAttrs.version}/headscale-${finalAttrs.version}.tar.gz"; 12 | hash = "sha256-qLX8YW5jjy4K4et7dkS0Bvug+k3NVw0m2d2Q0wLE1J4="; 13 | stripRoot = false; 14 | }; 15 | 16 | dontConfigure = true; 17 | dontBuild = true; 18 | 19 | installPhase = '' 20 | runHook preInstall 21 | 22 | mkdir -p $out/share/ 23 | cp -rvf ./* $out/share/ 24 | 25 | runHook postInstall 26 | ''; 27 | 28 | meta = { 29 | description = "Web frontend for the headscale Tailscale-compatible coordination server"; 30 | homepage = "https://github.com/gurucomputing/headscale-ui"; 31 | license = [lib.licenses.bsd3]; 32 | maintainers = with lib.maintainers; [NotAShelf]; 33 | }; 34 | }) 35 | -------------------------------------------------------------------------------- /pkgs/mastodon-bird-ui/package.nix: -------------------------------------------------------------------------------- 1 | { 2 | mastodon, 3 | yq-go, 4 | fetchurl, 5 | ... 6 | }: 7 | mastodon.overrideAttrs (_: { 8 | mastodonModules = mastodon.mastodonModules.overrideAttrs (oldAttrs: let 9 | # https://github.com/ronilaukkarinen/mastodon-bird-ui 10 | birdui-version = "1.8.5"; 11 | 12 | birdui-single-column = fetchurl { 13 | url = "https://raw.githubusercontent.com/ronilaukkarinen/mastodon-bird-ui/${birdui-version}/layout-single-column.css"; 14 | sha256 = "sha256-h3cb0ZiXIUEbx+8CDXPHqKe4u3ZquE90wUr/cmKkhK8="; 15 | }; 16 | 17 | birdui-multi-column = fetchurl { 18 | url = "https://raw.githubusercontent.com/ronilaukkarinen/mastodon-bird-ui/${birdui-version}/layout-multiple-columns.css"; 19 | sha256 = "sha256-NMiBkJUR+HEf+ooJwoBIMiMOKna3odZYF6h4QLIdS84="; 20 | }; 21 | in { 22 | pname = "${oldAttrs.pname}+themes"; 23 | 24 | postPatch = '' 25 | # Import theme 26 | local styleDir=$PWD/app/javascript/styles 27 | local birduiDir=$styleDir/mastodon-bird-ui 28 | 29 | mkdir -p $birduiDir 30 | cat ${birdui-single-column} > $birduiDir/layout-single-column.scss 31 | cat ${birdui-multi-column} > $birduiDir/layout-multiple-columns.scss 32 | 33 | sed -i 's/theme-contrast/theme-mastodon-bird-ui-contrast/g' $birduiDir/layout-single-column.scss 34 | sed -i 's/theme-mastodon-light/theme-mastodon-bird-ui-light/g' $birduiDir/layout-single-column.scss 35 | 36 | sed -i 's/theme-contrast/theme-mastodon-bird-ui-contrast/g' $birduiDir/layout-multiple-columns.scss 37 | sed -i 's/theme-mastodon-light/theme-mastodon-bird-ui-light/g' $birduiDir/layout-multiple-columns.scss 38 | 39 | echo -e "@import 'contrast/variables';\n@import 'application';\n@import 'contrast/diff';\n@import 'mastodon-bird-ui/layout-single-column.scss';\n@import 'mastodon-bird-ui/layout-multiple-columns.scss';" >$styleDir/mastodon-bird-ui-contrast.scss 40 | 41 | echo -e "@import 'mastodon-light/variables';\n@import 'application';\n@import 'mastodon-light/diff';\n@import 'mastodon-bird-ui/layout-single-column.scss';\n@import 'mastodon-bird-ui/layout-multiple-columns.scss';" >$styleDir/mastodon-bird-ui-light.scss 42 | 43 | echo -e "@import 'application';\n@import 'mastodon-bird-ui/layout-single-column.scss';\n@import 'mastodon-bird-ui/layout-multiple-columns.scss';" >$styleDir/mastodon-bird-ui-dark.scss 44 | 45 | # Build theme 46 | echo "mastodon-bird-ui-dark: styles/mastodon-bird-ui-dark.scss" >> $PWD/config/themes.yml 47 | echo "mastodon-bird-ui-light: styles/mastodon-bird-ui-light.scss" >> $PWD/config/themes.yml 48 | echo "mastodon-bird-ui-contrast: styles/mastodon-bird-ui-contrast.scss" >> $PWD/config/themes.yml 49 | ''; 50 | }); 51 | 52 | nativeBuildInputs = [yq-go]; 53 | 54 | postBuild = '' 55 | # Make theme available 56 | echo "mastodon-bird-ui-dark: styles/mastodon-bird-ui-dark.scss" >> $PWD/config/themes.yml 57 | echo "mastodon-bird-ui-light: styles/mastodon-bird-ui-light.scss" >> $PWD/config/themes.yml 58 | echo "mastodon-bird-ui-contrast: styles/mastodon-bird-ui-contrast.scss" >> $PWD/config/themes.yml 59 | 60 | yq -i '.en.themes.mastodon-bird-ui-dark = "Mastodon Bird UI (Dark)"' $PWD/config/locales/en.yml 61 | yq -i '.en.themes.mastodon-bird-ui-light = "Mastodon Bird UI (Light)"' $PWD/config/locales/en.yml 62 | yq -i '.en.themes.mastodon-bird-ui-contrast = "Mastodon Bird UI (High contrast)"' $PWD/config/locales/en.yml 63 | ''; 64 | }) 65 | -------------------------------------------------------------------------------- /pkgs/zsh-stripped/0001-globquote.patch: -------------------------------------------------------------------------------- 1 | diff --git a/Src/utils.c b/Src/utils.c 2 | index edf5d3df7..2d1712227 100644 3 | --- a/Src/utils.c 4 | +++ b/Src/utils.c 5 | @@ -6205,11 +6205,11 @@ quotestring(const char *s, int instring) 6 | continue; 7 | } 8 | else if (ispecial(*u) && 9 | - ((*u != '=' && *u != '~') || 10 | + ((*u != '=' && *u != '~' && *u != '#' && *u != '^') || 11 | u == s || 12 | (isset(MAGICEQUALSUBST) && 13 | - (u[-1] == '=' || u[-1] == ':')) || 14 | + (u[-1] == '=' || u[-1] == ':')) 15 | - (*u == '~' && isset(EXTENDEDGLOB))) && 16 | + ) && 17 | (instring == QT_BACKSLASH || 18 | instring == QT_SINGLE_OPTIONAL || 19 | ( 20 | -------------------------------------------------------------------------------- /pkgs/zsh-stripped/0001-remote-complete-files.patch: -------------------------------------------------------------------------------- 1 | diff --git a/Completion/Unix/Type/_remote_files b/Completion/Unix/Type/_remote_files 2 | index 93e1b7f43..4d4a7abbf 100644 3 | --- a/Completion/Unix/Type/_remote_files 4 | +++ b/Completion/Unix/Type/_remote_files 5 | @@ -60,10 +60,7 @@ if zstyle -T ":completion:${curcontext}:files" remote-access; then 6 | dirprefix=${dir}/ 7 | fi 8 | 9 | - if [[ -z $QIPREFIX ]] 10 | - then rempat="${dirprefix}${PREFIX%%[^./][^/]#}\*" 11 | - else rempat="${dirprefix}${(q)PREFIX%%[^./][^/]#}\*" 12 | - fi 13 | + rempat="${dirprefix}${(q)PREFIX%%[^./][^/]#}\*" 14 | 15 | # remote filenames 16 | remfiles=(${(M)${(f)"$( 17 | @@ -92,9 +89,9 @@ if zstyle -T ":completion:${curcontext}:files" remote-access; then 18 | while _tags; do 19 | while _next_label remote-files expl ${suf:-remote directory}; do 20 | [[ -n $suf ]] && 21 | - compadd "$args[@]" "$expl[@]" -d remdispf -- ${(q)remdispf%[*=|]} && ret=0 22 | + compadd "$args[@]" "$expl[@]" -d remdispf -- ${remdispf%[*=|]} && ret=0 23 | compadd ${suf:+-S/} $autoremove "$args[@]" "$expl[@]" -d remdispd \ 24 | - -- ${(q)remdispd%/} && ret=0 25 | + -- ${remdispd%/} && ret=0 26 | done 27 | (( ret )) || return 0 28 | done 29 | 30 | -------------------------------------------------------------------------------- /pkgs/zsh-stripped/package.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | zsh, 4 | ... 5 | }: 6 | zsh.overrideAttrs (old: { 7 | patches = 8 | (old.patches or []) 9 | ++ [ 10 | ./0001-globquote.patch 11 | 12 | # From: 13 | # 14 | ./0001-remote-complete-files.patch 15 | ]; 16 | 17 | postConfigure = 18 | (old.postConfigure or "") 19 | + '' 20 | # Find all instances of name=zsh/newuser in config.modules 21 | # remove them. 22 | sed -i -e '/^name=zsh\/newuser/d' config.modules 23 | 24 | # Also remove the newuser script to try and save some space 25 | # it doesn't amount to much, but every little bit counts. 26 | rm Scripts/newuser 27 | ''; 28 | 29 | meta = { 30 | description = "Patched version of zsh with globquote and remote file completion"; 31 | mainProgram = "zsh"; 32 | maintainers = with lib.maintainers; [NotAShelf]; 33 | }; 34 | }) 35 | -------------------------------------------------------------------------------- /shell.nix: -------------------------------------------------------------------------------- 1 | # Make `nix-shell` consistent with `nix develop` for when I don't want to use Direnv 2 | (builtins.getFlake ("git+file://" + toString ./.)).devShells.${builtins.currentSystem}.default 3 | --------------------------------------------------------------------------------