mirror of
https://github.com/nix-community/home-manager
synced 2024-11-16 16:19:44 +01:00
5fbbbd1ea4
Also make it possible to set session variables using PAM rather than Bash.
20 lines
323 B
Nix
20 lines
323 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
homeCfg = config.home;
|
|
|
|
in
|
|
|
|
{
|
|
options = {};
|
|
|
|
config = mkIf (homeCfg.sessionVariableSetter == "pam") {
|
|
home.file.".pam_environment".text =
|
|
concatStringsSep "\n" (
|
|
mapAttrsToList (n: v: "${n} OVERRIDE=${v}") homeCfg.sessionVariables
|
|
) + "\n";
|
|
};
|
|
}
|