From 839d8a360b2b7b0cbf9ce0f53a5220ee9c95fac8 Mon Sep 17 00:00:00 2001 From: Aditya Date: Thu, 11 Apr 2024 17:42:42 +0530 Subject: [PATCH] add session variables --- hosts/default/home.nix | 12 ------------ modules/home-manager/default.nix | 4 +++- modules/home-manager/session-vars/default.nix | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 13 deletions(-) create mode 100644 modules/home-manager/session-vars/default.nix diff --git a/hosts/default/home.nix b/hosts/default/home.nix index b4604aa..315015a 100644 --- a/hosts/default/home.nix +++ b/hosts/default/home.nix @@ -29,18 +29,6 @@ nixpkgs.config.joypixels.acceptLicense = true; # Manage session variables - home.sessionVariables = { - # default editor - EDITOR = "nvim"; - NIXPKGS_ALLOW_UNFREE = 1; - - # sshaskpass - SSH_ASKPASS = "/home/user/.nix-profile/bin/ksshaskpass"; - SSH_ASKPASS_REQUIRE = "prefer"; - - # Store git credentials in KDE Wallet - GIT_ASKPASS = "/home/user/.nix-profile/bin/ksshaskpass"; - }; # The home.packages option allows you to install Nix packages into your # environment. diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index 6567c15..b6608a9 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -1,3 +1,5 @@ {lib, ...}: { - imports = []; + imports = [ + ./session-vars + ]; } diff --git a/modules/home-manager/session-vars/default.nix b/modules/home-manager/session-vars/default.nix new file mode 100644 index 0000000..64feab2 --- /dev/null +++ b/modules/home-manager/session-vars/default.nix @@ -0,0 +1,14 @@ +_: { + home.sessionVariables = { + # default editor + EDITOR = "nvim"; + NIXPKGS_ALLOW_UNFREE = 1; + + # sshaskpass + SSH_ASKPASS = "/home/user/.nix-profile/bin/ksshaskpass"; + SSH_ASKPASS_REQUIRE = "prefer"; + + # Store git credentials in KDE Wallet + GIT_ASKPASS = "/home/user/.nix-profile/bin/ksshaskpass"; + }; +}