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

39 lines
812 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.targets.${module-name}.enable (
let
system = config.targets.${module-name}.system;
username = "ethanreece";
homeDirectory = "/home/${username}";
in
{
${module-name} = withSystem system (
{ pkgs, ... }:
inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit
inputs
pkgs
system
username
homeDirectory
;
};
modules = [ ./home.nix ];
}
);
}
);
}