home-manager/modules/misc/pam.nix
Robert Helgesson 5fbbbd1ea4
pam: add module
Also make it possible to set session variables using PAM rather than
Bash.
2017-01-16 23:54:45 +01:00

21 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";
};
}