Skip to content

Commit

Permalink
remove shivaraj; use rust style string
Browse files Browse the repository at this point in the history
  • Loading branch information
shivaraj-bh committed Sep 13, 2023
1 parent a9784d9 commit 44448a0
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions crates/nix_health/src/check/trusted_users.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,19 @@ impl Check for TrustedUsers {
Report::Green
} else if os == os_info::Type::NixOS {
Report::Red(WithDetails {
msg: "$USER not present in trusted_users".into(),
suggestion:
"Add `nix.trustedUsers = [ \"root\" \"<$USER>\" ];` to your `configuration.nix`"
.into(),
msg: format!("{} not present in trusted_users", current_user),
suggestion: format!(
r#"Add `nix.trustedUsers = [ "root" "{}" ];` to your `configuration.nix`"#,
current_user
),
})
} else {
Report::Red(WithDetails {
msg: "$USER not present in trusted_users".into(),
suggestion: "Run 'echo \"trusted-users = root $USER\" | sudo tee -a /etc/nix/nix.conf && sudo pkill nix-daemon'".into(),
msg: format!("{} not present in trusted_users", current_user),
suggestion: format!(
r#"Run 'echo "trusted-users = root {}" | sudo tee -a /etc/nix/nix.conf && sudo pkill nix-daemon'"#,
current_user
),
})
}
}
Expand Down

0 comments on commit 44448a0

Please sign in to comment.