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 = {
|
||||
systems = lib.mkOption {
|
||||
type = with lib.types; listOf str;
|
||||
default = config.systems;
|
||||
default = partsConfig.systems;
|
||||
defaultText = "config.systems";
|
||||
example = [ "x86_64-linux" "aarch64-linux" ];
|
||||
description = ''
|
||||
|
@ -99,11 +99,15 @@ let
|
||||
};
|
||||
};
|
||||
|
||||
configType = { config, name, lib, ... }: {
|
||||
configType =
|
||||
let
|
||||
partsConfig = config;
|
||||
in
|
||||
{ config, name, lib, ... }: {
|
||||
options = {
|
||||
systems = lib.mkOption {
|
||||
type = with lib.types; listOf str;
|
||||
default = config.systems;
|
||||
default = partsConfig.systems;
|
||||
defaultText = "config.systems";
|
||||
example = [ "x86_64-linux" "aarch64-linux" ];
|
||||
description = ''
|
||||
@ -213,14 +217,14 @@ let
|
||||
let
|
||||
setupConfig = config;
|
||||
in
|
||||
{ lib, ... }: {
|
||||
{ config, lib, ... }: {
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
nixpkgs.overlays = setupConfig.overlays;
|
||||
networking.hostName = lib.mkDefault setupConfig.hostname;
|
||||
}
|
||||
|
||||
(lib.mkIf (config.domain != null) {
|
||||
(lib.mkIf (setupConfig.domain != null) {
|
||||
networking.domain = lib.mkForce setupConfig.domain;
|
||||
})
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user