mirror of
https://github.com/NotAShelf/nyxexprs.git
synced 2025-10-02 15:03:34 +00:00
nix: re-export personal packages in flake outputs
This commit is contained in:
parent
309c11400b
commit
665c979a1e
2 changed files with 65 additions and 9 deletions
BIN
flake.lock
generated
BIN
flake.lock
generated
Binary file not shown.
74
flake.nix
74
flake.nix
|
@ -1,15 +1,43 @@
|
|||
{
|
||||
description = "A personal package overlay";
|
||||
# «https://github.com/notashelf/nyxexprs»
|
||||
description = "Personal package overlay for commonly used derivations";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
systems.url = "github:nix-systems/default-linux";
|
||||
flake-parts = {
|
||||
url = "github:hercules-ci/flake-parts";
|
||||
inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
flake-compat = {
|
||||
url = "github:edolstra/flake-compat";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# Rest of my packages will be constructed from previous flakes
|
||||
watt = {
|
||||
url = "github:NotAShelf/watt";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
flint = {
|
||||
url = "github:NotAShelf/flint";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
inquisitor = {
|
||||
url = "github:NotAShelf/inquisitor";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
wiremix = {
|
||||
url = "github:tsowell/wiremix";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
systems.follows = "systems";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
|
@ -24,12 +52,13 @@
|
|||
|
||||
perSystem = {
|
||||
system,
|
||||
inputs',
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (builtins) concatStringsSep match;
|
||||
inherit (builtins) concatStringsSep match listToAttrs;
|
||||
inherit (lib.attrsets) recursiveUpdate;
|
||||
inherit (lib.filesystem) packagesFromDirectoryRecursive;
|
||||
inherit (lib.customisation) callPackageWith;
|
||||
|
@ -43,18 +72,45 @@
|
|||
};
|
||||
|
||||
overlayAttrs = config.packages;
|
||||
packages = packagesFromDirectoryRecursive {
|
||||
callPackage = callPackageWith (recursiveUpdate pkgs {inherit pins date;});
|
||||
directory = ./pkgs;
|
||||
};
|
||||
packages = let
|
||||
base = packagesFromDirectoryRecursive {
|
||||
callPackage = callPackageWith (recursiveUpdate pkgs {inherit pins date;});
|
||||
directory = ./pkgs;
|
||||
};
|
||||
|
||||
# Borrowed diniamo/niqspkgs, with love <3
|
||||
# (and without useless pipe operators)
|
||||
fromInputs = [
|
||||
# My packages
|
||||
"watt"
|
||||
"flint"
|
||||
"inquisitor"
|
||||
|
||||
# 3rd party packages
|
||||
"wiremix"
|
||||
];
|
||||
|
||||
mappedPkgs = listToAttrs (map (input: {
|
||||
name = input;
|
||||
value = inputs'.${input}.packages.default;
|
||||
})
|
||||
fromInputs);
|
||||
in
|
||||
base // mappedPkgs;
|
||||
|
||||
formatter = config.packages.alejandra-custom;
|
||||
devShells = {
|
||||
default = self.devShells.${system}.npins;
|
||||
npins = pkgs.mkShellNoCC {
|
||||
default = pkgs.mkShellNoCC {
|
||||
name = "nyxexprs";
|
||||
packages = [pkgs.npins];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# This is so that you don't have to compile Alejandra.
|
||||
nixConfig = {
|
||||
extra-substituters = ["https://nyx.cachix.org"];
|
||||
extra-trusted-public-keys = ["nyx.cachix.org-1:xH6G0MO9PrpeGe7mHBtj1WbNzmnXr7jId2mCiq6hipE"];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue