Add support for environment.systemPackages.
This commit is contained in:
parent
c02d43aa97
commit
d5f138f939
5 changed files with 115 additions and 39 deletions
|
|
@ -6,6 +6,7 @@
|
|||
}:
|
||||
{
|
||||
imports = [
|
||||
./environment.nix
|
||||
./etc.nix
|
||||
./systemd.nix
|
||||
./upstream/nixpkgs
|
||||
|
|
@ -16,7 +17,6 @@
|
|||
inherit (lib) types;
|
||||
in
|
||||
{
|
||||
|
||||
nixpkgs = {
|
||||
# TODO: switch to lib.systems.parsedPlatform
|
||||
hostPlatform = lib.mkOption {
|
||||
|
|
|
|||
17
nix/modules/environment.nix
Normal file
17
nix/modules/environment.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.environment = {
|
||||
systemPackages = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.package;
|
||||
default = [ ];
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
environment.etc."profile.d/system-manager-path.sh".source =
|
||||
pkgs.writeShellScript "system-manager-path.sh" ''
|
||||
export PATH=${lib.makeBinPath config.environment.systemPackages}:''${PATH}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue