mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-12 06:19:00 +00:00
flake-parts/setups: fix module config scoping
It's getting confusing.
This commit is contained in:
parent
cce282dbcf
commit
521424e7f1
@ -70,11 +70,15 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
configType = { config, name, lib, ... }: {
|
configType =
|
||||||
|
let
|
||||||
|
partsConfig = config;
|
||||||
|
in
|
||||||
|
{ config, name, lib, ... }: {
|
||||||
options = {
|
options = {
|
||||||
systems = lib.mkOption {
|
systems = lib.mkOption {
|
||||||
type = with lib.types; listOf str;
|
type = with lib.types; listOf str;
|
||||||
default = config.systems;
|
default = partsConfig.systems;
|
||||||
defaultText = "config.systems";
|
defaultText = "config.systems";
|
||||||
example = [ "x86_64-linux" "aarch64-linux" ];
|
example = [ "x86_64-linux" "aarch64-linux" ];
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -99,11 +99,15 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
configType = { config, name, lib, ... }: {
|
configType =
|
||||||
|
let
|
||||||
|
partsConfig = config;
|
||||||
|
in
|
||||||
|
{ config, name, lib, ... }: {
|
||||||
options = {
|
options = {
|
||||||
systems = lib.mkOption {
|
systems = lib.mkOption {
|
||||||
type = with lib.types; listOf str;
|
type = with lib.types; listOf str;
|
||||||
default = config.systems;
|
default = partsConfig.systems;
|
||||||
defaultText = "config.systems";
|
defaultText = "config.systems";
|
||||||
example = [ "x86_64-linux" "aarch64-linux" ];
|
example = [ "x86_64-linux" "aarch64-linux" ];
|
||||||
description = ''
|
description = ''
|
||||||
@ -213,14 +217,14 @@ let
|
|||||||
let
|
let
|
||||||
setupConfig = config;
|
setupConfig = config;
|
||||||
in
|
in
|
||||||
{ lib, ... }: {
|
{ config, lib, ... }: {
|
||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = setupConfig.overlays;
|
nixpkgs.overlays = setupConfig.overlays;
|
||||||
networking.hostName = lib.mkDefault setupConfig.hostname;
|
networking.hostName = lib.mkDefault setupConfig.hostname;
|
||||||
}
|
}
|
||||||
|
|
||||||
(lib.mkIf (config.domain != null) {
|
(lib.mkIf (setupConfig.domain != null) {
|
||||||
networking.domain = lib.mkForce setupConfig.domain;
|
networking.domain = lib.mkForce setupConfig.domain;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user