refactor: add flake module for pkgs/

This commit is contained in:
Felix Schröter 2024-01-30 19:40:49 +01:00
parent c927181aa9
commit 99daa25dee
Signed by: felschr
GPG key ID: 671E39E6744C807D
3 changed files with 13 additions and 14 deletions

View file

@ -82,7 +82,7 @@ rec {
outputs = { self, nixpkgs, nixpkgs-unstable, ... }@inputs: outputs = { self, nixpkgs, nixpkgs-unstable, ... }@inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } { inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" "aarch64-linux" ]; systems = [ "x86_64-linux" "aarch64-linux" ];
imports = [ ./lib ./overlays.nix ]; imports = [ ./pkgs/flake-module.nix ./lib ./overlays.nix ];
flake = { flake = {
inherit nixConfig; inherit nixConfig;
@ -195,13 +195,6 @@ rec {
config.allowUnfree = true; config.allowUnfree = true;
}; };
packages = import ./pkgs { inherit pkgs; };
apps = {
deconz =
inputs.flake-utils.lib.mkApp { drv = config.packages.deconz; };
};
devShells.default = devShells.default =
pkgs.mkShell { inherit (config.checks.pre-commit) shellHook; }; pkgs.mkShell { inherit (config.checks.pre-commit) shellHook; };

View file

@ -1,6 +0,0 @@
{ pkgs, ... }:
{
brlaser = pkgs.callPackage ./brlaser { };
deconz = pkgs.qt5.callPackage ./deconz { };
}

12
pkgs/flake-module.nix Normal file
View file

@ -0,0 +1,12 @@
_: {
perSystem = { inputs, self', pkgs, ... }: {
packages = {
brlaser = pkgs.callPackage ./brlaser { };
deconz = pkgs.qt5.callPackage ./deconz { };
};
apps = {
deconz = inputs.flake-utils.lib.mkApp { drv = self'.packages.deconz; };
};
};
}