diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-10-30 14:26:34 +0100 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-10-30 14:26:34 +0100 |
| commit | 981060cf79e468da091b7bb359d19e514fa23ab1 (patch) | |
| tree | b900fec93ee6524e49c12f52c5003b128fbb10e6 /pkgs | |
| parent | notes/deploy: Add a very basic version of a deploy guide (diff) | |
| download | nixos-config-981060cf79e468da091b7bb359d19e514fa23ab1.zip | |
treewide: Align files with the same files in the `nixos-server` repo
This facilitates overlaying the two repos over each other.
Diffstat (limited to 'pkgs')
| -rw-r--r-- | pkgs/default.nix | 30 |
1 files changed, 13 insertions, 17 deletions
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 <benedikt.peetz@b-peetz.de> -# 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 <https://www.gnu.org/licenses/gpl-3.0.txt>. { - 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 |
