From 38364b9b8418b65d15febe2298b124b536b83f18 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Fri, 22 Dec 2023 16:20:10 -0500 Subject: [PATCH] ci: finish discommit --- .forgejo/workflows/discord.yml | 27 + .../.eslintrc.json | 0 .../commit.d.ts | 0 common/pkgs/discommit/flake.lock | 27 + common/pkgs/discommit/flake.nix | 59 + .../{discord-commits => discommit}/index.ts | 18 +- .../package-lock.json | 0 .../package.json | 0 .../tsconfig.json | 0 common/pkgs/discord-commits/flake.lock | 1204 ----------------- common/pkgs/discord-commits/flake.nix | 37 - 11 files changed, 122 insertions(+), 1250 deletions(-) create mode 100644 .forgejo/workflows/discord.yml rename common/pkgs/{discord-commits => discommit}/.eslintrc.json (100%) rename common/pkgs/{discord-commits => discommit}/commit.d.ts (100%) create mode 100644 common/pkgs/discommit/flake.lock create mode 100644 common/pkgs/discommit/flake.nix rename common/pkgs/{discord-commits => discommit}/index.ts (56%) rename common/pkgs/{discord-commits => discommit}/package-lock.json (100%) rename common/pkgs/{discord-commits => discommit}/package.json (100%) rename common/pkgs/{discord-commits => discommit}/tsconfig.json (100%) delete mode 100644 common/pkgs/discord-commits/flake.lock delete mode 100644 common/pkgs/discord-commits/flake.nix diff --git a/.forgejo/workflows/discord.yml b/.forgejo/workflows/discord.yml new file mode 100644 index 0000000..559def8 --- /dev/null +++ b/.forgejo/workflows/discord.yml @@ -0,0 +1,27 @@ +name: Discord + +on: + workflow_dispatch: + push: + paths: + - 'devices/oksys/*' + +jobs: + discord_commits: + runs-on: ubuntu-latest + name: discord commits + env: + DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} + + steps: + - name: Checkout + uses: https://github.com/actions/checkout@v3 + + - name: setup-nix + uses: https://github.com/cachix/install-nix-action@v24 + + - name: update + working-directory: ./common/pkgs/discommit + env: + DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} + run: nix run . $DISCORD_WEBHOOK diff --git a/common/pkgs/discord-commits/.eslintrc.json b/common/pkgs/discommit/.eslintrc.json similarity index 100% rename from common/pkgs/discord-commits/.eslintrc.json rename to common/pkgs/discommit/.eslintrc.json diff --git a/common/pkgs/discord-commits/commit.d.ts b/common/pkgs/discommit/commit.d.ts similarity index 100% rename from common/pkgs/discord-commits/commit.d.ts rename to common/pkgs/discommit/commit.d.ts diff --git a/common/pkgs/discommit/flake.lock b/common/pkgs/discommit/flake.lock new file mode 100644 index 0000000..fdcd6d4 --- /dev/null +++ b/common/pkgs/discommit/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1703013332, + "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/common/pkgs/discommit/flake.nix b/common/pkgs/discommit/flake.nix new file mode 100644 index 0000000..e1a3169 --- /dev/null +++ b/common/pkgs/discommit/flake.nix @@ -0,0 +1,59 @@ +{ + #inputs.main.url = "path:../../../"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + + outputs = { + self, + #main, + nixpkgs, + ... + }: let + #nixpkgs = main.inputs.nixpkgs; + supportedSystems = ["x86_64-linux"]; + + perSystem = attrs: + nixpkgs.lib.genAttrs supportedSystems (system: let + pkgs = nixpkgs.legacyPackages.${system}; + in + attrs system pkgs); + + in { + packages = perSystem (system: pkgs: { + discommit = pkgs.buildNpmPackage { + name = "discommit"; + src = ./.; + npmDepsHash = "sha256-/Ryhmg7phHHWniWQock95wAJz4TNYDDsLBEXcICz9ao="; + nativeBuildInputs = with pkgs; [ + typescript + nodejs_20 + ]; + + buildPhase = '' + tsc -p tsconfig.json + ''; + + installPhase = '' + mkdir -p $out/bin + mv node_modules package.json $out + + chmod +x ./build/index.js + cp -a ./build/index.js $out/bin/discommit + ''; + }; + default = self.packages.${system}.discommit; + }); + + formatter = perSystem (_: pkgs: pkgs.alejandra); + + devShells = perSystem (_: pkgs: { + default = pkgs.mkShell { + packages = with pkgs; [ + alejandra + git + nodejs_20 + typescript + ]; + }; + }); + }; +} diff --git a/common/pkgs/discord-commits/index.ts b/common/pkgs/discommit/index.ts similarity index 56% rename from common/pkgs/discord-commits/index.ts rename to common/pkgs/discommit/index.ts index d487783..f9a4a32 100644 --- a/common/pkgs/discord-commits/index.ts +++ b/common/pkgs/discommit/index.ts @@ -1,24 +1,24 @@ +#!/usr/bin/env node + import { Commit } from 'commit'; // Custom type import fetch from 'node-fetch'; const DATA = { - env: {...process.env}, - webhook: process.argv[2], // get it from env? + sha: process.env.GITHUB_SHA, + webhook: process.argv[2], }; -const allCommits = await (await fetch('https://git.nelim.org/api/v1/repos/matt1432/nixos-configs/commits')).json() as Array; - -const last = allCommits[0]; +const commitInfo = await (await fetch(`https://git.nelim.org/api/v1/repos/matt1432/nixos-configs/git/commits/${DATA.sha}`)).json() as Commit; const commit = JSON.stringify({ content: null, embeds: [{ title: 'New commit containing changes to server configs:', - description: last.commit.message, - url: last.url, + description: commitInfo.commit.message, + url: commitInfo.url, author: { - name: last.author.username, - icon_url: last.author.avatar_url, + name: commitInfo.author.username, + icon_url: commitInfo.author.avatar_url, }, }], // Diff: await (await fetch(`${last['url']}.diff`)).text() diff --git a/common/pkgs/discord-commits/package-lock.json b/common/pkgs/discommit/package-lock.json similarity index 100% rename from common/pkgs/discord-commits/package-lock.json rename to common/pkgs/discommit/package-lock.json diff --git a/common/pkgs/discord-commits/package.json b/common/pkgs/discommit/package.json similarity index 100% rename from common/pkgs/discord-commits/package.json rename to common/pkgs/discommit/package.json diff --git a/common/pkgs/discord-commits/tsconfig.json b/common/pkgs/discommit/tsconfig.json similarity index 100% rename from common/pkgs/discord-commits/tsconfig.json rename to common/pkgs/discommit/tsconfig.json diff --git a/common/pkgs/discord-commits/flake.lock b/common/pkgs/discord-commits/flake.lock deleted file mode 100644 index f666041..0000000 --- a/common/pkgs/discord-commits/flake.lock +++ /dev/null @@ -1,1204 +0,0 @@ -{ - "nodes": { - "ags": { - "inputs": { - "nixpkgs": [ - "main", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1703084405, - "narHash": "sha256-kmpns3mc7IzDYRIvyK+ZubaUJKqp869siRlsc1bMrGg=", - "owner": "Aylur", - "repo": "ags", - "rev": "f6dd934744f496731c2d857b03a7e1c7456e2757", - "type": "github" - }, - "original": { - "owner": "Aylur", - "repo": "ags", - "type": "github" - } - }, - "caddy-plugins": { - "inputs": { - "nixpkgs": [ - "main", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1703195663, - "narHash": "sha256-N5F407xhbcqiBlhMJ77hWwG2vxSINQL7gkSux3QtwwQ=", - "owner": "matt1432", - "repo": "nixos-caddy-cloudflare", - "rev": "6987095bd39c8cdc07c49e479e6dadfd974c96f4", - "type": "github" - }, - "original": { - "owner": "matt1432", - "repo": "nixos-caddy-cloudflare", - "type": "github" - } - }, - "coc-stylelintplus-flake": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": [ - "main", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1701045677, - "narHash": "sha256-Uw7TY8kqcikjeoT3y6Bh7UHvS8Z4jYJTvSkeFKrxfOQ=", - "owner": "matt1432", - "repo": "coc-stylelintplus", - "rev": "3a318b03c4d794ceb80bf24a083334d5cbcc86e5", - "type": "github" - }, - "original": { - "owner": "matt1432", - "repo": "coc-stylelintplus", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_2": { - "locked": { - "lastModified": 1688025799, - "narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=", - "owner": "nix-community", - "repo": "flake-compat", - "rev": "8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-parts": { - "inputs": { - "nixpkgs-lib": [ - "main", - "neovim-flake", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1701473968, - "narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_2": { - "inputs": { - "nixpkgs-lib": [ - "main", - "neovim-flake", - "hercules-ci-effects", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1696343447, - "narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4", - "type": "github" - }, - "original": { - "id": "flake-parts", - "type": "indirect" - } - }, - "flake-parts_3": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1701473968, - "narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_4": { - "inputs": { - "nixpkgs-lib": [ - "main", - "nixpkgs-wayland", - "nix-eval-jobs", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1701473968, - "narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1694529238, - "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_3": { - "inputs": { - "systems": "systems_4" - }, - "locked": { - "lastModified": 1694529238, - "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_4": { - "inputs": { - "systems": "systems_5" - }, - "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_5": { - "inputs": { - "systems": "systems_6" - }, - "locked": { - "lastModified": 1694529238, - "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "headscale": { - "inputs": { - "flake-utils": "flake-utils_2", - "nixpkgs": [ - "main", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1703105268, - "narHash": "sha256-o9wC7nPaYXF+3/wxIf9ncCjnxZ+rJSr79YEBHlP37tY=", - "owner": "juanfont", - "repo": "headscale", - "rev": "55ca078f2240361e5607134a3ac54068cb599b6f", - "type": "github" - }, - "original": { - "owner": "juanfont", - "repo": "headscale", - "type": "github" - } - }, - "hercules-ci-effects": { - "inputs": { - "flake-parts": "flake-parts_2", - "nixpkgs": [ - "main", - "neovim-flake", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1701009247, - "narHash": "sha256-GuX16rzRze2y7CsewJLTV6qXkXWyEwp6VCZXi8HLruU=", - "owner": "hercules-ci", - "repo": "hercules-ci-effects", - "rev": "31b6cd7569191bfcd0a548575b0e2ef953ed7d09", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "hercules-ci-effects", - "type": "github" - } - }, - "home-manager": { - "inputs": { - "nixpkgs": [ - "main", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1703178811, - "narHash": "sha256-Orbqa8DvszYZ38XGWAs43hVs++czt2N6/Y0sFRLhJms=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "fb5ac0c870a1b3ffea70e02ab1720d991ce812ae", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "hyprgrass": { - "inputs": { - "hyprland": [ - "main", - "hyprland" - ] - }, - "locked": { - "lastModified": 1702781283, - "narHash": "sha256-uR/vE/EGJwSEzJS40mEYATwybUODgMgH54l73xkjr0k=", - "owner": "horriblename", - "repo": "hyprgrass", - "rev": "ebc604b2e0e1fba8949675bbd09426f8a5374ab0", - "type": "github" - }, - "original": { - "owner": "horriblename", - "repo": "hyprgrass", - "type": "github" - } - }, - "hyprland": { - "inputs": { - "hyprland-protocols": "hyprland-protocols", - "nixpkgs": [ - "main", - "nixpkgs" - ], - "systems": "systems_3", - "wlroots": "wlroots", - "xdph": "xdph" - }, - "locked": { - "lastModified": 1703194032, - "narHash": "sha256-ynsyO+BacfysxWm3R9owGPZfsClLXWEXNEfqMD6mBic=", - "owner": "hyprwm", - "repo": "Hyprland", - "rev": "bd952dcef2ead3b0b7e2d730930a3fc528813ee0", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "Hyprland", - "type": "github" - } - }, - "hyprland-protocols": { - "inputs": { - "nixpkgs": [ - "main", - "hyprland", - "nixpkgs" - ], - "systems": [ - "main", - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1691753796, - "narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=", - "owner": "hyprwm", - "repo": "hyprland-protocols", - "rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-protocols", - "type": "github" - } - }, - "lib-aggregate": { - "inputs": { - "flake-utils": "flake-utils_4", - "nixpkgs-lib": "nixpkgs-lib_2" - }, - "locked": { - "lastModified": 1702814943, - "narHash": "sha256-tNKSDbtoEDfCTs30dyW0Fcj4KJpjzTRASL6f2BbuSKE=", - "owner": "nix-community", - "repo": "lib-aggregate", - "rev": "ac8b1c4cfb2f9111e709aaf503511df354e86733", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "lib-aggregate", - "type": "github" - } - }, - "main": { - "inputs": { - "ags": "ags", - "caddy-plugins": "caddy-plugins", - "coc-stylelintplus-flake": "coc-stylelintplus-flake", - "headscale": "headscale", - "home-manager": "home-manager", - "hyprgrass": "hyprgrass", - "hyprland": "hyprland", - "neovim-flake": "neovim-flake", - "nh": "nh", - "nix-gaming": "nix-gaming", - "nix-index-db": "nix-index-db", - "nix-melt": "nix-melt", - "nix-on-droid": "nix-on-droid", - "nixpkgs": "nixpkgs_4", - "nixpkgs-wayland": "nixpkgs-wayland", - "nur": "nur", - "nurl": "nurl", - "secrets": "secrets", - "tree-sitter-hypr-flake": "tree-sitter-hypr-flake" - }, - "locked": { - "lastModified": 0, - "narHash": "sha256-ktXgE7IE5MEk4ZkH4YW6G1QMz6gJoERCcVFP+ODg1BI=", - "path": "../../../", - "type": "path" - }, - "original": { - "path": "../../../", - "type": "path" - } - }, - "neovim-flake": { - "inputs": { - "flake-compat": "flake-compat", - "flake-parts": "flake-parts", - "hercules-ci-effects": "hercules-ci-effects", - "neovim-flake": "neovim-flake_2", - "nixpkgs": [ - "main", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1703117360, - "narHash": "sha256-hny5sw/gmO3Rl1I+8sCIgKY1hRLg/L68cVCZVndug24=", - "owner": "nix-community", - "repo": "neovim-nightly-overlay", - "rev": "5c08a5966b296b2f208a4050fbe22509d56ce669", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "neovim-nightly-overlay", - "type": "github" - } - }, - "neovim-flake_2": { - "inputs": { - "flake-utils": "flake-utils_3", - "nixpkgs": [ - "main", - "neovim-flake", - "nixpkgs" - ] - }, - "locked": { - "dir": "contrib", - "lastModified": 1703098322, - "narHash": "sha256-atHwBC/dzCWR7tc5B0mpmiKEkGNJhp39eteQlfzerTg=", - "owner": "neovim", - "repo": "neovim", - "rev": "0c120307ca1ab613e63865c634d7e10ad67fb0ba", - "type": "github" - }, - "original": { - "dir": "contrib", - "owner": "neovim", - "repo": "neovim", - "type": "github" - } - }, - "nh": { - "inputs": { - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1703024852, - "narHash": "sha256-mVJ/99zkqpqDDs68jYIVYyQH6NBgciKnUg8AfWyXSAM=", - "owner": "viperML", - "repo": "nh", - "rev": "37b0d469a328a5b5969eacdf137f1e6b86c75a1d", - "type": "github" - }, - "original": { - "owner": "viperML", - "repo": "nh", - "type": "github" - } - }, - "nix-eval-jobs": { - "inputs": { - "flake-parts": "flake-parts_4", - "nix-github-actions": "nix-github-actions", - "nixpkgs": "nixpkgs_5", - "treefmt-nix": "treefmt-nix" - }, - "locked": { - "lastModified": 1702815315, - "narHash": "sha256-LEpv7kvB7KPj/6BoNYWMcVjRezTJe6FNmg5kCKZQxMk=", - "owner": "nix-community", - "repo": "nix-eval-jobs", - "rev": "3c6e1234af3aa26fc60d0969619cf6806ec51639", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nix-eval-jobs", - "type": "github" - } - }, - "nix-formatter-pack": { - "inputs": { - "nixpkgs": [ - "main", - "nix-on-droid", - "nixpkgs" - ], - "nmd": "nmd", - "nmt": "nmt" - }, - "locked": { - "lastModified": 1666720474, - "narHash": "sha256-iWojjDS1D19zpeZXbBdjWb9MiKmVVFQCqtJmtTXgPx8=", - "owner": "Gerschtli", - "repo": "nix-formatter-pack", - "rev": "14876cc8fe94a3d329964ecb073b4c988c7b61f5", - "type": "github" - }, - "original": { - "owner": "Gerschtli", - "repo": "nix-formatter-pack", - "type": "github" - } - }, - "nix-gaming": { - "inputs": { - "flake-parts": "flake-parts_3", - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "lastModified": 1703121193, - "narHash": "sha256-ZxiqYr9+KSeRUpdXSY+kN4Jep4rKJSW85aakdGNapC0=", - "owner": "fufexan", - "repo": "nix-gaming", - "rev": "df28ff973371ca1f0b296adaadf0714af6f4f226", - "type": "github" - }, - "original": { - "owner": "fufexan", - "repo": "nix-gaming", - "type": "github" - } - }, - "nix-github-actions": { - "inputs": { - "nixpkgs": [ - "main", - "nixpkgs-wayland", - "nix-eval-jobs", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1701208414, - "narHash": "sha256-xrQ0FyhwTZK6BwKhahIkUVZhMNk21IEI1nUcWSONtpo=", - "owner": "nix-community", - "repo": "nix-github-actions", - "rev": "93e39cc1a087d65bcf7a132e75a650c44dd2b734", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nix-github-actions", - "type": "github" - } - }, - "nix-index-db": { - "inputs": { - "nixpkgs": [ - "main", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1702864432, - "narHash": "sha256-xR5Igg2hnm979W3YgMDrSjErHFhHo4rbMboF6DC0mbc=", - "owner": "Mic92", - "repo": "nix-index-database", - "rev": "4605ccd764fac78b9e4b5b058698cb9f04430b91", - "type": "github" - }, - "original": { - "owner": "Mic92", - "repo": "nix-index-database", - "type": "github" - } - }, - "nix-melt": { - "inputs": { - "nixpkgs": "nixpkgs_3" - }, - "locked": { - "lastModified": 1701883891, - "narHash": "sha256-Qc+jSg3PbeCsnf0yPw/9GU+ZcqXcX3C+V/jbfPDm1FQ=", - "owner": "nix-community", - "repo": "nix-melt", - "rev": "09ee04cd3737207797d1ff184b4ea2a91b1f22e2", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nix-melt", - "type": "github" - } - }, - "nix-on-droid": { - "inputs": { - "home-manager": [ - "main", - "home-manager" - ], - "nix-formatter-pack": "nix-formatter-pack", - "nixpkgs": [ - "main", - "nixpkgs" - ], - "nixpkgs-for-bootstrap": "nixpkgs-for-bootstrap", - "nmd": "nmd_2" - }, - "locked": { - "lastModified": 1694604941, - "narHash": "sha256-KsoRStRs8dNRRMWQhuB3eUOpzQhOc4dcBQB85tEq3wY=", - "owner": "t184256", - "repo": "nix-on-droid", - "rev": "039379abeee67144d4094d80bbdaf183fb2eabe5", - "type": "github" - }, - "original": { - "owner": "t184256", - "repo": "nix-on-droid", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1701263465, - "narHash": "sha256-lNXUIlkfyDyp9Ox21hr+wsEf/IBklLvb6bYcyeXbdRc=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "50aa30a13c4ab5e7ba282da460a3e3d44e9d0eb3", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-23.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-for-bootstrap": { - "locked": { - "lastModified": 1686921029, - "narHash": "sha256-J1bX9plPCFhTSh6E3TWn9XSxggBh/zDD4xigyaIQBy8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "c7ff1b9b95620ce8728c0d7bd501c458e6da9e04", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "c7ff1b9b95620ce8728c0d7bd501c458e6da9e04", - "type": "github" - } - }, - "nixpkgs-lib": { - "locked": { - "dir": "lib", - "lastModified": 1701253981, - "narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58", - "type": "github" - }, - "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib_2": { - "locked": { - "lastModified": 1702774034, - "narHash": "sha256-M0IsUA89EKHL8IDx9bf+e2W2l1kMRpaZ4h08navMXig=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "9b4f1493009b8d2f55a525a01de10addc9a0a752", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1702777222, - "narHash": "sha256-/SYmqgxTYzqZnQEfbOCHCN4GzqB9uAIsR9IWLzo0/8I=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a19a71d1ee93226fd71984359552affbc1cd3dc3", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "release-23.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-wayland": { - "inputs": { - "flake-compat": "flake-compat_2", - "lib-aggregate": "lib-aggregate", - "nix-eval-jobs": "nix-eval-jobs", - "nixpkgs": "nixpkgs_6" - }, - "locked": { - "lastModified": 1703193381, - "narHash": "sha256-ene7BogLot9jn/xTAP2W1hm8HxPAmW1j0LsSbsraTdI=", - "owner": "nix-community", - "repo": "nixpkgs-wayland", - "rev": "8e05204779246147cdcf501ac97e63ee19d6eba7", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs-wayland", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1702539185, - "narHash": "sha256-KnIRG5NMdLIpEkZTnN5zovNYc0hhXjAgv6pfd5Z4c7U=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "aa9d4729cbc99dabacb50e3994dcefb3ea0f7447", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1688590700, - "narHash": "sha256-ZF055rIUP89cVwiLpG5xkJzx00gEuuGFF60Bs/LM3wc=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "f292b4964cb71f9dfbbd30dc9f511d6165cd109b", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { - "locked": { - "lastModified": 1703013332, - "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_5": { - "locked": { - "lastModified": 1702539185, - "narHash": "sha256-KnIRG5NMdLIpEkZTnN5zovNYc0hhXjAgv6pfd5Z4c7U=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "aa9d4729cbc99dabacb50e3994dcefb3ea0f7447", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_6": { - "locked": { - "lastModified": 1703013332, - "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_7": { - "locked": { - "lastModified": 1689850295, - "narHash": "sha256-fUYf6WdQlhd2H+3aR8jST5dhFH1d0eE22aes8fNIfyk=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "5df4d78d54f7a34e9ea1f84a22b4fd9baebc68d0", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nmd": { - "flake": false, - "locked": { - "lastModified": 1666190571, - "narHash": "sha256-Z1hc7M9X6L+H83o9vOprijpzhTfOBjd0KmUTnpHAVjA=", - "owner": "rycee", - "repo": "nmd", - "rev": "b75d312b4f33bd3294cd8ae5c2ca8c6da2afc169", - "type": "gitlab" - }, - "original": { - "owner": "rycee", - "repo": "nmd", - "type": "gitlab" - } - }, - "nmd_2": { - "flake": false, - "locked": { - "lastModified": 1666190571, - "narHash": "sha256-Z1hc7M9X6L+H83o9vOprijpzhTfOBjd0KmUTnpHAVjA=", - "owner": "rycee", - "repo": "nmd", - "rev": "b75d312b4f33bd3294cd8ae5c2ca8c6da2afc169", - "type": "gitlab" - }, - "original": { - "owner": "rycee", - "repo": "nmd", - "type": "gitlab" - } - }, - "nmt": { - "flake": false, - "locked": { - "lastModified": 1648075362, - "narHash": "sha256-u36WgzoA84dMVsGXzml4wZ5ckGgfnvS0ryzo/3zn/Pc=", - "owner": "rycee", - "repo": "nmt", - "rev": "d83601002c99b78c89ea80e5e6ba21addcfe12ae", - "type": "gitlab" - }, - "original": { - "owner": "rycee", - "repo": "nmt", - "type": "gitlab" - } - }, - "nur": { - "locked": { - "lastModified": 1703187919, - "narHash": "sha256-r28tTx9xuc2h3tCA1zmotrLnJDffaFHMMSy5hDpkegU=", - "owner": "nix-community", - "repo": "NUR", - "rev": "aa77c3b4f6b8dba86c5e75269b1f6a123168d4df", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "NUR", - "type": "github" - } - }, - "nurl": { - "inputs": { - "nixpkgs": "nixpkgs_7" - }, - "locked": { - "lastModified": 1701273941, - "narHash": "sha256-MwDKOU2JZRHObIJLFbge+XS3ov54dAlDGtzWPtq7/PE=", - "owner": "nix-community", - "repo": "nurl", - "rev": "caf9e815a036eec02eac877798ebc9b379adc810", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nurl", - "type": "github" - } - }, - "root": { - "inputs": { - "main": "main" - } - }, - "secrets": { - "inputs": { - "nixpkgs": [ - "main", - "nixpkgs" - ], - "sops-nix": "sops-nix" - }, - "locked": { - "lastModified": 1703055130, - "narHash": "sha256-AjxzOG64PrQh22x92AKKnO+bMCRXYcPYU0b+Ua7DyTk=", - "ref": "refs/heads/main", - "rev": "fd2667712fd9c884e5404139f60bc436329ce4e5", - "revCount": 5, - "type": "git", - "url": "ssh://git@git.nelim.org/matt1432/nixos-secrets" - }, - "original": { - "type": "git", - "url": "ssh://git@git.nelim.org/matt1432/nixos-secrets" - } - }, - "sops-nix": { - "inputs": { - "nixpkgs": [ - "main", - "secrets", - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable" - }, - "locked": { - "lastModified": 1702937567, - "narHash": "sha256-bUNl3GPqRgTGp13+oV1DrYa1/NHuGHo5SKmr+RqC/2g=", - "owner": "Mic92", - "repo": "sops-nix", - "rev": "f7db64b88dabc95e4f7bee20455f418e7ab805d4", - "type": "github" - }, - "original": { - "owner": "Mic92", - "repo": "sops-nix", - "type": "github" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_3": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_4": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_5": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_6": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "tree-sitter-hypr-flake": { - "inputs": { - "flake-utils": "flake-utils_5", - "nixpkgs": [ - "main", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1700978179, - "narHash": "sha256-P3ZiIurixNdBqKJrsmFibmScnwD0pjhljLo4L8BLtws=", - "owner": "luckasRanarison", - "repo": "tree-sitter-hypr", - "rev": "da3c1d780c8e04446722ece04beadb6a44eb442d", - "type": "github" - }, - "original": { - "owner": "luckasRanarison", - "repo": "tree-sitter-hypr", - "type": "github" - } - }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "main", - "nixpkgs-wayland", - "nix-eval-jobs", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1702461037, - "narHash": "sha256-ssyGxfGHRuuLHuMex+vV6RMOt7nAo07nwufg9L5GkLg=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "d06b70e5163a903f19009c3f97770014787a080f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, - "wlroots": { - "flake": false, - "locked": { - "host": "gitlab.freedesktop.org", - "lastModified": 1701368958, - "narHash": "sha256-7kvyoA91etzVEl9mkA/EJfB6z/PltxX7Xc4gcr7/xlo=", - "owner": "wlroots", - "repo": "wlroots", - "rev": "5d639394f3e83b01596dcd166a44a9a1a2583350", - "type": "gitlab" - }, - "original": { - "host": "gitlab.freedesktop.org", - "owner": "wlroots", - "repo": "wlroots", - "rev": "5d639394f3e83b01596dcd166a44a9a1a2583350", - "type": "gitlab" - } - }, - "xdph": { - "inputs": { - "hyprland-protocols": [ - "main", - "hyprland", - "hyprland-protocols" - ], - "nixpkgs": [ - "main", - "hyprland", - "nixpkgs" - ], - "systems": [ - "main", - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1702334919, - "narHash": "sha256-ibOZ3TLjqndGMcj2f+07NFwDWoum4IbzF58byZuJJNg=", - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "rev": "f5c3576c3b6cb1c31a8dfa3e4113f59bfe40cd71", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/common/pkgs/discord-commits/flake.nix b/common/pkgs/discord-commits/flake.nix deleted file mode 100644 index 7372a02..0000000 --- a/common/pkgs/discord-commits/flake.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - inputs.main.url = "path:../../../"; - - outputs = { - self, - main, - ... - }: let - nixpkgs = main.inputs.nixpkgs; - supportedSystems = ["x86_64-linux"]; - - perSystem = attrs: - nixpkgs.lib.genAttrs supportedSystems (system: let - pkgs = nixpkgs.legacyPackages.${system}; - in - attrs system pkgs); - - in { - packages = perSystem (system: pkgs: { - discord-commits = pkgs.callPackage ./nix; - default = self.packages.${system}.discord-commits; - }); - - formatter = perSystem (_: pkgs: pkgs.alejandra); - - devShells = perSystem (_: pkgs: { - default = pkgs.mkShell { - packages = with pkgs; [ - alejandra - git - nodejs_20 - typescript - ]; - }; - }); - }; -}