all repos — nix-packages @ e1db39de11d1da52db716d5ffd97897b98eee805

My personal collection of packages for nix

auto-generate readme

Alan Pearce
commit

e1db39de11d1da52db716d5ffd97897b98eee805

parent

a5ecad854af1ed58accf88dbf13cb45f6605afc3

5 files changed, 213 insertions(+), 24 deletions(-)

changed files
A .envrc
@@ -0,0 +1,6 @@
+if type -P lorri &>/dev/null; then + eval "$(lorri direnv --flake .)" +else + echo 'while direnv evaluated .envrc, could not find the command "lorri" [https://github.com/nix-community/lorri]' + use flake +fi
M .gitignore.gitignore
@@ -1,3 +1,4 @@
result result-* +/.pre-commit-config.yaml
M README.mdREADME.md
@@ -1,3 +1,22 @@
# nix-packages **My personal [NUR](https://github.com/nix-community/NUR) repository** + +## Packages +### dirstat-rs +- Version: 0.3.7 +- Homepage: https://github.com/scullionw/dirstat-rs +- Description: Fastest(?) disk usage cli, similar to windirstat + +### projectdo +- Version: 1.0.0 +- Homepage: https://github.com/paldepind/projectdo +- Description: Context-aware single-letter project commands to speed up your terminal workflow + +## Modules +### NixOS +- laminar + +### Darwin +- caddy +
M flake.lockflake.lock
@@ -1,5 +1,36 @@
{ "nodes": { + "files": { + "locked": { + "lastModified": 1750263550, + "narHash": "sha256-EW/QJ8i/13GgiynBb6zOMxhLU1uEkRqmzbIDEP23yVA=", + "owner": "mightyiam", + "repo": "files", + "rev": "5f4ef1fd1f9012354a9748be093e277675d10f07", + "type": "github" + }, + "original": { + "owner": "mightyiam", + "repo": "files", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib"
@@ -18,13 +49,54 @@ "repo": "flake-parts",
"type": "github" } }, + "git-hooks": { + "inputs": { + "flake-compat": "flake-compat", + "gitignore": "gitignore", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1759523803, + "narHash": "sha256-PTod9NG+i3XbbnBKMl/e5uHDBYpwIWivQ3gOWSEuIEM=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "cfc9f7bb163ad8542029d303e599c0f7eee09835", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1759417375, - "narHash": "sha256-O7eHcgkQXJNygY6AypkF9tFhsoDQjpNEojw3eFs73Ow=", + "lastModified": 1759070547, + "narHash": "sha256-JVZl8NaVRYb0+381nl7LvPE+A774/dRpif01FKLrYFQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "dc704e6102e76aad573f63b74c742cd96f8f1e6c", + "rev": "647e5c14cbd5067f44ac86b74f014962df460840", "type": "github" }, "original": {
@@ -49,10 +121,28 @@ "repo": "nixpkgs.lib",
"type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1759417375, + "narHash": "sha256-O7eHcgkQXJNygY6AypkF9tFhsoDQjpNEojw3eFs73Ow=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "dc704e6102e76aad573f63b74c742cd96f8f1e6c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { + "files": "files", "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs" + "git-hooks": "git-hooks", + "nixpkgs": "nixpkgs_2" } } },
M flake.nixflake.nix
@@ -1,16 +1,22 @@
{ description = "My personal NUR repository"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - inputs.flake-parts.url = "github:hercules-ci/flake-parts"; + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + flake-parts.url = "github:hercules-ci/flake-parts"; + files.url = "github:mightyiam/files"; + git-hooks.url = "github:cachix/git-hooks.nix"; + }; outputs = - inputs@{ flake-parts, ... }: + inputs@{ self, flake-parts, ... }: flake-parts.lib.mkFlake { inherit inputs; } ( { ... }: { imports = [ inputs.flake-parts.flakeModules.modules + inputs.files.flakeModules.default + inputs.git-hooks.flakeModule ]; systems = [
@@ -27,32 +33,99 @@ {
self', pkgs, lib, + config, ... }: + let + inherit pkgs; + + lpkgs = lib.filterAttrs (_: v: lib.isDerivation v) self'.legacyPackages; + + all = pkgs.symlinkJoin { + name = "all"; + paths = (import ./ci.nix { inherit pkgs; }).cachePkgs; + }; + in { legacyPackages = (import ./default.nix { inherit pkgs; }); packages = ( - let - inherit pkgs; + lpkgs + // { + inherit all; + default = all; + } + ); + + formatter = pkgs.nixfmt-tree; + + devShells.default = pkgs.mkShell { + packages = [ + config.files.writer.drv + config.pre-commit.settings.package + ] + ++ config.pre-commit.settings.enabledPackages; + + shellHook = '' + ${config.pre-commit.installationScript} + ''; + }; + + pre-commit = { + check.enable = true; + settings.hooks.gen-files = { + enable = true; + name = "Generate files from the files flake-parts module"; + files = "\\.nix$"; + excludes = [ + "ci.nix" + "overlay.nix" + ]; + pass_filenames = false; + entry = + let + inherit (config.files.writer) drv exeFilename; + in + "${drv}/bin/${exeFilename}"; + }; + }; - lpkgs = lib.filterAttrs (_: v: lib.isDerivation v) self'.legacyPackages; + files.files = [ + { + path_ = "README.md"; + drv = + let + inherit (lib) mapAttrsToList concatStringsSep; + ps = lib.filterAttrs (k: v: (k != "all") && (lib.isDerivation v)) lpkgs; - all = pkgs.symlinkJoin { - name = "all"; - paths = (import ./ci.nix { inherit pkgs; }).cachePkgs; - }; - in - ( - lpkgs - // { - inherit all; - default = all; - } - ) - ); + plist = mapAttrsToList (name: p: '' + ### ${name} + - Version: ${p.version} + - Homepage: ${p.meta.homepage} + - Description: ${p.meta.description} + '') ps; - formatter = pkgs.nixfmt-tree; + mkModuleList = mapAttrsToList ( + mod: _: '' + - ${mod} + '' + ); + in + pkgs.writeText "README.md" '' + # nix-packages + + **My personal [NUR](https://github.com/nix-community/NUR) repository** + + ## Packages + ${concatStringsSep "\n" plist} + ## Modules + ### NixOS + ${concatStringsSep "\n" (mkModuleList self.outputs.modules.nixos)} + ### Darwin + ${concatStringsSep "\n" (mkModuleList self.outputs.modules.darwin)} + ''; + } + ]; }; flake = { overlays = {