-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(applications): add Forecast module
- Loading branch information
1 parent
446afcd
commit c0e70a2
Showing
1 changed file
with
158 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
{ lib, ... }: | ||
lib.cosmic.applications.mkCosmicApplication { | ||
name = "forecast"; | ||
originalName = "Forecast"; | ||
identifier = "com.jwestall.Forecast"; | ||
configurationVersion = 1; | ||
|
||
maintainers = [ lib.maintainers.HeitorAugustoLN ]; | ||
|
||
settingsOptions = | ||
let | ||
inherit (lib.cosmic) defaultNullOpts; | ||
in | ||
{ | ||
api_key = defaultNullOpts.mkStr "" '' | ||
The API key for Geocoding API. | ||
''; | ||
|
||
app_theme = | ||
defaultNullOpts.mkRonEnum [ "Dark" "Light" "System" ] | ||
{ | ||
__type = "enum"; | ||
variant = "System"; | ||
} | ||
'' | ||
The theme of the application. | ||
''; | ||
|
||
default_page = | ||
defaultNullOpts.mkRonEnum [ "DailyView" "Details" "HourlyView" ] | ||
{ | ||
__type = "enum"; | ||
variant = "HourlyView"; | ||
} | ||
'' | ||
The default page of the application. | ||
''; | ||
|
||
latitude = | ||
defaultNullOpts.mkRonOptionalOf lib.types.str | ||
{ | ||
__type = "optional"; | ||
variant = "-28.971476"; | ||
} | ||
'' | ||
The latitude of the location. | ||
''; | ||
|
||
location = | ||
defaultNullOpts.mkRonOptionalOf lib.types.str | ||
{ | ||
__type = "optional"; | ||
variant = "Anta Gorda - RS, Brazil"; | ||
} | ||
'' | ||
The name of the location. | ||
''; | ||
|
||
longitude = | ||
defaultNullOpts.mkRonOptionalOf lib.types.str | ||
{ | ||
__type = "optional"; | ||
variant = "-412.005691"; | ||
} | ||
'' | ||
The longitude of the location. | ||
''; | ||
|
||
pressure_units = | ||
defaultNullOpts.mkRonEnum [ "Bar" "Hectopascal" "Kilopascal" "Psi" ] | ||
{ | ||
__type = "enum"; | ||
variant = "Hectopascal"; | ||
} | ||
'' | ||
The units of the pressure. | ||
''; | ||
|
||
speed_units = | ||
defaultNullOpts.mkRonEnum [ "KilometresPerHour" "MetersPerSecond" "MilesPerHour" ] | ||
{ | ||
__type = "enum"; | ||
variant = "KilometresPerHour"; | ||
} | ||
'' | ||
The units of the speed. | ||
''; | ||
|
||
timefmt = | ||
defaultNullOpts.mkRonEnum [ "TwelveHr" "TwentyFourHr" ] | ||
{ | ||
__type = "enum"; | ||
variant = "TwelveHr"; | ||
} | ||
'' | ||
The time format. | ||
''; | ||
|
||
units = | ||
defaultNullOpts.mkRonEnum [ "Celsius" "Fahrenheit" ] | ||
{ | ||
__type = "enum"; | ||
variant = "Fahrenheit"; | ||
} | ||
'' | ||
The units of the temperature. | ||
''; | ||
}; | ||
|
||
settingsExample = { | ||
api_key = ""; | ||
|
||
app_theme = { | ||
__type = "enum"; | ||
variant = "System"; | ||
}; | ||
|
||
default_page = { | ||
__type = "enum"; | ||
variant = "HourlyView"; | ||
}; | ||
|
||
latitude = { | ||
__type = "optional"; | ||
variant = "-28.971476"; | ||
}; | ||
|
||
location = { | ||
__type = "optional"; | ||
variant = "Anta Gorda - RS, Brazil"; | ||
}; | ||
|
||
longitude = { | ||
__type = "optional"; | ||
variant = "-412.005691"; | ||
}; | ||
|
||
pressure_units = { | ||
__type = "enum"; | ||
variant = "Hectopascal"; | ||
}; | ||
|
||
speed_units = { | ||
__type = "enum"; | ||
variant = "KilometresPerHour"; | ||
}; | ||
|
||
timefmt = { | ||
__type = "enum"; | ||
variant = "TwelveHr"; | ||
}; | ||
|
||
units = { | ||
__type = "enum"; | ||
variant = "Fahrenheit"; | ||
}; | ||
}; | ||
} |