aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2024-02-20 05:48:01 +0900
committersefidel <contact@sefidel.net>2024-08-06 16:41:23 +0900
commitfecda1751806039ea47fba56fd2a3bd9cf11e8b5 (patch)
treedc11dd4fd0b29a78de73c4258b97a2a88b80dc47 /flake.nix
downloadnixpkgs-exotic-fecda1751806039ea47fba56fd2a3bd9cf11e8b5.zip
project: Initial commit
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..f025190
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,39 @@
+{
+ description = "Custom shared packages that doesn't fit in the upstream nixpkgs";
+
+ inputs.nixpkgs.url = "github:NixOS/nixpkgs";
+ inputs.flake-parts.url = "github:hercules-ci/flake-parts";
+ inputs.flake-compat.url = "github:edolstra/flake-compat";
+ inputs.flake-compat.flake = false;
+
+ outputs = { self, flake-parts, ... } @ inputs:
+ flake-parts.lib.mkFlake { inherit inputs; } {
+ systems = [ "aarch64-darwin" "aarch64-linux" "x86_64-darwin" "x86_64-linux" ];
+
+ perSystem = { lib, system, ... }:
+ let
+ pkgs = import inputs.nixpkgs { inherit system; };
+
+ pkgsFor = pkgs: overlays:
+ import pkgs {
+ inherit system overlays;
+ };
+ exoticPkgs = (pkgsFor inputs.nixpkgs [ self.overlays.default ]).exoticPackages;
+ in
+ {
+ _module.args.pkgs = pkgs;
+
+ packages = exoticPkgs;
+ };
+
+ flake = {
+ overlays.default = final: prev: {
+ exoticPackages = import ./pkgs { pkgs = prev; };
+ };
+
+ hydraJobs = {
+ inherit (self) packages;
+ };
+ };
+ };
+}