Skip to content

Commit

Permalink
build: users -> uzers
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanccn committed Jan 22, 2025
1 parent 9a5eba5 commit 239b48c
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 28 deletions.
27 changes: 17 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
[package]
name = "morlana"
name = "morlana"
version = "0.1.0"
edition = "2021"

description = "nix-darwin utilities"
authors = ["Ryan Cao <[email protected]>"]
license = "GPL-3.0-only"
repository = "https://github.com/ryanccn/morlana.git"
authors = ["Ryan Cao <[email protected]>"]
license = "GPL-3.0-only"
repository = "https://github.com/ryanccn/morlana.git"

categories = ["command-line-utilities", "development-tools"]
keywords = ["nix", "darwin", "macos", "system"]
keywords = ["nix", "darwin", "macos", "system"]

[dependencies]
clap = { version = "4.5.27", features = ["derive", "env", "string"] }
clap = { version = "4.5.27", features = ["derive", "env", "string"] }
clap_complete = "4.5.42"
color-eyre = "0.6.3"
color-eyre = "0.6.3"
enum_dispatch = "0.3.13"
eyre = "0.6.12"
nix = { version = "0.29.0", features = ["process", "user"] }
owo-colors = "4.1.0"
serde = { version = "1.0.217", features = ["derive"] }
serde_json = "1.0.137"
users = { version = "0.11.0", default-features = false, features = ["cache"] }
owo-colors = "4.1.0"
serde = { version = "1.0.217", features = ["derive"] }
serde_json = "1.0.137"
uzers = "0.12.1"
walkdir = "2.5.0"

[lints.clippy]
all = { level = "warn", priority = -1 }
all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
perf = { level = "warn", priority = -1 }
perf = { level = "warn", priority = -1 }

redundant_closure_for_method_calls = "allow"
module_name_repetitions = "allow"
module_name_repetitions = "allow"

[lints.rust]
unsafe_code = "forbid"
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[nix-darwin](https://github.com/LnL7/nix-darwin) utilities, implemented in Rust

```sh
nix run github:ryanccn/morlana
nix run --accept-flake-config github:ryanccn/morlana
```

## Features
Expand Down Expand Up @@ -40,6 +40,15 @@ nix run github:ryanccn/morlana -- uninstall

For more detailed information on available commands and options, run `morlana --help`.

### Binary cache

```nix
{
extra-substituters = [ "https://ryanccn.cachix.org" ];
extra-trusted-public-keys = [ "ryanccn.cachix.org-1:Or82F8DeVLJgjSKCaZmBzbSOhnHj82Of0bGeRniUgLQ=" ];
}
```

## License

GPLv3
5 changes: 5 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
nix-filter.url = "github:numtide/nix-filter";
};

nixConfig = {
extra-substituters = [ "https://ryanccn.cachix.org" ];
extra-trusted-public-keys = [ "ryanccn.cachix.org-1:Or82F8DeVLJgjSKCaZmBzbSOhnHj82Of0bGeRniUgLQ=" ];
};

outputs =
{
self,
Expand Down
2 changes: 1 addition & 1 deletion src/stages/bootstrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fn gen_system_template() -> Result<String> {
.replace("<HOST_PLATFORM>", &format!("{}-darwin", env::consts::ARCH))
.replace(
"<USER>",
&users::get_current_username()
&uzers::get_current_username()
.ok_or_else(|| eyre!("could not obtain current username"))?
.into_string()
.map_err(|oss| eyre!("current username {oss:?} is not UTF-8"))?,
Expand Down
3 changes: 1 addition & 2 deletions taplo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
[formatting]
align_entries = true
column_width = 120
column_width = 120

0 comments on commit 239b48c

Please sign in to comment.