mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixos/environment.paths: remove with lib;
This commit is contained in:
parent
21d7a61b1a
commit
d666633846
1 changed files with 16 additions and 20 deletions
|
@ -1,13 +1,9 @@
|
||||||
# This module defines the packages that appear in
|
# This module defines the packages that appear in
|
||||||
# /run/current-system/sw.
|
# /run/current-system/sw.
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
requiredPackages = map (pkg: setPrio ((pkg.meta.priority or lib.meta.defaultPriority) + 3) pkg)
|
requiredPackages = map (pkg: lib.setPrio ((pkg.meta.priority or lib.meta.defaultPriority) + 3) pkg)
|
||||||
[ pkgs.acl
|
[ pkgs.acl
|
||||||
pkgs.attr
|
pkgs.attr
|
||||||
pkgs.bashInteractive # bash with ncurses support
|
pkgs.bashInteractive # bash with ncurses support
|
||||||
|
@ -48,9 +44,9 @@ let
|
||||||
];
|
];
|
||||||
defaultPackages =
|
defaultPackages =
|
||||||
map
|
map
|
||||||
(n: let pkg = pkgs.${n}; in setPrio ((pkg.meta.priority or lib.meta.defaultPriority) + 3) pkg)
|
(n: let pkg = pkgs.${n};in lib.setPrio ((pkg.meta.priority or lib.meta.defaultPriority) + 3) pkg)
|
||||||
defaultPackageNames;
|
defaultPackageNames;
|
||||||
defaultPackagesText = "[ ${concatMapStringsSep " " (n: "pkgs.${n}") defaultPackageNames } ]";
|
defaultPackagesText = "[ ${lib.concatMapStringsSep " " (n: "pkgs.${n}") defaultPackageNames } ]";
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
|
@ -59,10 +55,10 @@ in
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
|
|
||||||
systemPackages = mkOption {
|
systemPackages = lib.mkOption {
|
||||||
type = types.listOf types.package;
|
type = lib.types.listOf lib.types.package;
|
||||||
default = [];
|
default = [];
|
||||||
example = literalExpression "[ pkgs.firefox pkgs.thunderbird ]";
|
example = lib.literalExpression "[ pkgs.firefox pkgs.thunderbird ]";
|
||||||
description = ''
|
description = ''
|
||||||
The set of packages that appear in
|
The set of packages that appear in
|
||||||
/run/current-system/sw. These packages are
|
/run/current-system/sw. These packages are
|
||||||
|
@ -74,10 +70,10 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
defaultPackages = mkOption {
|
defaultPackages = lib.mkOption {
|
||||||
type = types.listOf types.package;
|
type = lib.types.listOf lib.types.package;
|
||||||
default = defaultPackages;
|
default = defaultPackages;
|
||||||
defaultText = literalMD ''
|
defaultText = lib.literalMD ''
|
||||||
these packages, with their `meta.priority` numerically increased
|
these packages, with their `meta.priority` numerically increased
|
||||||
(thus lowering their installation priority):
|
(thus lowering their installation priority):
|
||||||
|
|
||||||
|
@ -97,8 +93,8 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
pathsToLink = mkOption {
|
pathsToLink = lib.mkOption {
|
||||||
type = types.listOf types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
# Note: We need `/lib' to be among `pathsToLink' for NSS modules
|
# Note: We need `/lib' to be among `pathsToLink' for NSS modules
|
||||||
# to work.
|
# to work.
|
||||||
default = [];
|
default = [];
|
||||||
|
@ -106,8 +102,8 @@ in
|
||||||
description = "List of directories to be symlinked in {file}`/run/current-system/sw`.";
|
description = "List of directories to be symlinked in {file}`/run/current-system/sw`.";
|
||||||
};
|
};
|
||||||
|
|
||||||
extraOutputsToInstall = mkOption {
|
extraOutputsToInstall = lib.mkOption {
|
||||||
type = types.listOf types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
example = [ "dev" "info" ];
|
example = [ "dev" "info" ];
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -119,8 +115,8 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
extraSetup = mkOption {
|
extraSetup = lib.mkOption {
|
||||||
type = types.lines;
|
type = lib.types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
description = "Shell fragments to be run after the system environment has been created. This should only be used for things that need to modify the internals of the environment, e.g. generating MIME caches. The environment being built can be accessed at $out.";
|
description = "Shell fragments to be run after the system environment has been created. This should only be used for things that need to modify the internals of the environment, e.g. generating MIME caches. The environment being built can be accessed at $out.";
|
||||||
};
|
};
|
||||||
|
@ -129,7 +125,7 @@ in
|
||||||
|
|
||||||
system = {
|
system = {
|
||||||
|
|
||||||
path = mkOption {
|
path = lib.mkOption {
|
||||||
internal = true;
|
internal = true;
|
||||||
description = ''
|
description = ''
|
||||||
The packages you want in the boot environment.
|
The packages you want in the boot environment.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue