mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-30 23:34:12 +03:00
nixos/environment: accept path for variables and sessionVariables
This commit is contained in:
parent
ce89321950
commit
579f230b0a
@ -42,8 +42,8 @@ in
|
|||||||
strings. The latter is concatenated, interspersed with colon
|
strings. The latter is concatenated, interspersed with colon
|
||||||
characters.
|
characters.
|
||||||
'';
|
'';
|
||||||
type = with types; attrsOf (either str (listOf str));
|
type = with types; attrsOf (oneOf [ str path (listOf str) ]);
|
||||||
apply = mapAttrs (n: v: if isList v then concatStringsSep ":" v else v);
|
apply = mapAttrs (n: v: if isList v then concatStringsSep ":" v else "${v}");
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.profiles = mkOption {
|
environment.profiles = mkOption {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# This module defines a system-wide environment that will be
|
# This module defines a system-wide environment that will be
|
||||||
# initialised by pam_env (that is, not only in shells).
|
# initialised by pam_env (that is, not only in shells).
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, options, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
@ -32,8 +32,7 @@ in
|
|||||||
therefore not possible to use PAM style variables such as
|
therefore not possible to use PAM style variables such as
|
||||||
`@{HOME}`.
|
`@{HOME}`.
|
||||||
'';
|
'';
|
||||||
type = with types; attrsOf (either str (listOf str));
|
inherit (options.environment.variables) type apply;
|
||||||
apply = mapAttrs (n: v: if isList v then concatStringsSep ":" v else v);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.profileRelativeSessionVariables = mkOption {
|
environment.profileRelativeSessionVariables = mkOption {
|
||||||
|
Loading…
Reference in New Issue
Block a user