Hi. This is a follow-up to my previous letter about Private NixOS modules.

Another thing I am missing is the ability to pass arguments to
'required' configuration modules. Below is the illustration of the
idea. Could you please give me some advice on this?

Regards,
Sergey


// configuration.nix

{config, pkgs, ...}:
let
  proxy_port = "4343";
  proxy_host = "myproxy.local";
in
{
  require = [
    /etc/nixos/hardware-configuration.nix
    ..
    (withArguments ./include/global_bash_aliases.nix { inherit
proxy_port  proxy_host; })
    ..
  ];
 ...

}


//./include/global_bash_aliases.nix

{ proxy_port, proxy_host} :
{ config, pkgs, ... } :
{
  environment = rec {

    extraInit = ''
       alias goproxy "nc ${proxy_port} ${proxy_host}
    '';
  };

}
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to