|
56 | 56 |
|
57 | 57 | types = prev.types // { |
58 | 58 | networking = lib.types.submodule { |
| 59 | + # keep-sorted start skip_lines=1 block=yes newline_separated=yes |
59 | 60 | options = { |
60 | | - name = lib.mkOption { |
61 | | - type = lib.types.nullOr lib.types.str; |
62 | | - description = "Host name as string."; |
| 61 | + cid = lib.mkOption { |
| 62 | + type = lib.types.nullOr lib.types.int; |
63 | 63 | default = null; |
| 64 | + description = '' |
| 65 | + Vsock CID (Context IDentifier) as integer: |
| 66 | + - VMADDR_CID_HYPERVISOR (0) is reserved for services built into the hypervisor |
| 67 | + - VMADDR_CID_LOCAL (1) is the well-known address for local communication (loopback) |
| 68 | + - VMADDR_CID_HOST (2) is the well-known address of the host |
| 69 | + ''; |
64 | 70 | }; |
65 | | - mac = lib.mkOption { |
| 71 | + |
| 72 | + interfaceName = lib.mkOption { |
66 | 73 | type = lib.types.nullOr lib.types.str; |
67 | | - description = "MAC address as string."; |
68 | 74 | default = null; |
| 75 | + description = "Name of the network interface."; |
69 | 76 | }; |
| 77 | + |
70 | 78 | ipv4 = lib.mkOption { |
71 | 79 | type = lib.types.nullOr lib.types.str; |
72 | 80 | description = "IPv4 address as string."; |
73 | 81 | default = null; |
74 | 82 | }; |
75 | | - ipv6 = lib.mkOption { |
76 | | - type = lib.types.nullOr lib.types.str; |
77 | | - description = "IPv6 address as string."; |
78 | | - default = null; |
79 | | - }; |
| 83 | + |
80 | 84 | ipv4SubnetPrefixLength = lib.mkOption { |
81 | 85 | type = lib.types.nullOr lib.types.int; |
82 | 86 | default = null; |
83 | 87 | description = "The IPv4 subnet prefix length (e.g. 24 for 255.255.255.0)"; |
84 | 88 | example = 24; |
85 | 89 | }; |
86 | | - interfaceName = lib.mkOption { |
| 90 | + |
| 91 | + ipv6 = lib.mkOption { |
87 | 92 | type = lib.types.nullOr lib.types.str; |
| 93 | + description = "IPv6 address as string."; |
88 | 94 | default = null; |
89 | | - description = "Name of the network interface."; |
90 | 95 | }; |
91 | | - cid = lib.mkOption { |
92 | | - type = lib.types.nullOr lib.types.int; |
| 96 | + |
| 97 | + mac = lib.mkOption { |
| 98 | + type = lib.types.nullOr lib.types.str; |
| 99 | + description = "MAC address as string."; |
93 | 100 | default = null; |
| 101 | + }; |
| 102 | + |
| 103 | + name = lib.mkOption { |
| 104 | + type = lib.types.nullOr lib.types.str; |
| 105 | + description = "Host name as string."; |
| 106 | + default = null; |
| 107 | + }; |
| 108 | + |
| 109 | + }; |
| 110 | + # keep-sorted end |
| 111 | + }; |
| 112 | + |
| 113 | + ghafApplication = lib.types.submodule { |
| 114 | + # keep-sorted start skip_lines=1 block=yes |
| 115 | + options = { |
| 116 | + categories = lib.mkOption { |
| 117 | + description = "The `Categories` of the desktop entry; see https://specifications.freedesktop.org/menu-spec/1.0/category-registry.html for possible values"; |
| 118 | + type = lib.types.listOf lib.types.str; |
| 119 | + default = [ ]; |
| 120 | + }; |
| 121 | + description = lib.mkOption { |
| 122 | + type = lib.types.str; |
| 123 | + description = "The `Comment` of the desktop entry"; |
| 124 | + }; |
| 125 | + desktopName = lib.mkOption { |
| 126 | + type = lib.types.str; |
| 127 | + description = "The `Name` of the desktop entry"; |
| 128 | + default = ""; |
| 129 | + }; |
| 130 | + exec = lib.mkOption { |
| 131 | + type = lib.types.nullOr lib.types.str; |
94 | 132 | description = '' |
95 | | - Vsock CID (Context IDentifier) as integer: |
96 | | - - VMADDR_CID_HYPERVISOR (0) is reserved for services built into the hypervisor |
97 | | - - VMADDR_CID_LOCAL (1) is the well-known address for local communication (loopback) |
98 | | - - VMADDR_CID_HOST (2) is the well-known address of the host |
| 133 | + The `Exec` of the desktop entry. |
| 134 | + If `vm` is set, this command will be executed in the target VM. |
99 | 135 | ''; |
| 136 | + default = null; |
| 137 | + }; |
| 138 | + extraModules = lib.mkOption { |
| 139 | + type = lib.types.listOf lib.types.attrs; |
| 140 | + description = "Additional modules required for the application"; |
| 141 | + default = [ ]; |
| 142 | + }; |
| 143 | + genericName = lib.mkOption { |
| 144 | + type = lib.types.nullOr lib.types.str; |
| 145 | + description = "The `GenericName` of the desktop entry"; |
| 146 | + default = null; |
| 147 | + }; |
| 148 | + givcArgs = lib.mkOption { |
| 149 | + description = "GIVC arguments for the application"; |
| 150 | + type = lib.types.listOf lib.types.str; |
| 151 | + default = [ ]; |
| 152 | + }; |
| 153 | + icon = lib.mkOption { |
| 154 | + type = lib.types.nullOr lib.types.str; |
| 155 | + description = "The `Icon` of the desktop entry"; |
| 156 | + default = null; |
| 157 | + }; |
| 158 | + name = lib.mkOption { |
| 159 | + type = lib.types.str; |
| 160 | + description = "The name of the desktop file (excluding the .desktop or .directory file extensions)"; |
| 161 | + }; |
| 162 | + packages = lib.mkOption { |
| 163 | + type = lib.types.listOf lib.types.package; |
| 164 | + description = "Packages required for this application"; |
| 165 | + default = [ ]; |
| 166 | + }; |
| 167 | + startupWMClass = lib.mkOption { |
| 168 | + type = lib.types.nullOr lib.types.str; |
| 169 | + description = "The `StartupWMClass` of the desktop entry"; |
| 170 | + default = null; |
| 171 | + }; |
| 172 | + vm = lib.mkOption { |
| 173 | + description = "VM name in case this launches an isolated application."; |
| 174 | + type = lib.types.nullOr lib.types.str; |
| 175 | + default = null; |
100 | 176 | }; |
101 | 177 | }; |
| 178 | + # keep-sorted end |
102 | 179 | }; |
103 | | - |
104 | 180 | }; |
105 | 181 |
|
106 | 182 | # Launcher utilities |
|
0 commit comments