1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-06 08:47:00 +00:00
nix-darwin/modules/environment.nix

46 lines
1.1 KiB
Nix
Raw Normal View History

2016-10-19 20:03:17 +02:00
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.environment;
in {
options = {
environment.systemPackages = mkOption {
type = types.listOf types.package;
default = [];
example = literalExample "[ pkgs.nix-repl pkgs.vim ]";
description = ''
The set of packages that appear in
/run/current-system/sw. These packages are
automatically available to all users, and are
automatically updated every time you rebuild the system
configuration. (The latter is the main difference with
installing them in the default profile,
<filename>/nix/var/nix/profiles/default</filename>.
'';
};
environment.extraOutputsToInstall = mkOption {
type = types.listOf types.str;
default = [ ];
example = [ "doc" "info" "devdoc" ];
description = "List of additional package outputs to be symlinked into <filename>/run/current-system/sw</filename>.";
};
};
config = {
system.path = pkgs.buildEnv {
name = "system-path";
paths = cfg.systemPackages;
inherit (cfg) extraOutputsToInstall;
};
};
}