From 8c19dd84bb502129ee5364f542d7df7a763e9b0a Mon Sep 17 00:00:00 2001 From: Matei Adriel Date: Fri, 10 Apr 2020 16:51:16 +0300 Subject: [PATCH] feat: set up env variables --- modules/applications/default.nix | 2 +- modules/applications/sessionVariables.nix | 7 ------- modules/applications/shells/default.nix | 4 ++++ modules/applications/shells/sessionVariables.nix | 13 +++++++++++++ 4 files changed, 18 insertions(+), 8 deletions(-) delete mode 100644 modules/applications/sessionVariables.nix create mode 100644 modules/applications/shells/default.nix create mode 100644 modules/applications/shells/sessionVariables.nix diff --git a/modules/applications/default.nix b/modules/applications/default.nix index f336af7..c049ae5 100644 --- a/modules/applications/default.nix +++ b/modules/applications/default.nix @@ -1 +1 @@ -{ ... }: { imports = [ ./misc.nix ./locale.nix ./git ]; } +{ ... }: { imports = [ ./misc.nix ./locale.nix ./git ./shells ]; } diff --git a/modules/applications/sessionVariables.nix b/modules/applications/sessionVariables.nix deleted file mode 100644 index 704cd23..0000000 --- a/modules/applications/sessionVariables.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: -with import ../../secrets.nix; { - home-manager.users.adrielus.home.sessionVariables = { - inherit GITHUB_TOKEN; - GITHUB_USERNAME = "Mateiadrielrafael"; - }; -} diff --git a/modules/applications/shells/default.nix b/modules/applications/shells/default.nix new file mode 100644 index 0000000..24425a2 --- /dev/null +++ b/modules/applications/shells/default.nix @@ -0,0 +1,4 @@ +{ ... }: { + imports = [ ./sessionVariables.nix ]; + home-manager.users.adrielus.programs.zsh.enable = true; +} diff --git a/modules/applications/shells/sessionVariables.nix b/modules/applications/shells/sessionVariables.nix new file mode 100644 index 0000000..32589b7 --- /dev/null +++ b/modules/applications/shells/sessionVariables.nix @@ -0,0 +1,13 @@ +{ ... }: +with import ../../../secrets.nix; +let + variables = { + GITHUB_USERNAME = "Mateiadrielrafael"; + inherit GITHUB_TOKEN; + }; +in { + home-manager.users.adrielus = { + home.sessionVariables = variables; + # programs.zsh.sessionVariables = variables; + }; +}