mirror of
https://github.com/nix-community/home-manager.git
synced 2024-12-15 17:50:53 +00:00
11 lines
381 B
Nix
11 lines
381 B
Nix
{ lib }:
|
|
|
|
rec {
|
|
# Produces a Bourne shell like variable export statement.
|
|
export = n: v: ''export ${n}="${toString v}"'';
|
|
|
|
# Given an attribute set containing shell variable names and their
|
|
# assignment, this function produces a string containing an export
|
|
# statement for each set entry.
|
|
exportAll = vars: lib.concatStringsSep "\n" (lib.mapAttrsToList export vars);
|
|
}
|