Skip to content

Instantly share code, notes, and snippets.

@cleverca22 cleverca22/configuration.nix Secret
Last active Feb 26, 2018

Embed
What would you like to do?
environment variables
# nixos-rebuild build-vm -I nixos-config=./configuration.nix -Q -j8
{ ... }:
{
environment.variables.A = "1";
programs.bash.shellInit = "export B=2";
environment.extraInit = "export C=3";
environment.shellInit = "export D=4";
environment.loginShellInit = "export E=5";
environment.interactiveShellInit = "export F=6";
services.xserver = {
displayManager.lightdm.enable = true;
#windowManager.i3.enable = true;
#windowManager.default = "i3";
#desktopManager.default = "none";
desktopManager.xterm.enable = true;
enable = true;
};
services.nixosManual.enable = false;
users.users.root.password = "root";
users.users.clever = {
isNormalUser = true;
initialPassword = "clever";
};
}
export F=6
. /nix/store/x13swbpz573bgk0b5lfiddhk3w6ipns7-set-environment
export D=4
export B=2
export E=5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.