From 981060cf79e468da091b7bb359d19e514fa23ab1 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Fri, 30 Oct 2026 14:26:34 +0100 Subject: treewide: Align files with the same files in the `nixos-server` repo This facilitates overlaying the two repos over each other. --- pkgs/default.nix | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) (limited to 'pkgs') diff --git a/pkgs/default.nix b/pkgs/default.nix index 9a3ac842..4fdb94fe 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,25 +1,21 @@ -# nixos-config - My current NixOS configuration -# -# Copyright (C) 2025 Benedikt Peetz -# SPDX-License-Identifier: GPL-3.0-or-later -# -# This file is part of my nixos-config. -# -# You should have received a copy of the License along with this program. -# If not, see . { - pkgs, - libraries, + unstable_pkgs, + stable_pkgs, + extra_lib, }: let - inherit (pkgs) lib; + inherit (unstable_pkgs) lib; - callPackage = lib.callPackageWith (libraries.extra.warnMerge pkgs myPkgs "the ./pkgs/by-name set"); + mergePkgs = pkgs: lib.callPackageWith (extra_lib.warnMerge pkgs in_tree_pkgs "the ./pkgs/by-name set"); + callPackageStable = lib.callPackageWith (mergePkgs stable_pkgs); + callPackageUnstable = lib.callPackageWith (mergePkgs unstable_pkgs); - myPkgs = libraries.extra.mkByName { + in_tree_pkgs = extra_lib.mkByName { baseDirectory = ./by-name; fileName = "package.nix"; - finalizeFunction = name: value: callPackage value {}; + finalizeFunction = name: value: + if value.stable + then callPackageStable value.pkg {} + else callPackageUnstable value.pkg {}; }; in - # TODO: Filter the sources of every package in the shards <2024-05-25> - myPkgs + in_tree_pkgs -- cgit v1.3.1