1
0
Fork 0
mirror of https://codeberg.org/icewind/shelve.git synced 2026-06-03 12:04:09 +02:00
This commit is contained in:
Robin Appelman 2025-06-02 21:00:23 +02:00
commit d3d50bfb2c
6 changed files with 56 additions and 51 deletions

View file

@ -4,22 +4,27 @@ Quick and easy file hosting
![Shelve UI](screenshots/shelve.png) ![Shelve UI](screenshots/shelve.png)
Shelve is intended to be an easy way to share files with a friend, just drag in
a file and copy the link.
## Tokens ## Tokens
Upload tokens are configured by setting the `TOKENS` environment variable to a comma separated list. Upload tokens are configured by setting the `TOKENS` environment variable to a
comma separated list.
## License ## License
Licensed under either of Licensed under either of
- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or https://www.apache.org/licenses/LICENSE-2.0) - Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
- MIT license ([LICENSE-MIT](LICENSE-MIT) or https://opensource.org/licenses/MIT) https://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](LICENSE-MIT) or
https://opensource.org/licenses/MIT)
at your option. at your option.
### Contribution ### Contribution
Unless you explicitly state otherwise, any contribution intentionally Unless you explicitly state otherwise, any contribution intentionally submitted
submitted for inclusion in the work by you, as defined in the Apache-2.0 for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
license, shall be dual licensed as above, without any additional terms or dual licensed as above, without any additional terms or conditions.
conditions.

View file

@ -1,6 +1,6 @@
{ dockerTools {
, shelve dockerTools,
, shelve,
}: }:
dockerTools.buildLayeredImage { dockerTools.buildLayeredImage {
name = "icewind1991/shelve"; name = "icewind1991/shelve";

View file

@ -10,16 +10,17 @@
inputs.flakelight.follows = "flakelight"; inputs.flakelight.follows = "flakelight";
}; };
}; };
outputs = { mill-scale, ... }: mill-scale ./. { outputs = {mill-scale, ...}:
mill-scale ./. {
extraPaths = [ extraPaths = [
./templates ./templates
]; ];
nixosModules = {outputs, ...}: { nixosModules = {outputs, ...}: {
default = default = {
{ pkgs pkgs,
, config config,
, lib lib,
, ... ...
}: { }: {
imports = [./nix/module.nix]; imports = [./nix/module.nix];
config = lib.mkIf config.services.shelve.enable { config = lib.mkIf config.services.shelve.enable {

View file

@ -1,12 +1,12 @@
{ config {
, lib config,
, pkgs lib,
, ... pkgs,
...
}: }:
with lib; let with lib; let
cfg = config.services.shelve; cfg = config.services.shelve;
in in {
{
options.services.shelve = { options.services.shelve = {
enable = mkEnableOption "Enables the shelve service"; enable = mkEnableOption "Enables the shelve service";

View file

@ -1,9 +1,8 @@
{ stdenv {
, rustPlatform stdenv,
, lib rustPlatform,
, lib,
}: }: let
let
inherit (lib.sources) sourceByRegex; inherit (lib.sources) sourceByRegex;
inherit (builtins) fromTOML readFile; inherit (builtins) fromTOML readFile;
src = sourceByRegex ../. ["Cargo.*" "(src|templates)(/.*)?"]; src = sourceByRegex ../. ["Cargo.*" "(src|templates)(/.*)?"];