fixed home manager session variables

This commit is contained in:
Aleksandr Lebedev 2025-08-11 15:35:34 +02:00
parent f2ebfeb4ea
commit fa3a7f5786
3 changed files with 16 additions and 2 deletions

View file

@ -146,6 +146,7 @@
overrides = { overrides = {
kylekrein-server.hostname = "kylekrein.com"; kylekrein-server.hostname = "kylekrein.com";
}; };
exclude = ["kylekrein-wsl-wm"];
}; };
outputs-builder = channels: { outputs-builder = channels: {

View file

@ -19,14 +19,18 @@ in rec {
mkDeploy = { mkDeploy = {
self, self,
overrides ? {}, overrides ? {},
exclude ? [],
}: let }: let
hosts = self.nixosConfigurations or {}; hosts =
builtins.removeAttrs
(self.nixosConfigurations or {})
exclude;
names = builtins.attrNames hosts; names = builtins.attrNames hosts;
nodes = nodes =
lib.foldl ( lib.foldl (
result: name: let result: name: let
host = hosts.${name}; host = hosts.${name};
user = host.config.user.name or null; user = overrides.user or null;
inherit (host.pkgs) system; inherit (host.pkgs) system;
in in
result result

View file

@ -0,0 +1,9 @@
#https://github.com/nix-community/home-manager/issues/1011
{config, ...}: let
homeManagerSessionVars = "${config.home.profileDirectory}/etc/profile.d/hm-session-vars.sh";
in {
programs.bash.enable = !config.programs.zsh.enable && !config.programs.fish.enable && !config.programs.nushell.enable;
programs.bash.initExtra = ''
source "${homeManagerSessionVars}"
'';
}