🐛 fixed handling of unfree packages in flake

Signed-off-by: Xaiya Schumin <d.schumin@proton.me>
This commit is contained in:
Xaiya Schumin
2026-05-20 11:31:33 +02:00
parent f0ade0d043
commit ea44ab432f
+19 -26
View File
@@ -1,37 +1,30 @@
{ {
description = "Xaiya's packaged packages"; description = "Xaiya's packaged packages";
inputs = { inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
outputs = outputs =
{ self, nixpkgs }: { self, nixpkgs }:
let let
inherit (nixpkgs) lib; systems = nixpkgs.lib.systems.flakeExposed;
eachSystem = forAllSystems =
systems: fn: function:
lib.foldl' ( nixpkgs.lib.genAttrs systems (
acc: system: lib.recursiveUpdate acc (lib.mapAttrs (_: value: { ${system} = value; }) (fn system)) system: function (
) { } systems; import nixpkgs {
inherit system;
config.allowUnfree = true;
}
)
);
in {
packages = forAllSystems (pkgs: {
discord-music-presence = pkgs.callPackage ./pkgs/discord-music-presence.nix { };
});
systems = lib.systems.flakeExposed; devShells = forAllSystems (pkgs: {
in
eachSystem systems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
# TODO: add logic for packages
packages = {
discord-music-presence = pkgs.callPackage ./pkgs/discord-music-presence.nix { };
};
devShells = {
default = pkgs.callPackage ./shell.nix { }; default = pkgs.callPackage ./shell.nix { };
}; });
} };
);
} }