mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-08 15:40:34 -04:00
hardware: Let fan control be configured and disabled
This commit is contained in:
parent
92235d0f47
commit
7dc0d0969d
4 changed files with 94 additions and 16 deletions
|
@ -25,6 +25,7 @@ pub(crate) struct PlatformConfig {
|
|||
pub update_bios: Option<ScriptConfig>,
|
||||
pub update_dock: Option<ScriptConfig>,
|
||||
pub storage: Option<StorageConfig>,
|
||||
pub fan_control: Option<ServiceConfig>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Default, Deserialize, Debug)]
|
||||
|
@ -34,6 +35,18 @@ pub(crate) struct ScriptConfig {
|
|||
pub script_args: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Deserialize, Debug)]
|
||||
pub(crate) enum ServiceConfig {
|
||||
#[serde(rename = "systemd")]
|
||||
Systemd(String),
|
||||
#[serde(rename = "script")]
|
||||
Script {
|
||||
start: ScriptConfig,
|
||||
stop: ScriptConfig,
|
||||
status: ScriptConfig,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Clone, Default, Deserialize, Debug)]
|
||||
pub(crate) struct StorageConfig {
|
||||
pub trim_devices: ScriptConfig,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue