modules: home: put into folder
This commit is contained in:
parent
f09ba6b5be
commit
c88fa91671
2 changed files with 2 additions and 2 deletions
24
modules/home/default.nix
Normal file
24
modules/home/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ config, inputs, lib, ... }:
|
||||
let
|
||||
actualPath = [ "home-manager" "users" config.my.user.name "my" "home" ];
|
||||
aliasPath = [ "my" "home" ];
|
||||
|
||||
cfg = config.my.user.home;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.home-manager.nixosModule # enable home-manager options
|
||||
(lib.mkAliasOptionModule aliasPath actualPath) # simplify setting home options
|
||||
];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home-manager = {
|
||||
# Not a fan of out-of-directory imports, but this is a good exception
|
||||
users.${config.my.user.name} = import ../../home;
|
||||
|
||||
# Nix Flakes compatibility
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue