a flake module to ease creating and managing multiple hosts in your nix flake.

feat: use lazy types for specialArgs

+9 -6
+9 -6
flake-module.nix
··· 16 16 ; 17 17 18 18 cfg = config.easyHosts; 19 + 20 + modulesType = types.listOf types.anything; 21 + specialArgsType = types.lazyAttrsOf types.raw; 19 22 in 20 23 { 21 24 options = { ··· 38 41 modules = mkOption { 39 42 # we really expect a list of paths but i want to accept lists of lists of lists and so on 40 43 # since they will be flattened in the final function that applies the settings 41 - type = types.listOf types.anything; 44 + type = modulesType; 42 45 default = [ ]; 43 46 }; 44 47 45 48 specialArgs = mkOption { 46 - type = types.attrs; 49 + type = specialArgsType; 47 50 default = { }; 48 51 }; 49 52 }; ··· 57 60 types.submodule { 58 61 options = { 59 62 modules = mkOption { 60 - type = types.listOf types.anything; 63 + type = modulesType; 61 64 default = [ ]; 62 65 }; 63 66 64 67 specialArgs = mkOption { 65 - type = types.attrs; 68 + type = specialArgsType; 66 69 default = { }; 67 70 }; 68 71 }; ··· 120 123 }; 121 124 122 125 modules = mkOption { 123 - type = types.listOf types.anything; 126 + type = modulesType; 124 127 default = [ ]; 125 128 }; 126 129 127 130 specialArgs = mkOption { 128 - type = types.attrs; 131 + type = specialArgsType; 129 132 default = { }; 130 133 }; 131 134 };