1
0
Fork 0
nix-system-configurations/home-manager/utd_syssec/flake-module.nix

37 lines
833 B
Nix

# SPDX-FileCopyrightText: 2025 Ethan Reece <contact@ethanreece.com>
#
# SPDX-License-Identifier: MIT
{ module-name, ... }:
{
config,
inputs,
lib,
withSystem,
...
}:
{
flake.homeConfigurations = lib.mkIf config.profiles.${module-name}.enable (
let
system = config.profiles.${module-name}.homeManagerSystem;
username = "ethanreece";
homeDirectory = "/home/${username}";
in
{
${module-name} = withSystem system (
{ pkgs, ... }:
inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs pkgs system;
flakeConfig = config;
};
modules = [
./home.nix
{ home = { inherit username homeDirectory; }; }
];
}
);
}
);
}