nixos: home: import common modules

This commit is contained in:
Bruno BELANYI 2024-01-03 16:50:05 +00:00
parent aa1336bb8d
commit d113742905
2 changed files with 12 additions and 5 deletions

View file

@ -3,9 +3,9 @@
{ lib, type ? null, ... }:
let
allowedTypes = [
"nixos"
"home"
"darwin"
"home"
"nixos"
];
allowedTypesString = lib.concatStringSep ", " (builtins.map lib.escapeNixString allowedTypes);

View file

@ -13,16 +13,23 @@ in
config = lib.mkIf cfg.enable {
home-manager = {
users.${config.my.user.name} = {
# Not a fan of out-of-directory imports, but this is a good exception
users.${config.my.user.name} = import "${inputs.self}/modules/home";
imports = [
"${inputs.self}/modules/common"
"${inputs.self}/modules/home"
];
};
# Nix Flakes compatibility
useGlobalPkgs = true;
useUserPackages = true;
# Forward inputs to home-manager configuration
extraSpecialArgs = {
# Forward inputs to home-manager configuration
inherit inputs;
# For consumption by common modules
type = "home";
};
};
};