From 3f591550a99fe5a2a57927ccab15dedb4210e53e Mon Sep 17 00:00:00 2001 From: awwpotato Date: Tue, 20 May 2025 10:42:51 -0700 Subject: [PATCH] formatter: remove script, add treefmt.toml + keep-sorted (#7056) currently ./format does a bunch of stuff with git that was only necessary for nixfmt but not nixfmt-tree, so I deleted it (just use treefmt command directly instead). I also added keep sorted to keep the really long module lists sorted (already used in nixpkgs). --- .github/PULL_REQUEST_TEMPLATE.md | 3 +- .github/workflows/test.yml | 2 +- Makefile | 2 +- flake.nix | 23 +- format | 35 -- modules/lib/maintainers.nix | 850 ++++++++++++++++--------------- modules/modules.nix | 36 +- tests/darwinScrublist.nix | 16 +- tests/default.nix | 20 +- treefmt.toml | 10 + 10 files changed, 494 insertions(+), 503 deletions(-) delete mode 100755 format create mode 100644 treefmt.toml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 46ab45873..0ac4da5b4 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -21,7 +21,8 @@ Also make sure to read the guidelines found at - [ ] Change is backwards compatible. -- [ ] Code formatted with `nix fmt` or `./format`. +- [ ] Code formatted with `nix fmt` or + `nix-shell -p treefmt nixfmt-rfc-style keep-sorted --run treefmt`. - [ ] Code tested through `nix-shell --pure tests -A run.all` or `nix build --reference-lock-file flake.lock ./tests#test-all` using Flakes. diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e7c0a551e..a2c147f17 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: exit 1 fi - run: nix-build --show-trace -A docs.jsonModuleMaintainers - - run: ./format --ci + - run: nix fmt -- --ci - run: nix-shell --show-trace . -A install - run: yes | home-manager -I home-manager=. uninstall - name: Run tests diff --git a/Makefile b/Makefile index 5172e8386..c6ab25611 100644 --- a/Makefile +++ b/Makefile @@ -17,4 +17,4 @@ test-install: HOME=$(shell mktemp -d) NIX_PATH=${NIX_PATH} nix-shell . -A install format: - ./format + nix-shell -p treefmt nixfmt-rfc-style keep-sorted --run "treefmt --config-file ./treefmt.toml" diff --git a/flake.nix b/flake.nix index f424a9383..b914b55eb 100644 --- a/flake.nix +++ b/flake.nix @@ -45,22 +45,25 @@ } // ( let - forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed; + forAllPkgs = + f: + nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (system: f nixpkgs.legacyPackages.${system}); in { - formatter = forAllSystems ( - system: - nixpkgs.legacyPackages.${system}.nixfmt-tree.override { - settings = { - tree-root-file = "release.json"; - }; + formatter = forAllPkgs ( + pkgs: + pkgs.treefmt.withConfig { + runtimeInputs = with pkgs; [ + nixfmt-rfc-style + keep-sorted + ]; + settings = pkgs.lib.importTOML ./treefmt.toml; } ); - packages = forAllSystems ( - system: + packages = forAllPkgs ( + pkgs: let - pkgs = nixpkgs.legacyPackages.${system}; releaseInfo = nixpkgs.lib.importJSON ./release.json; docs = import ./docs { inherit pkgs; diff --git a/format b/format deleted file mode 100755 index 182620407..000000000 --- a/format +++ /dev/null @@ -1,35 +0,0 @@ -#! /usr/bin/env nix-shell -#! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/42a1c966be226125b48c384171c44c651c236c22.tar.gz -i bash -p git gnugrep gnused findutils nixfmt-tree -# Avoid being affected by system and user git config. -export GIT_CONFIG_NOSYSTEM=1 -export HOME=/var/empty -export XDG_CONFIG_HOME=/var/empty - -nixfmt_args=() -files=() - -for arg do - case $arg in - -h) - echo "$0 [-c]" - exit - ;; - --ci) - nixfmt_args+=("$arg") - ;; - -*) - echo "unrecognised flag: $arg" >&2 - exit 1 - ;; - *) - files+=("$arg") - ;; - esac -done - -git_root=$(git rev-parse --show-toplevel) - -git ls-files -z --cached --others --full-name -- "${files[@]}" | - grep -z '\.nix$' | - sed -z "s|^|$git_root/|" | - xargs -0 treefmt --no-cache "${nixfmt_args[@]}" diff --git a/modules/lib/maintainers.nix b/modules/lib/maintainers.nix index 679b1590f..4684ad38f 100644 --- a/modules/lib/maintainers.nix +++ b/modules/lib/maintainers.nix @@ -6,6 +6,19 @@ # # [1] https://github.com/NixOS/nixpkgs/blob/fca0d6e093c82b31103dc0dacc48da2a9b06e24b/maintainers/maintainer-list.nix#LC1 { + # keep-sorted start case=no numeric=no block=yes + "3ulalia" = { + name = "Eulalia del Sol"; + email = "3ulalia@proton.me"; + github = "3ulalia"; + githubId = "179992797"; + }; + "9p4" = { + name = "9p4"; + email = "vcs@ersei.net"; + github = "9p4"; + githubId = 17993169; + }; aabccd021 = { name = "Muhamad Abdurahman"; email = "aabccd021@gmail.com"; @@ -36,6 +49,24 @@ github = "aguirre-matteo"; githubId = 158215792; }; + aheaume = { + name = "aheaume"; + email = "aheaume@users.noreply.github.com"; + github = "aheaume"; + githubId = 13830042; + }; + ALameLlama = { + name = "Nicholas Ciechanowski"; + email = "NicholasACiechanowski@gmail.com"; + github = "ALameLlama"; + githubId = 55490546; + }; + ambroisie = { + email = "bruno.home-manager@belanyi.fr"; + github = "ambroisie"; + githubId = 12465195; + name = "Bruno BELANYI"; + }; amesgen = { name = "amesgen"; email = "amesgen@amesgen.de"; @@ -60,18 +91,30 @@ github = "bamhm182"; githubId = 920269; }; - blmhemu = { - name = "blmhemu"; - email = "19410501+blmhemu@users.noreply.github.com"; - github = "blmhemu"; - githubId = 19410501; - }; bertof = { name = "bertof"; email = "berto.f@protonmail.com"; github = "bertof"; githubId = 9915675; }; + bikku = { + name = "Bikku"; + email = "bikku+dev@slmail.me"; + github = "b1kku"; + githubId = 77858854; + }; + bjpbakker = { + email = "bart@thesoftwarecraft.com"; + github = "bjpbakker"; + githubId = 605641; + name = "Bart Bakker"; + }; + blmhemu = { + name = "blmhemu"; + email = "19410501+blmhemu@users.noreply.github.com"; + github = "blmhemu"; + githubId = 19410501; + }; bmrips = { name = "Benedikt Rips"; email = "benedikt.rips@gmail.com"; @@ -84,29 +127,48 @@ github = "brckd"; githubId = 92804487; }; + britter = { + name = "Benedikt Ritter"; + email = "beneritter@gmail.com"; + github = "britter"; + githubId = 1327662; + }; + callumio = { + name = "Callum Leslie"; + email = "git+nix@cleslie.uk"; + github = "callumio"; + githubId = 16057677; + keys = [ { fingerprint = "BC82 4BB5 1656 D144 285E A0EC D382 C4AF EECE AA90"; } ]; + }; CarlosLoboxyz = { name = "Carlos Lobo"; email = "86011416+CarlosLoboxyz@users.noreply.github.com"; github = "CarlosLoboxyz"; githubId = 86011416; }; + chisui = { + name = "Philipp Dargel"; + email = "chisui@users.noreply.github.com"; + github = "chisui"; + githubId = 4526429; + }; + ckgxrg = { + name = "ckgxrg"; + email = "ckgxrg@ckgxrg.io"; + github = "ckgxrg-salt"; + githubId = 165614491; + }; considerate = { name = "Viktor Kronvall"; email = "viktor.kronvall@gmail.com"; github = "considerate"; githubId = 217918; }; - damidoug = { - email = "contact@damidoug.dev"; - github = "damidoug"; - githubId = 75175586; - name = "Douglas Damiano"; - }; - danjujan = { - name = "Jan Schmitz"; - email = "44864658+danjujan@users.noreply.github.com"; - github = "danjujan"; - githubId = 44864658; + cwyc = { + email = "cwyc@users.noreply.github.com"; + name = "cwyc"; + github = "cwyc"; + githubId = 16950437; }; d-dervishi = { email = "david.dervishi@epfl.ch"; @@ -120,6 +182,18 @@ } ]; }; + damidoug = { + email = "contact@damidoug.dev"; + github = "damidoug"; + githubId = 75175586; + name = "Douglas Damiano"; + }; + danjujan = { + name = "Jan Schmitz"; + email = "44864658+danjujan@users.noreply.github.com"; + github = "danjujan"; + githubId = 44864658; + }; Dines97 = { name = "Denis Kaynar"; email = "19364873+Dines97@users.noreply.github.com"; @@ -144,6 +218,53 @@ githubId = 32838899; name = "Daniel Wagenknecht"; }; + fendse = { + email = "46252070+Fendse@users.noreply.github.com"; + github = "Fendse"; + githubId = 46252070; + name = "Sara Johnsson"; + }; + florpe = { + email = "jens.krewald@gmail.com"; + github = "florpe"; + githubId = 53856373; + name = "Jens Krewald"; + }; + folliehiyuki = { + name = "Hoang Nguyen"; + email = "folliekazetani@protonmail.com"; + github = "folliehiyuki"; + githubId = 67634026; + }; + foo-dogsquared = { + name = "Gabriel Arazas"; + email = "foo.dogsquared@gmail.com"; + github = "foo-dogsquared"; + githubId = 34962634; + }; + fpob = { + name = "Filip Pobořil"; + email = "fpob@proton.me"; + github = "fpob"; + githubId = 6289078; + }; + GaetanLepage = { + email = "gaetan@glepage.com"; + github = "GaetanLepage"; + githubId = 33058747; + name = "Gaetan Lepage"; + }; + genericnerdyusername = { + email = "genericnerdyusername@proton.me"; + github = "genericnerdyusername"; + githubId = 111183546; + }; + hawkw = { + name = "Eliza Weisman"; + email = "eliza@elizas.website"; + github = "hawkw"; + githubId = 2796466; + }; henrisota = { email = "henrisota@users.noreply.github.com"; github = "henrisota"; @@ -157,6 +278,36 @@ github = "hey2022"; keys = [ { fingerprint = "128E 09C0 6F73 D678 6BB5 E551 5EA5 3C75 F7BE 3EDE"; } ]; }; + HPsaucii = { + name = "Holly Powell"; + email = "me@hpsaucii.dev"; + github = "HPsaucii"; + githubId = 126502193; + keys = [ + { + longkeyid = "rsa4096/0xEDB2C634166AE6AD"; + fingerprint = "AD32 73D4 5E0E 9478 E826 543F EDB2 C634 166A E6AD"; + } + ]; + }; + ilaumjd = { + name = "Ilham AM"; + email = "ilaumjd@gmail.com"; + github = "ilaumjd"; + githubId = 16514431; + }; + iosmanthus = { + name = "iosmanthus"; + email = "myosmanthustree@gmail.com"; + github = "iosmanthus"; + githubId = 16307070; + }; + ipsavitsky = { + name = "Ilya Savitsky"; + email = "ipsavitsky234@gmail.com"; + github = "ipsavitsky"; + githubId = 33558632; + }; jack5079 = { name = "Jack W."; email = "nix@jack.cab"; @@ -187,60 +338,6 @@ githubId = 1204734; name = "Emil Karlson"; }; - justinlovinger = { - name = "Justin Lovinger"; - email = "git@justinlovinger.com"; - github = "JustinLovinger"; - githubId = 7183441; - }; - kaleo = { - name = "Kaleo Cheng"; - email = "kaleocheng@gmail.com"; - github = "kaleocheng"; - githubId = 7939352; - }; - owm111 = { - email = "7798336+owm111@users.noreply.github.com"; - name = "Owen McGrath"; - github = "owm111"; - githubId = 7798336; - }; - cwyc = { - email = "cwyc@users.noreply.github.com"; - name = "cwyc"; - github = "cwyc"; - githubId = 16950437; - }; - chisui = { - name = "Philipp Dargel"; - email = "chisui@users.noreply.github.com"; - github = "chisui"; - githubId = 4526429; - }; - foo-dogsquared = { - name = "Gabriel Arazas"; - email = "foo.dogsquared@gmail.com"; - github = "foo-dogsquared"; - githubId = 34962634; - }; - fpob = { - name = "Filip Pobořil"; - email = "fpob@proton.me"; - github = "fpob"; - githubId = 6289078; - }; - olmokramer = { - name = "Olmo Kramer"; - email = "olmokramer@users.noreply.github.com"; - github = "olmokramer"; - githubId = 3612514; - }; - iosmanthus = { - name = "iosmanthus"; - email = "myosmanthustree@gmail.com"; - github = "iosmanthus"; - githubId = 16307070; - }; jonringer = { email = "jonringer117@gmail.com"; matrix = "@jonringer:matrix.org"; @@ -248,6 +345,36 @@ githubId = 7673602; name = "Jonathan Ringer"; }; + joygnu = { + name = "joygnu"; + email = "contact@joygnu.org"; + github = "joygnu"; + githubId = 152063003; + }; + jrobsonchase = { + email = "josh@robsonchase.com"; + github = "jrobsonchase"; + githubId = 1553581; + name = "Josh Robson Chase"; + }; + justinlovinger = { + name = "Justin Lovinger"; + email = "git@justinlovinger.com"; + github = "JustinLovinger"; + githubId = 7183441; + }; + jwygoda = { + name = "Jarosław Wygoda"; + email = "jaroslaw@wygoda.me"; + github = "jwygoda"; + githubId = 20658981; + }; + kaleo = { + name = "Kaleo Cheng"; + email = "kaleocheng@gmail.com"; + github = "kaleocheng"; + githubId = 7939352; + }; kalhauge = { name = "Christian Gram Kalhauge"; email = "kalhauge@users.noreply.github.com"; @@ -272,18 +399,59 @@ github = "katexochen"; githubId = 49727155; }; + kiara = { + name = "kiara"; + email = "cinereal@riseup.net"; + github = "KiaraGrouwstra"; + githubId = 3059397; + }; + kmaasrud = { + name = "Knut Magnus Aasrud"; + email = "km@aasrud.com"; + github = "kmaasrud"; + githubId = 54394333; + }; + kranzes = { + email = "personal@ilanjoselevich.com"; + github = "Kranzes"; + githubId = 56614642; + name = "Ilan Joselevich"; + }; kubukoz = { name = "Jakub Kozłowski"; email = "kubukoz@users.noreply.github.com"; github = "kubukoz"; githubId = 894884; }; + LesVu = { + name = "John Ferse"; + email = "lesvu@ingressland.com"; + github = "LesVu"; + githubId = 66196443; + }; lheckemann = { name = "Linus Heckemann"; email = "git@sphalerite.org"; github = "lheckemann"; githubId = 341954; }; + libewa = { + email = "libewa-git@icloud.com"; + github = "libewa"; + githubId = 67926131; + }; + LilleAila = { + name = "LilleAila"; + email = "olai@olai.dev"; + github = "LilleAila"; + githubId = 67327023; + keys = [ + { + longkeyid = "ed25519/0xD1ACCDCF2B9B9799"; + fingerprint = "8185 29F9 BB4C 33F0 69BB 9782 D1AC CDCF 2B9B 9799"; + } + ]; + }; lilyinstarlight = { email = "lily@lily.flowers"; matrix = "@lily:lily.flowers"; @@ -291,6 +459,12 @@ githubId = 298109; name = "Lily Foster"; }; + liyangau = { + name = "Li Yang"; + email = "d@aufomm.com"; + github = "liyangau"; + githubId = 71299093; + }; loicreynier = { name = "Loïc Reynier"; email = "loic@loireynier.fr"; @@ -309,30 +483,120 @@ github = "LucasWagler"; githubId = 32136449; }; + lukasngl = { + name = "Lukas Nagel"; + email = "69244516+lukasngl@users.noreply.github.com"; + github = "lukasngl"; + githubId = 69244516; + }; + lunahd = { + name = "Miku B"; + email = "lunab08@proton.me"; + github = "miku4k"; + githubId = 89653242; + }; + mager = { + email = "andreas@mager.eu"; + github = "AndreasMager"; + githubId = 5646732; + name = "Andreas Mager"; + }; + mainrs = { + name = "mainrs"; + email = "5113257+mainrs@users.noreply.github.com"; + github = "mainrs"; + githubId = 5113257; + }; + malvo = { + email = "malte@malvo.org"; + github = "malte-v"; + githubId = 34393802; + name = "Malte Voos"; + }; matrss = { name = "Matthias Riße"; email = "matrss@users.noreply.github.com"; github = "matrss"; githubId = 9308656; }; + maximsmol = { + email = "maximsmol@gmail.com"; + github = "maximsmol"; + githubId = 1472826; + name = "Max Smolin"; + }; mforster = { name = "Michael Forster"; email = "email@michael-forster.de"; github = "MForster"; githubId = 4067975; }; + michaelvanstraten = { + name = "Michael van Straten"; + email = "michael@vanstraten.de"; + github = "michaelvanstraten"; + githubId = 50352631; + }; mifom = { name = "mifom"; email = "mifom@users.noreply.github.com"; github = "mifom"; githubId = 23462908; }; + mikilio = { + name = "mikilio"; + email = "official.mikilio+dev@gmail.com"; + github = "mikilio"; + githubId = 86004375; + }; + mipmip = { + name = "Pim Snel"; + email = "post@pimsnel.com"; + github = "mipmip"; + githubId = 658612; + }; + msfjarvis = { + email = "me@msfjarvis.dev"; + github = "msfjarvis"; + githubId = "13348378"; + name = "Harsh Shandilya"; + keys = [ + { + longkeyid = "rsa4096/0xB7843F823355E9B9"; + fingerprint = "8F87 050B 0F9C B841 1515 7399 B784 3F82 3355 E9B9"; + } + ]; + }; msyds = { name = "Madeleine Sydney Ślaga"; email = "65362461+msyds@users.noreply.github.com"; github = "msyds"; githubId = 65362461; }; + mtoohey = { + name = "Matthew Toohey"; + email = "contact@mtoohey.com"; + github = "mtoohey31"; + githubId = 36740602; + }; + n-hass = { + name = "Nicholas Hassan"; + email = "nick@hassan.host"; + github = "n-hass"; + githubId = 72363381; + keys = [ + { + longkeyid = "rsa4096/0xFC95AB946A781EE7"; + fingerprint = "FDEE 6116 DBA7 8840 7323 4466 A371 5973 2728 A6A6"; + } + ]; + }; + NateCox = { + name = "Nate Cox"; + email = "nate@natecox.dev"; + github = "natecox"; + githubId = 2782695; + }; nickthegroot = { name = "Nick DeGroot"; email = "nick@nickthegroot.com"; @@ -357,165 +621,11 @@ github = "NitroSniper"; githubId = 44097331; }; - n-hass = { - name = "Nicholas Hassan"; - email = "nick@hassan.host"; - github = "n-hass"; - githubId = 72363381; - keys = [ - { - longkeyid = "rsa4096/0xFC95AB946A781EE7"; - fingerprint = "FDEE 6116 DBA7 8840 7323 4466 A371 5973 2728 A6A6"; - } - ]; - }; - seylerius = { - email = "sable@seyleri.us"; - name = "Sable Seyler"; - github = "seylerius"; - githubId = 1145981; - keys = [ - { - logkeyid = "rsa4096/0x68BF2EAE6D91CAFF"; - fingerprint = "F0E0 0311 126A CD72 4392 25E6 68BF 2EAE 6D91 CAFF"; - } - ]; - }; - silmarp = { - name = "Silmar Pereira da Silva Junior"; - email = "silmarjr2@gmail.com"; - github = "silmarp"; - githubID = 67292496; - }; - fendse = { - email = "46252070+Fendse@users.noreply.github.com"; - github = "Fendse"; - githubId = 46252070; - name = "Sara Johnsson"; - }; - florpe = { - email = "jens.krewald@gmail.com"; - github = "florpe"; - githubId = 53856373; - name = "Jens Krewald"; - }; - GaetanLepage = { - email = "gaetan@glepage.com"; - github = "GaetanLepage"; - githubId = 33058747; - name = "Gaetan Lepage"; - }; - genericnerdyusername = { - email = "genericnerdyusername@proton.me"; - github = "genericnerdyusername"; - githubId = 111183546; - }; - maximsmol = { - email = "maximsmol@gmail.com"; - github = "maximsmol"; - githubId = 1472826; - name = "Max Smolin"; - }; - msfjarvis = { - email = "me@msfjarvis.dev"; - github = "msfjarvis"; - githubId = "13348378"; - name = "Harsh Shandilya"; - keys = [ - { - longkeyid = "rsa4096/0xB7843F823355E9B9"; - fingerprint = "8F87 050B 0F9C B841 1515 7399 B784 3F82 3355 E9B9"; - } - ]; - }; - ambroisie = { - email = "bruno.home-manager@belanyi.fr"; - github = "ambroisie"; - githubId = 12465195; - name = "Bruno BELANYI"; - }; - libewa = { - email = "libewa-git@icloud.com"; - github = "libewa"; - githubId = 67926131; - }; - malvo = { - email = "malte@malvo.org"; - github = "malte-v"; - githubId = 34393802; - name = "Malte Voos"; - }; - kranzes = { - email = "personal@ilanjoselevich.com"; - github = "Kranzes"; - githubId = 56614642; - name = "Ilan Joselevich"; - }; - kiara = { - name = "kiara"; - email = "cinereal@riseup.net"; - github = "KiaraGrouwstra"; - githubId = 3059397; - }; - mager = { - email = "andreas@mager.eu"; - github = "AndreasMager"; - githubId = 5646732; - name = "Andreas Mager"; - }; - bjpbakker = { - email = "bart@thesoftwarecraft.com"; - github = "bjpbakker"; - githubId = 605641; - name = "Bart Bakker"; - }; - ilaumjd = { - name = "Ilham AM"; - email = "ilaumjd@gmail.com"; - github = "ilaumjd"; - githubId = 16514431; - }; - jrobsonchase = { - email = "josh@robsonchase.com"; - github = "jrobsonchase"; - githubId = 1553581; - name = "Josh Robson Chase"; - }; - jwygoda = { - name = "Jarosław Wygoda"; - email = "jaroslaw@wygoda.me"; - github = "jwygoda"; - githubId = 20658981; - }; - hawkw = { - name = "Eliza Weisman"; - email = "eliza@elizas.website"; - github = "hawkw"; - githubId = 2796466; - }; - pamplemousse = { - name = "Xavier Maso"; - email = "xav.maso@gmail.com"; - github = "pamplemousse"; - githubId = 2647236; - }; - onny = { - name = "onny"; - email = "onny@project-insanity.org"; - github = "onny"; - githubId = 757752; - }; - aheaume = { - name = "aheaume"; - email = "aheaume@users.noreply.github.com"; - github = "aheaume"; - githubId = 13830042; - }; - t4ccer = { - name = "t4ccer"; - email = "t4ccer@users.noreply.github.com"; - github = "t4ccer"; - githubId = 64430288; + noodlez = { + name = "Nathaniel Barragan"; + email = "contact@nathanielbarragan.xyz"; + github = "Noodlez1232"; + githubId = 12480453; }; nurelin = { name = "nurelin"; @@ -523,6 +633,18 @@ github = "nurelin"; githubId = 5276274; }; + olmokramer = { + name = "Olmo Kramer"; + email = "olmokramer@users.noreply.github.com"; + github = "olmokramer"; + githubId = 3612514; + }; + onny = { + name = "onny"; + email = "onny@project-insanity.org"; + github = "onny"; + githubId = 757752; + }; otavio = { email = "otavio.salvador@ossystems.com.br"; github = "otavio"; @@ -535,11 +657,23 @@ github = "Oughie"; githubId = 123173954; }; - pltanton = { - name = "pltanton"; - email = "plotnikovanton@gmail.com"; - github = "pltanton"; - githubId = 4561823; + owm111 = { + email = "7798336+owm111@users.noreply.github.com"; + name = "Owen McGrath"; + github = "owm111"; + githubId = 7798336; + }; + pamplemousse = { + name = "Xavier Maso"; + email = "xav.maso@gmail.com"; + github = "pamplemousse"; + githubId = 2647236; + }; + pedorich-n = { + name = "Mykyta Pedorich"; + email = "pedorich.n@gmail.com"; + github = "pedorich-n"; + githubId = 15573098; }; Philipp-M = { email = "philipp@mildenberger.me"; @@ -553,41 +687,22 @@ github = "pinage404"; githubId = 6325757; }; + pltanton = { + name = "pltanton"; + email = "plotnikovanton@gmail.com"; + github = "pltanton"; + githubId = 4561823; + }; podocarp = { name = "Jia Xiaodong"; email = "xdjiaxd@gmail.com"; github = "podocarp"; githubId = 10473184; }; - mainrs = { - name = "mainrs"; - email = "5113257+mainrs@users.noreply.github.com"; - github = "mainrs"; - githubId = 5113257; - }; - mikilio = { - name = "mikilio"; - email = "official.mikilio+dev@gmail.com"; - github = "mikilio"; - githubId = 86004375; - }; - kmaasrud = { - name = "Knut Magnus Aasrud"; - email = "km@aasrud.com"; - github = "kmaasrud"; - githubId = 54394333; - }; - sebtm = { - name = "Sebastian Sellmeier"; - email = "sebtm@users.noreply.github.com"; - github = "sebtm"; - githubId = 17243347; - }; - shimunn = { - name = "shimun"; - email = "home-manager.c.shimun@shimun.net"; - github = "shimunn"; - githubId = 41011289; + PopeRigby = { + name = "PopeRigby"; + github = "poperigby"; + githubId = 20866468; }; rasmus-kirk = { name = "Rasmus Kirk"; @@ -595,18 +710,6 @@ github = "rasmus-kirk"; githubId = 57323869; }; - rosuavio = { - name = "Rosario Pulella"; - email = "RosarioPulella@gmail.com"; - github = "Rosuavio"; - githubId = 7164552; - }; - rszamszur = { - name = "Radosław Szamszur"; - email = "radoslawszamszur@gmail.com"; - github = "rszamszur"; - githubId = 10353018; - }; rcerc = { name = "rcerc"; email = "88944439+rcerc@users.noreply.github.com"; @@ -619,17 +722,47 @@ } ]; }; - mtoohey = { - name = "Matthew Toohey"; - email = "contact@mtoohey.com"; - github = "mtoohey31"; - githubId = 36740602; + rosuavio = { + name = "Rosario Pulella"; + email = "RosarioPulella@gmail.com"; + github = "Rosuavio"; + githubId = 7164552; }; - lukasngl = { - name = "Lukas Nagel"; - email = "69244516+lukasngl@users.noreply.github.com"; - github = "lukasngl"; - githubId = 69244516; + rszamszur = { + name = "Radosław Szamszur"; + email = "radoslawszamszur@gmail.com"; + github = "rszamszur"; + githubId = 10353018; + }; + sebtm = { + name = "Sebastian Sellmeier"; + email = "sebtm@users.noreply.github.com"; + github = "sebtm"; + githubId = 17243347; + }; + seylerius = { + email = "sable@seyleri.us"; + name = "Sable Seyler"; + github = "seylerius"; + githubId = 1145981; + keys = [ + { + logkeyid = "rsa4096/0x68BF2EAE6D91CAFF"; + fingerprint = "F0E0 0311 126A CD72 4392 25E6 68BF 2EAE 6D91 CAFF"; + } + ]; + }; + shimunn = { + name = "shimun"; + email = "home-manager.c.shimun@shimun.net"; + github = "shimunn"; + githubId = 41011289; + }; + silmarp = { + name = "Silmar Pereira da Silva Junior"; + email = "silmarjr2@gmail.com"; + github = "silmarp"; + githubID = 67292496; }; soywod = { name = "Clément DOUIN"; @@ -639,6 +772,12 @@ githubId = 10437171; keys = [ { fingerprint = "75F0 AB7C FE01 D077 AEE6 CAFD 353E 4A18 EE0F AB72"; } ]; }; + t4ccer = { + name = "t4ccer"; + email = "t4ccer@users.noreply.github.com"; + github = "t4ccer"; + githubId = 64430288; + }; tensor5 = { github = "tensor5"; githubId = 1545895; @@ -666,154 +805,17 @@ githubId = 68489118; name = "tomodachi94"; }; - NateCox = { - name = "Nate Cox"; - email = "nate@natecox.dev"; - github = "natecox"; - githubId = 2782695; - }; - pedorich-n = { - name = "Mykyta Pedorich"; - email = "pedorich.n@gmail.com"; - github = "pedorich-n"; - githubId = 15573098; - }; - PopeRigby = { - name = "PopeRigby"; - github = "poperigby"; - githubId = 20866468; - }; - LilleAila = { - name = "LilleAila"; - email = "olai@olai.dev"; - github = "LilleAila"; - githubId = 67327023; - keys = [ - { - longkeyid = "ed25519/0xD1ACCDCF2B9B9799"; - fingerprint = "8185 29F9 BB4C 33F0 69BB 9782 D1AC CDCF 2B9B 9799"; - } - ]; - }; - liyangau = { - name = "Li Yang"; - email = "d@aufomm.com"; - github = "liyangau"; - githubId = 71299093; - }; wcarlsen = { name = "Willi Carlsen"; email = "carlsenwilli+nix@gmail.com"; github = "wcarlsen"; githubId = 17003032; }; - "9p4" = { - name = "9p4"; - email = "vcs@ersei.net"; - github = "9p4"; - githubId = 17993169; - }; - britter = { - name = "Benedikt Ritter"; - email = "beneritter@gmail.com"; - github = "britter"; - githubId = 1327662; - }; zorrobert = { name = "zorrobert"; email = "zorrobert@mailbox.org"; github = "zorrobert"; githubId = 118135271; }; - joygnu = { - name = "joygnu"; - email = "contact@joygnu.org"; - github = "joygnu"; - githubId = 152063003; - }; - callumio = { - name = "Callum Leslie"; - email = "git+nix@cleslie.uk"; - github = "callumio"; - githubId = 16057677; - keys = [ { fingerprint = "BC82 4BB5 1656 D144 285E A0EC D382 C4AF EECE AA90"; } ]; - }; - ALameLlama = { - name = "Nicholas Ciechanowski"; - email = "NicholasACiechanowski@gmail.com"; - github = "ALameLlama"; - githubId = 55490546; - }; - ckgxrg = { - name = "ckgxrg"; - email = "ckgxrg@ckgxrg.io"; - github = "ckgxrg-salt"; - githubId = 165614491; - }; - HPsaucii = { - name = "Holly Powell"; - email = "me@hpsaucii.dev"; - github = "HPsaucii"; - githubId = 126502193; - keys = [ - { - longkeyid = "rsa4096/0xEDB2C634166AE6AD"; - fingerprint = "AD32 73D4 5E0E 9478 E826 543F EDB2 C634 166A E6AD"; - } - ]; - }; - folliehiyuki = { - name = "Hoang Nguyen"; - email = "folliekazetani@protonmail.com"; - github = "folliehiyuki"; - githubId = 67634026; - }; - "3ulalia" = { - name = "Eulalia del Sol"; - email = "3ulalia@proton.me"; - github = "3ulalia"; - githubId = "179992797"; - }; - ipsavitsky = { - name = "Ilya Savitsky"; - email = "ipsavitsky234@gmail.com"; - github = "ipsavitsky"; - githubId = 33558632; - }; - noodlez = { - name = "Nathaniel Barragan"; - email = "contact@nathanielbarragan.xyz"; - github = "Noodlez1232"; - githubId = 12480453; - }; - michaelvanstraten = { - name = "Michael van Straten"; - email = "michael@vanstraten.de"; - github = "michaelvanstraten"; - githubId = 50352631; - }; - mipmip = { - name = "Pim Snel"; - email = "post@pimsnel.com"; - github = "mipmip"; - githubId = 658612; - }; - LesVu = { - name = "John Ferse"; - email = "lesvu@ingressland.com"; - github = "LesVu"; - githubId = 66196443; - }; - lunahd = { - name = "Miku B"; - email = "lunab08@proton.me"; - github = "miku4k"; - githubId = 89653242; - }; - bikku = { - name = "Bikku"; - email = "bikku+dev@slmail.me"; - github = "b1kku"; - githubId = 77858854; - }; + # keep-sorted end } diff --git a/modules/modules.nix b/modules/modules.nix index 57ea95ba2..e155d3627 100644 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -15,11 +15,13 @@ let modules = [ - ./accounts/email.nix + # keep-sorted start case=no numeric=yes ./accounts/calendar.nix ./accounts/contacts.nix + ./accounts/email.nix ./config/home-cursor.nix ./config/i18n.nix + ./dbus.nix ./files.nix ./home-environment.nix ./i18n/input-method/default.nix @@ -33,6 +35,7 @@ let ./misc/lib.nix ./misc/mozilla-messaging-hosts.nix ./misc/news.nix + ./misc/nix.nix ./misc/nixgl.nix ./misc/numlock.nix ./misc/pam.nix @@ -68,10 +71,10 @@ let ./programs/autojump.nix ./programs/autorandr.nix ./programs/awscli.nix + ./programs/bacon.nix ./programs/bash.nix ./programs/bashmount.nix ./programs/bat.nix - ./programs/bacon.nix ./programs/beets.nix ./programs/bemenu.nix ./programs/borgmatic.nix @@ -107,14 +110,15 @@ let ./programs/firefox.nix ./programs/fish.nix ./programs/floorp.nix + ./programs/foliate.nix ./programs/foot.nix ./programs/freetube.nix ./programs/fuzzel.nix ./programs/fzf.nix ./programs/gallery-dl.nix ./programs/getmail.nix - ./programs/gh.nix ./programs/gh-dash.nix + ./programs/gh.nix ./programs/ghostty.nix ./programs/git-cliff.nix ./programs/git-credential-oauth.nix @@ -149,11 +153,11 @@ let ./programs/irssi.nix ./programs/java.nix ./programs/jetbrains-remote.nix + ./programs/joplin-desktop.nix + ./programs/joshuto.nix ./programs/jq.nix ./programs/jqp.nix ./programs/jujutsu.nix - ./programs/joshuto.nix - ./programs/joplin-desktop.nix ./programs/just.nix ./programs/k9s.nix ./programs/kakoune.nix @@ -238,15 +242,17 @@ let ./programs/pubs.nix ./programs/pyenv.nix ./programs/pylint.nix + ./programs/pywal.nix ./programs/qcal.nix ./programs/qutebrowser.nix ./programs/ranger.nix + ./programs/rbenv.nix ./programs/rbw.nix ./programs/rclone.nix ./programs/readline.nix ./programs/rio.nix - ./programs/ripgrep.nix ./programs/ripgrep-all.nix + ./programs/ripgrep.nix ./programs/rmpc.nix ./programs/rofi-pass.nix ./programs/rofi.nix @@ -288,8 +294,8 @@ let ./programs/tiny.nix ./programs/tmate.nix ./programs/tmux.nix - ./programs/tofi.nix ./programs/todoman.nix + ./programs/tofi.nix ./programs/topgrade.nix ./programs/translate-shell.nix ./programs/urxvt.nix @@ -300,16 +306,14 @@ let ./programs/vim-vint.nix ./programs/vim.nix ./programs/vinegar.nix + ./programs/visidata.nix ./programs/vscode.nix ./programs/vscode/haskell.nix - ./programs/visidata.nix - ./programs/pywal.nix - ./programs/rbenv.nix ./programs/wallust.nix ./programs/watson.nix ./programs/waveterm.nix - ./programs/waylogout.nix ./programs/waybar.nix + ./programs/waylogout.nix ./programs/wayprompt.nix ./programs/wezterm.nix ./programs/wlogout.nix @@ -359,12 +363,11 @@ let ./services/dwm-status.nix ./services/easyeffects.nix ./services/emacs.nix - ./services/etesync-dav.nix ./services/espanso.nix + ./services/etesync-dav.nix ./services/flameshot.nix ./services/fluidsynth.nix ./services/fnott.nix - ./programs/foliate.nix ./services/fusuma.nix ./services/getmail.nix ./services/git-sync.nix @@ -398,11 +401,11 @@ let ./services/mbsync.nix ./services/megasync.nix ./services/mopidy.nix + ./services/mpd-discord-rpc.nix + ./services/mpd-mpris.nix ./services/mpd.nix ./services/mpdris2.nix ./services/mpdscribble.nix - ./services/mpd-discord-rpc.nix - ./services/mpd-mpris.nix ./services/mpris-proxy.nix ./services/muchsync.nix ./services/network-manager-applet.nix @@ -492,13 +495,12 @@ let ./services/xsuspender.nix ./services/yubikey-agent.nix ./systemd.nix - ./dbus.nix ./targets/darwin ./targets/generic-linux.nix ./wayland.nix ./xresources.nix ./xsession.nix - ./misc/nix.nix + # keep-sorted end (pkgs.path + "/nixos/modules/misc/assertions.nix") (pkgs.path + "/nixos/modules/misc/meta.nix") diff --git a/tests/darwinScrublist.nix b/tests/darwinScrublist.nix index 4dbc0335c..2970ca06f 100644 --- a/tests/darwinScrublist.nix +++ b/tests/darwinScrublist.nix @@ -4,6 +4,7 @@ let # List of packages that need to be scrubbed on Darwin # Packages are scrubbed on Linux and expected in test output packagesToScrub = [ + # keep-sorted start case=no numeric=yes "aerc" "aerospace" "alacritty" @@ -14,9 +15,9 @@ let "autojump" "bacon" "bash" - "bashInteractive" "bash-completion" "bash-preexec" + "bashInteractive" "bat" "borgmatic" "bottom" @@ -29,8 +30,8 @@ let "cmus" "comodoro" "darcs" - "dircolors" "delta" + "dircolors" "direnv" "earthly" "element-desktop" @@ -45,12 +46,11 @@ let "gh-dash" "ghostty" "git" - "patdiff" - "gitMinimal" "git-cliff" "git-credential-oauth" "git-lfs" "git-worktree-switcher" + "gitMinimal" "gnupg" "go" "gradle" @@ -66,9 +66,9 @@ let "irssi" "isync" "jankyborders" - "jujutsu" "joplin-desktop" "jqp" + "jujutsu" "k9s" "kakoune" "khal" @@ -82,16 +82,16 @@ let "less" "lesspipe" "lf" - "lsd" "lieer" + "lsd" "mbsync" "mergiraf" "micro" "mise" "mpv" + "msmtp" "mu" "mujmap" - "msmtp" "ncmpcpp" "ne" "neomutt" @@ -112,6 +112,7 @@ let "onlyoffice-desktopeditors" "openstackclient" "papis" + "patdiff" "pay-respects" "pet" "pistol" @@ -164,6 +165,7 @@ let "zoxide" "zplug" "zsh" + # keep-sorted end ]; # Create an overlay that scrubs packages in the scrublist diff --git a/tests/default.nix b/tests/default.nix index f6d41e4b1..8b2c66622 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -158,6 +158,7 @@ import nmtSrc { ]; tests = builtins.foldl' (a: b: a // (import b)) { } ( [ + # keep-sorted start case=no numeric=yes ./lib/generators ./lib/types ./modules/files @@ -219,9 +220,9 @@ import nmtSrc { ./modules/programs/i3status ./modules/programs/inori ./modules/programs/irssi - ./modules/programs/jujutsu ./modules/programs/joplin-desktop ./modules/programs/jqp + ./modules/programs/jujutsu ./modules/programs/k9s ./modules/programs/kakoune ./modules/programs/keepassxc @@ -230,13 +231,13 @@ import nmtSrc { ./modules/programs/kitty ./modules/programs/kubecolor ./modules/programs/lapce - ./modules/programs/ledger ./modules/programs/lazydocker + ./modules/programs/ledger ./modules/programs/less ./modules/programs/lesspipe ./modules/programs/lf - ./modules/programs/lsd ./modules/programs/lieer + ./modules/programs/lsd ./modules/programs/man ./modules/programs/mbsync ./modules/programs/mergiraf @@ -326,8 +327,10 @@ import nmtSrc { ./modules/services/gpg-agent ./modules/services/syncthing/common ./modules/xresources + # keep-sorted end ] ++ lib.optionals isDarwin [ + # keep-sorted start case=no numeric=yes ./modules/launchd ./modules/programs/aerospace ./modules/programs/element-desktop/darwin.nix @@ -344,11 +347,13 @@ import nmtSrc { ./modules/services/skhd ./modules/services/yubikey-agent-darwin ./modules/targets-darwin + # keep-sorted end ] ++ lib.optionals isLinux [ - ./modules/misc/xdg/linux.nix + # keep-sorted start case=no numeric=yes ./modules/config/home-cursor ./modules/config/i18n + ./modules/dbus ./modules/i18n/input-method ./modules/misc/debug ./modules/misc/editorconfig @@ -356,6 +361,7 @@ import nmtSrc { ./modules/misc/numlock ./modules/misc/pam ./modules/misc/qt + ./modules/misc/xdg/linux.nix ./modules/misc/xsession ./modules/programs/abook ./modules/programs/anyrun @@ -382,8 +388,8 @@ import nmtSrc { ./modules/programs/i3blocks ./modules/programs/i3status-rust ./modules/programs/imv - ./modules/programs/kodi ./modules/programs/kickoff + ./modules/programs/kodi ./modules/programs/looking-glass-client ./modules/programs/lutris ./modules/programs/mangohud @@ -423,8 +429,8 @@ import nmtSrc { ./modules/services/clipman ./modules/services/clipse ./modules/services/comodoro - ./modules/services/copyq ./modules/services/conky + ./modules/services/copyq ./modules/services/darkman ./modules/services/davmail ./modules/services/devilspie2 @@ -506,7 +512,7 @@ import nmtSrc { ./modules/services/yubikey-agent ./modules/systemd ./modules/targets-linux - ./modules/dbus + # keep-sorted end ] ); } diff --git a/treefmt.toml b/treefmt.toml new file mode 100644 index 000000000..c642cdce6 --- /dev/null +++ b/treefmt.toml @@ -0,0 +1,10 @@ +on-unmatched = "info" +tree-root-file = "release.json" + +[formatter.nixfmt] +command = "nixfmt" +includes = [ "*.nix" ] + +[formatter.keep-sorted] +command = "keep-sorted" +includes = [ "*" ]