refactor(configurations): centralise home-manager config

This commit is contained in:
Mohammad Rafiq 2025-07-07 18:11:33 +08:00
parent b5772e4525
commit b63959f307
No known key found for this signature in database
2 changed files with 11 additions and 23 deletions

View file

@ -1,18 +0,0 @@
{ inputs, config, ... }:
let
inherit (cfg.lib.modules) forAllUsers';
cfg = config.flake;
hm = inputs.home-manager;
globalCfg = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit (cfg) manifest; };
sharedModules = [ cfg.modules.homeManager.default ];
users = forAllUsers' (name: _: cfg.homes.${name});
};
in
{
imports = [ hm.flakeModules.home-manager ];
flake.modules.nixos.default.imports = [ hm.nixosModules.home-manager ];
flake.modules.nixos.default.config.home-manager = globalCfg;
}