From f08bd1e702d018c5f3572ac3952c16aecc6d1e6d Mon Sep 17 00:00:00 2001 From: yukkop Date: Tue, 28 Oct 2025 11:41:26 +0000 Subject: [PATCH] feat(template): +avarage --- template/avarage/devshell/default.nix | 13 +++ template/avarage/flake.lock | 109 ++++++++++++++++++++++++++ template/avarage/flake.nix | 28 +++++++ template/default.nix | 4 + 4 files changed, 154 insertions(+) create mode 100644 template/avarage/devshell/default.nix create mode 100644 template/avarage/flake.lock create mode 100644 template/avarage/flake.nix diff --git a/template/avarage/devshell/default.nix b/template/avarage/devshell/default.nix new file mode 100644 index 0000000..b4bc670 --- /dev/null +++ b/template/avarage/devshell/default.nix @@ -0,0 +1,13 @@ +{ pkgs }: let + dev-help = pkgs.writeShellScriptBin "dev-help" /* sh */ '' + printf '%s\n' \ + 'phph' + ''; +in +pkgs.mkShell { + buildInputs = [ dev-help ]; + nativeBuildInputs = [ pkgs.pkg-config ]; + + # environment + PAGER="${pkgs.hectic.nvim-pager}/bin/pager"; +} diff --git a/template/avarage/flake.lock b/template/avarage/flake.lock new file mode 100644 index 0000000..72b7c9f --- /dev/null +++ b/template/avarage/flake.lock @@ -0,0 +1,109 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1754292888, + "narHash": "sha256-1ziydHSiDuSnaiPzCQh1mRFBsM2d2yRX9I+5OPGEmIE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ce01daebf8489ba97bd1609d185ea276efdeb121", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1739451785, + "narHash": "sha256-3ebRdThRic9bHMuNi2IAA/ek9b32bsy8F5R4SvGTIog=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1128e89fd5e11bb25aedbfc287733c6502202ea9", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "rust-overlay": "rust-overlay", + "util": "util" + } + }, + "rust-overlay": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1754362243, + "narHash": "sha256-QHNTUdI6oIYuuazGuKGhVk5RCOM1nIzDUc/AGgL7Szw=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "3ec3244ffb877f1b7f5d2dbff19241982ab25ff2", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "rust-overlay_2": { + "inputs": { + "nixpkgs": [ + "util", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1738290352, + "narHash": "sha256-YKOHUmc0Clm4tMV8grnxYL4IIwtjTayoq/3nqk0QM7k=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "b031b584125d33d23a0182f91ddbaf3ab4880236", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "util": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-unstable": "nixpkgs-unstable", + "rust-overlay": "rust-overlay_2" + }, + "locked": { + "lastModified": 1751301064, + "narHash": "sha256-/fYo5Emc7Ahvdx2u2o+6lyQxe+ECP0808q4gI5tfAGA=", + "owner": "hectic-lab", + "repo": "util.nix", + "rev": "5e112f5df8b977c64fa026ff1bc31a47eb48ec02", + "type": "github" + }, + "original": { + "owner": "hectic-lab", + "ref": "fix/postgres-extension", + "repo": "util.nix", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/template/avarage/flake.nix b/template/avarage/flake.nix new file mode 100644 index 0000000..a04c733 --- /dev/null +++ b/template/avarage/flake.nix @@ -0,0 +1,28 @@ +{ + description = ""; + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; + hutil = { + url = "github:hectic-lab/util.nix?ref=fix/postgres-extension"; + inputs = { + nixpkgs.follows = "nixpkgs"; + }; + }; + }; + + outputs = { self, nixpkgs, hutil }: + let + overlays = [ hutil.overlays.default ]; + in + hutil.lib.forAllSystemsWithPkgs overlays ({ system, pkgs }: + let + lib = pkgs.lib; + in + { + ### DEV SHELL ### + devShells.${system} = { + default = import ./devshell/default.nix { inherit pkgs; }; + }; + } + ); +} diff --git a/template/default.nix b/template/default.nix index d394780..53c36ca 100644 --- a/template/default.nix +++ b/template/default.nix @@ -3,4 +3,8 @@ path = ./rust; description = "rust dev flake template"; }; + avarage = { + path = ./avarage; + description = "avarage dev flake template"; + }; }