nixos: home: import common modules
This commit is contained in:
parent
aa1336bb8d
commit
d113742905
|
@ -3,9 +3,9 @@
|
||||||
{ lib, type ? null, ... }:
|
{ lib, type ? null, ... }:
|
||||||
let
|
let
|
||||||
allowedTypes = [
|
allowedTypes = [
|
||||||
"nixos"
|
|
||||||
"home"
|
|
||||||
"darwin"
|
"darwin"
|
||||||
|
"home"
|
||||||
|
"nixos"
|
||||||
];
|
];
|
||||||
|
|
||||||
allowedTypesString = lib.concatStringSep ", " (builtins.map lib.escapeNixString allowedTypes);
|
allowedTypesString = lib.concatStringSep ", " (builtins.map lib.escapeNixString allowedTypes);
|
||||||
|
|
|
@ -13,16 +13,23 @@ in
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home-manager = {
|
home-manager = {
|
||||||
# Not a fan of out-of-directory imports, but this is a good exception
|
users.${config.my.user.name} = {
|
||||||
users.${config.my.user.name} = import "${inputs.self}/modules/home";
|
# Not a fan of out-of-directory imports, but this is a good exception
|
||||||
|
imports = [
|
||||||
|
"${inputs.self}/modules/common"
|
||||||
|
"${inputs.self}/modules/home"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# Nix Flakes compatibility
|
# Nix Flakes compatibility
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
|
|
||||||
# Forward inputs to home-manager configuration
|
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
|
# Forward inputs to home-manager configuration
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
|
# For consumption by common modules
|
||||||
|
type = "home";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue