mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
* add nvidia packages
* add nvidia deps to nonfree
* gpu_acceleration flag & nvidia hacking
* fix gpu_config & /tmp/lxc.log
* implement hardware acceleration more dynamically
* refactor OpenUI
* use mknod
* registry updates for multi-hardware-requirements
* pluralize
* handle new registry types
* remove log
* migrations and driver fixes
* wip
* misc patches
* handle nvidia-container differently
* chore: comments (#3093)
* chore: comments
* revert some sizing
---------
Co-authored-by: Matt Hill <mattnine@protonmail.com>
* Revert "handle nvidia-container differently"
This reverts commit d708ae53df.
* fix debian containers
* cleanup
* feat: add empty array placeholder in forms (#3095)
* fixes from testing, client side device filtering for better fingerprinting resistance
* fix mac builds
---------
Co-authored-by: Sam Sartor <me@samsartor.com>
Co-authored-by: Matt Hill <mattnine@protonmail.com>
Co-authored-by: Alex Inkin <alexander@inkin.ru>
28 lines
642 B
Rust
28 lines
642 B
Rust
use std::sync::{Arc, Weak};
|
|
|
|
use rpc_toolkit::Context;
|
|
|
|
use crate::prelude::*;
|
|
use crate::service::Service;
|
|
|
|
#[derive(Clone)]
|
|
pub struct EffectContext(Weak<Service>);
|
|
impl EffectContext {
|
|
pub fn new(service: Weak<Service>) -> Self {
|
|
Self(service)
|
|
}
|
|
}
|
|
impl Context for EffectContext {}
|
|
impl EffectContext {
|
|
pub(super) fn deref(&self) -> Result<Arc<Service>, Error> {
|
|
if let Some(seed) = Weak::upgrade(&self.0) {
|
|
Ok(seed)
|
|
} else {
|
|
Err(Error::new(
|
|
eyre!("Service has already been destroyed"),
|
|
ErrorKind::InvalidRequest,
|
|
))
|
|
}
|
|
}
|
|
}
|