1
0
Fork 0
nix-system-configurations/nixos/hpenvy/flake-module.nix

37 lines
721 B
Nix

# SPDX-FileCopyrightText: 2025 Ethan Reece <contact@ethanreece.com>
#
# SPDX-License-Identifier: MIT
{ module-name, ... }:
{
config,
inputs,
lib,
withSystem,
...
}:
{
flake.nixosConfigurations = lib.mkIf config.devices.${module-name}.enable (
let
system = config.devices.${module-name}.system;
in
{
${module-name} = withSystem system (
{ pkgs, ... }:
lib.nixosSystem {
inherit system;
specialArgs = {
inherit
inputs
module-name
pkgs
system
;
flakeConfig = config;
};
modules = [ ./configuration.nix ];
}
);
}
);
}