feat: extra arguments for Home Manager (#507)

* feat: extra arguments for Home Manager
This commit is contained in:
SteveLauC
2023-07-24 13:07:55 +08:00
committed by GitHub
parent 1307d2d7e8
commit 635bfce198
3 changed files with 23 additions and 1 deletions

View File

@@ -351,6 +351,9 @@ pub struct Linux {
#[merge(strategy = crate::utils::merge_strategies::string_append_opt)]
emerge_update_flags: Option<String>,
#[merge(strategy = crate::utils::merge_strategies::vec_prepend_opt)]
home_manager_arguments: Option<Vec<String>>,
}
#[derive(Deserialize, Default, Debug, Merge)]
@@ -1275,6 +1278,14 @@ impl Config {
.and_then(|linux| linux.nix_arguments.as_deref())
}
/// Extra Home Manager arguments
pub fn home_manager(&self) -> Option<&Vec<String>> {
self.config_file
.linux
.as_ref()
.and_then(|misc| misc.home_manager_arguments.as_ref())
}
/// Distrobox use root
pub fn distrobox_root(&self) -> bool {
self.config_file