Skip to content

Commit

Permalink
Pass through channels
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjm committed Sep 19, 2024
1 parent f8fd6c6 commit e83dae2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 16 deletions.
32 changes: 20 additions & 12 deletions modules/base.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,50 @@ with lib;

{
options = {
pkgs = lib.mkOption {
type = lib.types.attrs;
pkgs = mkOption {
type = types.attrs;
default = pkgs;
};

pkgsMaster = lib.mkOption {
type = lib.types.attrs;
pkgsMaster = mkOption {
type = types.attrs;
default = pkgs;
};

builtExporters = lib.mkOption {
builtExporters = mkOption {
type = types.attrsOf types.package;
default = {};
};

builtKernels = lib.mkOption {
builtKernels = mkOption {
type = types.attrsOf types.package;
default = {};
};

builtShells = lib.mkOption {
builtShells = mkOption {
type = types.attrsOf types.package;
default = {};
};

packages = lib.mkOption {
type = lib.types.listOf lib.types.package;
packages = mkOption {
type = types.listOf types.package;
default = [];
example = lib.literalExpression "[ pkgs.firefox pkgs.thunderbird ]";
example = literalExpression "[ pkgs.firefox pkgs.thunderbird ]";
description = ''
The set of packages that are symlinked into the environment.
'';
};

labeledPackages = lib.mkOption {
type = lib.types.listOf (types.submodule {
channels = mkOption {
type = types.attrs;
default = {};
description = ''
Channels, passed through to UI metadata.
'';
};

labeledPackages = mkOption {
type = types.listOf (types.submodule {
options = {
channel = mkOption rec {
type = types.str;
Expand Down
7 changes: 3 additions & 4 deletions nix/makeEnvironment.nix
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,9 @@ symlinkJoin {
uiMetadata = callPackage ./uiMetadata.nix {};
in
{
# channels = lib.mapAttrsToList (name: channel: channel // {
# name = name;
# }) channels;
channels = [];
channels = lib.mapAttrsToList (name: channel: channel // {
name = name;
}) evaluated.config.channels;

kernels = map uiMetadata.mkKernelUiMetadata (attrValues builtKernels);

Expand Down

0 comments on commit e83dae2

Please sign in to comment.