Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
viperML committed Jul 5, 2023
1 parent 932c6af commit 1aa1158
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
13 changes: 3 additions & 10 deletions src/nixos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ use std::ops::Deref;
use color_eyre::eyre::{bail, Context};
use color_eyre::Result;

use thiserror::Error;

use log::{debug, info, trace};

use crate::interface::NHRunnable;
Expand All @@ -17,12 +15,6 @@ const CURRENT_PROFILE: &str = "/run/current-system";

const SPEC_LOCATION: &str = "/etc/specialisation";

#[derive(Debug, Error)]
pub enum OsRebuildError {
#[error("Specialisation {0} does not exist")]
SpecError(String),
}

impl NHRunnable for interface::OsArgs {
fn run(&self) -> Result<()> {
trace!("{:?}", self);
Expand Down Expand Up @@ -53,7 +45,8 @@ impl OsRebuildArgs {

let flake_output = format!(
"{}#nixosConfigurations.{:?}.config.system.build.toplevel",
&self.common.flakeref.deref(), hostname
&self.common.flakeref.deref(),
hostname
);

commands::BuildCommandBuilder::default()
Expand Down Expand Up @@ -99,7 +92,7 @@ impl OsRebuildArgs {
let confirmation = dialoguer::Confirm::new().default(false).interact()?;

if !confirmation {
return Ok(())
return Ok(());
}
}

Expand Down
5 changes: 2 additions & 3 deletions src/search.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use std::{collections::HashMap, process::Command, ops::Deref};
use std::{collections::HashMap, ops::Deref, process::Command};

use crate::{*, interface::FlakeRef};
use crate::*;
use interface::SearchArgs;
use serde_json::Value;

#[derive(Debug, serde::Deserialize)]
struct RawEntry<'a> {
Expand Down

0 comments on commit 1aa1158

Please sign in to comment.