diff options
author | sefidel <contact@sefidel.net> | 2024-02-20 05:48:01 +0900 |
---|---|---|
committer | sefidel <contact@sefidel.net> | 2024-02-20 06:09:18 +0900 |
commit | 7fe334c0f881b27db617aedaf233f6ae58d72278 (patch) | |
tree | 948c5e2f1493c6e7090da39174d2699a81d7a624 /flake.nix | |
download | nixpkgs-exotic-7fe334c0f881b27db617aedaf233f6ae58d72278.tar.gz nixpkgs-exotic-7fe334c0f881b27db617aedaf233f6ae58d72278.zip |
project: Initial commit
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 39 |
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; + }; + }; + }; +} |