🐛 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";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
outputs =
{ self, nixpkgs }:
let
inherit (nixpkgs) lib;
systems = nixpkgs.lib.systems.flakeExposed;
eachSystem =
systems: fn:
lib.foldl' (
acc: system: lib.recursiveUpdate acc (lib.mapAttrs (_: value: { ${system} = value; }) (fn system))
) { } systems;
forAllSystems =
function:
nixpkgs.lib.genAttrs systems (
system: function (
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;
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 = {
devShells = forAllSystems (pkgs: {
default = pkgs.callPackage ./shell.nix { };
};
}
);
});
};
}