summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/dependabot.yml8
-rw-r--r--README.md26
-rw-r--r--flake.nix72
-rw-r--r--garnix.yaml5
-rw-r--r--lib/default.nix4
-rw-r--r--pkgs/_theseus.nix (renamed from pkgs/theseus.nix)0
-rw-r--r--pkgs/default.nix18
-rw-r--r--pkgs/discord-canary.nix1
-rw-r--r--pkgs/discord.nix1
9 files changed, 89 insertions, 46 deletions
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..1d662ce
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,8 @@
+version: 2
+updates:
+ - package-ecosystem: "github-actions" # See documentation for possible values
+ directory: "/" # Location of package manifests
+ schedule:
+ interval: "weekly"
+ commit-message:
+ prefix: "actions"
diff --git a/README.md b/README.md
index ab42e63..6d04d43 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,30 @@
# nix-exprs
-[![hercules-ci build status](https://img.shields.io/badge/dynamic/json?label=hercules-ci%20builds&query=%24.state&url=https%3A%2F%2Fapi.github.com%2Frepos%2Fgetchoo%2Fnix-exprs%2Fcommits%2Fmain%2Fstatus&color=8f97cb&style=flat-square&logo=github)](https://hercules-ci.com/github/getchoo/nix-exprs)
+[![built with garnix](https://img.shields.io/badge/Built_with-Garnix-blue?style=flat-square&logo=nixos&link=https%3A%2F%2Fgarnix.io)](https://garnix.io)
## how to use
-### enable cachix
+### enable binary cache
-i have a binary cache at <https://getchoo.cachix.org>, make sure to enable it
-in your flake or nixos/darwin config or use `nix run nixpkgs#cachix use getchoo`
-for cli support.
+all packages are built with [garnix](https://garnix.io/), and cached on their servers. you can use this
+yourself by following the instructions [here](https://garnix.io/docs/caching). i would also recommend
+[donating](https://opencollective.com/garnix_io) if you can!
+
+example:
+
+```nix
+{
+ nix.settings = {
+ trusted-substituters = [
+ "https://cache.garnix.io"
+ ];
+
+ trusted-public-keys = [
+ "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
+ ];
+ }
+}
+```
### library
diff --git a/flake.nix b/flake.nix
index 0a58a08..b76910f 100644
--- a/flake.nix
+++ b/flake.nix
@@ -2,8 +2,12 @@
description = "getchoo's nix expressions";
nixConfig = {
- extra-substituters = ["https://nix-community.cachix.org"];
- extra-trusted-public-keys = ["nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="];
+ extra-substituters = [
+ "https://cache.garnix.io"
+ ];
+ extra-trusted-public-keys = [
+ "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
+ ];
};
inputs = {
@@ -27,26 +31,18 @@
];
forAllSystems = nixpkgs.lib.genAttrs systems;
- nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;});
- forEachSystem = fn: forAllSystems (s: fn nixpkgsFor.${s});
-
- packageSet = pkgs:
- with pkgs; {
- cartridges = callPackage ./pkgs/cartridges.nix {};
- huion = callPackage ./pkgs/huion.nix {};
- mommy = callPackage ./pkgs/mommy.nix {};
- # broken due to upstrea adopting pnpm
- # theseus = callPackage ./pkgs/theseus.nix {};
- treefetch = callPackage ./pkgs/treefetch.nix {};
- swhkd = callPackage ./pkgs/swhkd {};
- vim-just = callPackage ./pkgs/vim-just.nix {};
- xwaylandvideobridge = callPackage ./pkgs/xwaylandvideobridge.nix {};
- };
+ nixpkgsFor = forAllSystems (system:
+ import nixpkgs {
+ inherit system;
+ overlays = [self.overlays.default];
+ });
- overrides = prev: {
- discord = import ./pkgs/discord.nix prev;
- discord-canary = import ./pkgs/discord-canary.nix prev;
- };
+ forEachSystem = fn:
+ forAllSystems (system:
+ fn {
+ inherit system;
+ pkgs = nixpkgsFor.${system};
+ });
in {
flakeModules = {
default = import ./modules/flake;
@@ -54,36 +50,38 @@
hydraJobs = import ./modules/flake/hydraJobs.nix;
};
- formatter = forEachSystem (pkgs: pkgs.alejandra);
+ formatter = forEachSystem ({pkgs, ...}: pkgs.alejandra);
- herculesCI = let
+ checks = let
ciSystems = [
"x86_64-linux"
"aarch64-linux"
];
- lib = self.lib {inherit (self) inputs;};
- inherit (lib.ci ciSystems) mkCompatiblePkgs;
- in {
- inherit ciSystems;
-
- onPush.default = {
- outputs = {
- packages = mkCompatiblePkgs self.packages;
- };
- };
- };
+ pkgs = (self.lib.ci ciSystems).mkCompatiblePkgs self.packages;
+ in
+ nixpkgs.lib.genAttrs ciSystems (sys: pkgs.${sys});
packages = forEachSystem (
- pkgs: let
- p = packageSet pkgs;
+ {pkgs, ...}: let
+ inherit (builtins) attrNames filter listToAttrs map readDir substring;
+ inherit (nixpkgs.lib) removeSuffix;
+
+ pkgNames = filter (p: substring 0 1 p != "_") (attrNames (readDir ./pkgs));
+ pkgs' = map (removeSuffix ".nix") pkgNames;
+
+ p = listToAttrs (map (name: {
+ inherit name;
+ value = pkgs.${name};
+ })
+ pkgs');
in
p // {default = p.treefetch;}
);
lib = import ./lib nixpkgs.lib;
- overlays.default = final: prev: packageSet final // overrides prev;
+ overlays.default = import ./pkgs;
templates = let
# string -> string -> {}
diff --git a/garnix.yaml b/garnix.yaml
new file mode 100644
index 0000000..92f2c79
--- /dev/null
+++ b/garnix.yaml
@@ -0,0 +1,5 @@
+builds:
+ exclude: []
+ include:
+ - "checks.x86_64-linux.*"
+ - "checks.aarch64-linux.*"
diff --git a/lib/default.nix b/lib/default.nix
index ccdb0bf..10ac688 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -1,4 +1,4 @@
-lib: {inputs, ...}: {
+lib: {
ci = import ./ci.nix lib;
- configs = import ./configs.nix inputs;
+ configs = import ./configs.nix;
}
diff --git a/pkgs/theseus.nix b/pkgs/_theseus.nix
index c458896..c458896 100644
--- a/pkgs/theseus.nix
+++ b/pkgs/_theseus.nix
diff --git a/pkgs/default.nix b/pkgs/default.nix
new file mode 100644
index 0000000..d245bec
--- /dev/null
+++ b/pkgs/default.nix
@@ -0,0 +1,18 @@
+final: prev: let
+ inherit (final) callPackage;
+in {
+ # original packages
+ cartridges = callPackage ./cartridges.nix {};
+ huion = callPackage ./huion.nix {};
+ mommy = callPackage ./mommy.nix {};
+ ## broken due to upstream adopting pnpm
+ ## theseus = callPackage ./theseus.nix {};
+ treefetch = callPackage ./treefetch.nix {};
+ swhkd = callPackage ./swhkd {};
+ vim-just = callPackage ./vim-just.nix {};
+ xwaylandvideobridge = callPackage ./xwaylandvideobridge.nix {};
+
+ # modified packages
+ discord = prev.discord.override {withOpenASAR = true;};
+ discord-canary = prev.discord-canary.override {withOpenASAR = true;};
+}
diff --git a/pkgs/discord-canary.nix b/pkgs/discord-canary.nix
deleted file mode 100644
index 6cb9d27..0000000
--- a/pkgs/discord-canary.nix
+++ /dev/null
@@ -1 +0,0 @@
-prev: prev.discord-canary.override {withOpenASAR = true;}
diff --git a/pkgs/discord.nix b/pkgs/discord.nix
deleted file mode 100644
index 3cfa01d..0000000
--- a/pkgs/discord.nix
+++ /dev/null
@@ -1 +0,0 @@
-prev: prev.discord.override {withOpenASAR = true;}