Skip to content

Commit

Permalink
add direnv support, update license to 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
auguwu committed Jan 14, 2024
1 parent b885d92 commit e3b9d59
Show file tree
Hide file tree
Showing 50 changed files with 102 additions and 121 deletions.
33 changes: 33 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# πŸ»β€β„οΈπŸ’ ume: Easy, self-hostable, and flexible image host made in Rust
# Copyright 2021-2024 Noel Towa <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

if ! has nix_direnv_version || ! nix_direnv_version 2.3.0; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.3.0/direnvrc" "sha256-Dmd+j63L84wuzgyjITIfSxSD57Tx7v51DMxVZOsiUD8="
fi

# make .direnv if it doesn't exist
mkdir -p "$(direnv_layout_dir)"

watch_file shell.nix
watch_file flake.nix # as outputs can change at anytime
watch_file flake.lock

# we need to watch the rust-toolchain.toml file so if any edits occur,
# then direnv can react to it and change the environment.
watch_file rust-toolchain.toml

# try to use flakes, if it fails use normal nix (ie. shell.nix)
use flake || use nix
eval "$shellHook"
2 changes: 1 addition & 1 deletion .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# πŸ»β€β„οΈπŸ’ ume: Easy, self-hostable, and flexible image host made in Rust
# Copyright 2021-2023 Noel Towa <[email protected]>
# Copyright 2021-2024 Noel Towa <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Release.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# πŸ»β€β„οΈπŸ’ ume: Easy, self-hostable, and flexible image host made in Rust
# Copyright 2021-2023 Noel Towa <[email protected]>
# Copyright 2021-2024 Noel Towa <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
8 changes: 1 addition & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
# Created by https://www.toptal.com/developers/gitignore/api/Rust,VisualStudio,VisualStudioCode,JetBrains+All,Terraform
# Edit at https://www.toptal.com/developers/gitignore?templates=Rust,VisualStudio,VisualStudioCode,JetBrains+All,Terraform

### JetBrains+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
Expand Down Expand Up @@ -556,4 +549,5 @@ FodyWeavers.xsd

config.yml
!src/bin/
.direnv/
.env
2 changes: 1 addition & 1 deletion .noel/deployment/charts/ume.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# πŸ»β€β„οΈπŸ’ ume: Easy, self-hostable, and flexible image host made in Rust
# Copyright 2021-2023 Noel Towa <[email protected]>
# Copyright 2021-2024 Noel Towa <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion .noel/deployment/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# πŸ»β€β„οΈπŸ’ ume: Easy, self-hostable, and flexible image host made in Rust
# Copyright 2021-2023 Noel Towa <[email protected]>
# Copyright 2021-2024 Noel Towa <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion .noel/deployment/vars.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# πŸ»β€β„οΈπŸ’ ume: Easy, self-hostable, and flexible image host made in Rust
# Copyright 2021-2023 Noel Towa <[email protected]>
# Copyright 2021-2024 Noel Towa <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# πŸ»β€β„οΈπŸ’ ume: Easy, self-hostable, and flexible image host made in Rust
# Copyright 2021-2023 Noel Towa <[email protected]>
# Copyright 2021-2024 Noel Towa <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -28,7 +28,7 @@ path = "src/bin/main.rs"

[dependencies]
async-trait = "0.1.73"
aws-sdk-s3 = "0.28.0" # must be pinned to what `remi-s3` supports
aws-sdk-s3 = "0.28.0" # must be pinned to what `remi-s3` supports
axum = { version = "0.6.20", features = ["headers", "macros", "multipart"] }
bytes = "1.5.0"
chrono = { version = "0.4.31", features = ["serde"] }
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2021-2023 Noel Towa <[email protected]>
Copyright 2021-2024 Noel Towa <[email protected]>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// πŸ»β€β„οΈπŸ’ ume: Easy, self-hostable, and flexible image host made in Rust
// Copyright 2021-2023 Noel Towa <[email protected]>
// Copyright 2021-2024 Noel Towa <[email protected]>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# πŸ»β€β„οΈπŸ’ ume: Easy, self-hostable, and flexible image host made in Rust
# Copyright 2021-2023 Noel Towa <[email protected]>
# Copyright 2021-2024 Noel Towa <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
6 changes: 3 additions & 3 deletions distribution/docker/alpine.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# πŸ»β€β„οΈπŸ’ ume: Easy, self-hostable, and flexible image host made in Rust
# Copyright 2021-2023 Noel Towa <[email protected]>
# Copyright 2021-2024 Noel Towa <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,6 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM rust:1.73-alpine3.18 AS build
FROM rust:1.75-alpine3.19 AS build

FROM alpine:3.18
FROM alpine:3.19
4 changes: 2 additions & 2 deletions distribution/docker/debian.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# πŸ»β€β„οΈπŸ’ ume: Easy, self-hostable, and flexible image host made in Rust
# Copyright 2021-2023 Noel Towa <[email protected]>
# Copyright 2021-2024 Noel Towa <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,6 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM rust:1.73-slim-bullseye AS build
FROM rust:1.75-slim-bullseye AS build

FROM debian:bullseye-slim
2 changes: 1 addition & 1 deletion distribution/docker/scripts/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# πŸ»β€β„οΈπŸ’ ume: Easy, self-hostable, and flexible image host made in Rust
# Copyright 2021-2023 Noel Towa <[email protected]>
# Copyright 2021-2024 Noel Towa <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion distribution/docker/scripts/liblog.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# πŸ»β€β„οΈπŸ’ ume: Easy, self-hostable, and flexible image host made in Rust
# Copyright 2021-2023 Noel Towa <[email protected]>
# Copyright 2021-2024 Noel Towa <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion distribution/helm/.charted.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# πŸ»β€β„οΈπŸ’ ume: Easy, self-hostable, and flexible image host made in Rust
# Copyright 2021-2023 Noel Towa <[email protected]>
# Copyright 2021-2024 Noel Towa <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
74 changes: 14 additions & 60 deletions flake.lock

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

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# πŸ»β€β„οΈπŸ’ ume: Easy, self-hostable, and flexible image host made in Rust
# Copyright 2021-2023 Noel Towa <[email protected]>
# Copyright 2021-2024 Noel Towa <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
8 changes: 4 additions & 4 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# πŸ»β€β„οΈπŸ’ ume: Easy, self-hostable, and flexible image host made in Rust
# Copyright 2021-2023 Noel Towa <[email protected]>
# Copyright 2021-2024 Noel Towa <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,14 +14,14 @@
# limitations under the License.

[toolchain]
channel = "stable"
channel = "1.75"
profile = "minimal"
targets = [
"aarch64-unknown-linux-gnu",
"x86_64-apple-darwin",
"x86_64-unknown-linux-gnu",
"x86_64-unknown-linux-musl",
"x86_64-pc-windows-msvc"
"x86_64-pc-windows-msvc",
]
components = [
"rustc",
Expand All @@ -30,5 +30,5 @@ components = [
"rust-src",
"rust-std",
"clippy",
"rustfmt"
"rustfmt",
]
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# πŸ»β€β„οΈπŸ’ ume: Easy, self-hostable, and flexible image host made in Rust
# Copyright 2021-2023 Noel Towa <[email protected]>
# Copyright 2021-2024 Noel Towa <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/bin/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// πŸ»β€β„οΈπŸ’ ume: Easy, self-hostable, and flexible image host made in Rust
// Copyright 2021-2023 Noel Towa <[email protected]>
// Copyright 2021-2024 Noel Towa <[email protected]>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/generate/config.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// πŸ»β€β„οΈπŸ’ ume: Easy, self-hostable, and flexible image host made in Rust
// Copyright 2021-2023 Noel Towa <[email protected]>
// Copyright 2021-2024 Noel Towa <[email protected]>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/generate/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// πŸ»β€β„οΈπŸ’ ume: Easy, self-hostable, and flexible image host made in Rust
// Copyright 2021-2023 Noel Towa <[email protected]>
// Copyright 2021-2024 Noel Towa <[email protected]>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/generate/sharex.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// πŸ»β€β„οΈπŸ’ ume: Easy, self-hostable, and flexible image host made in Rust
// Copyright 2021-2023 Noel Towa <[email protected]>
// Copyright 2021-2024 Noel Towa <[email protected]>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// πŸ»β€β„οΈπŸ’ ume: Easy, self-hostable, and flexible image host made in Rust
// Copyright 2021-2023 Noel Towa <[email protected]>
// Copyright 2021-2024 Noel Towa <[email protected]>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/openapi.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// πŸ»β€β„οΈπŸ’ ume: Easy, self-hostable, and flexible image host made in Rust
// Copyright 2021-2023 Noel Towa <[email protected]>
// Copyright 2021-2024 Noel Towa <[email protected]>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit e3b9d59

Please sign in to comment.