From 96d5d8a396de3efaef0f8c74e39840c1d8c01579 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 23 Jan 2025 20:48:04 +0900 Subject: [PATCH] nix: apply shared home config to reserved aid Signed-off-by: Ophestra --- nixos.nix | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/nixos.nix b/nixos.nix index 8706d31..8f4b779 100644 --- a/nixos.nix +++ b/nixos.nix @@ -204,17 +204,20 @@ in users = foldlAttrs ( acc: _: fid: - mergeAttrsList ( - # aid 0 is reserved - imap1 (aid: app: { - ${getsubname fid aid} = mkMerge [ - (cfg.home-manager (getsubname fid aid) (getsubuid fid aid)) - app.extraConfig - { home.packages = app.packages; } - ]; - }) cfg.apps - ) - // acc + mkMerge [ + (mergeAttrsList ( + # aid 0 is reserved + imap1 (aid: app: { + ${getsubname fid aid} = mkMerge [ + (cfg.home-manager (getsubname fid aid) (getsubuid fid aid)) + app.extraConfig + { home.packages = app.packages; } + ]; + }) cfg.apps + )) + { ${getsubname fid 0} = cfg.home-manager (getsubname fid 0) (getsubuid fid 0); } + acc + ] ) privPackages cfg.users; };