flake-parts/setups: correct module type for custom modules attr

This commit is contained in:
Gabriel Arazas 2024-03-27 16:34:51 +08:00
parent 92e409e40f
commit 32c807e064
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360
3 changed files with 7 additions and 6 deletions

View File

@ -169,7 +169,7 @@ in
{
options.setups.home-manager = {
sharedModules = lib.mkOption {
type = with lib.types; listOf raw;
type = with lib.types; listOf deferredModule;
default = [ ];
description = ''
A list of modules to be shared by all of the declarative home-manager
@ -183,7 +183,7 @@ in
};
standaloneConfigModules = lib.mkOption {
type = with lib.types; listOf raw;
type = with lib.types; listOf deferredModule;
default = [ ];
internal = true;
description = ''

View File

@ -123,7 +123,7 @@ let
};
additionalModules = lib.mkOption {
type = with lib.types; listOf raw;
type = with lib.types; listOf deferredModule;
description = ''
A list of additional home-manager modules to be added with the
user.
@ -344,9 +344,10 @@ let
(lib.mkIf (config.homeManagerUsers.users != { })
(
let
inherit (config.homeManagerUsers) nixpkgsInstance;
setupConfig = config;
hasHomeManagerUsers = config.homeManagerUsers.users != { };
inherit (config.homeManagerUsers) nixpkgsInstance;
isNixpkgs = state: hasHomeManagerUsers && nixpkgsInstance == state;
in
{ config, lib, pkgs, ... }: {
@ -473,7 +474,7 @@ in
{
options.setups.nixos = {
sharedModules = lib.mkOption {
type = with lib.types; listOf raw;
type = with lib.types; listOf deferredModule;
default = [ ];
description = ''
A list of modules to be shared by all of the declarative NixOS setups.

View File

@ -23,7 +23,7 @@ let
};
modulesOption = lib.mkOption {
type = with lib.types; listOf raw;
type = with lib.types; listOf deferredModule;
default = [ ];
};
modulesOption' = configEnv: modulesOption // {