diff --git a/.gitignore b/.gitignore index 45e814f..3195e6f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,15 @@ * +!src/ + !.gitignore +!*.css +!*.js +!*.rs + +!*.lock +!*.nix + !*.md +!*.toml diff --git a/.rustfmt.toml b/.rustfmt.toml new file mode 100644 index 0000000..02d5415 --- /dev/null +++ b/.rustfmt.toml @@ -0,0 +1,19 @@ +condense_wildcard_suffixes = true +enum_discrim_align_threshold = 25 +force_explicit_abi = false +force_multiline_blocks = true +format_code_in_doc_comments = true +format_macro_matchers = true +format_strings = true +group_imports = "StdExternalCrate" +hex_literal_case = "Upper" +imports_granularity = "Crate" +imports_layout = "Vertical" +match_block_trailing_comma = true +newline_style = "Unix" +normalize_comments = true +normalize_doc_attributes = true +reorder_impl_items = true +unstable_features = true +use_try_shorthand = true +wrap_comments = true diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..4be1193 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "site" +description = "The official website and link portal of RGBCube and his work." +authors = [ "RGBCube" ] +license = "GPL" +version = "0.0.1" +homepage = "https://rgbcube.github.io" +repositoty = "https://github.com/RGBCube/rgbcube.github.io" +edition = "2021" + +[dependencies] diff --git a/README.md b/README.md index 8987d34..a72b708 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # RGBCube's Homepage +The official website and link portal of RGBCube and his work. + ## Running Simply run `nix run`. This will run the page at `0.0.0.0:80`. diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..326f037 --- /dev/null +++ b/flake.lock @@ -0,0 +1,128 @@ +{ + "nodes": { + "cargo2nix": { + "inputs": { + "flake-compat": "flake-compat", + "flake-utils": [ + "flake-utils" + ], + "nixpkgs": [ + "nixpkgs" + ], + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1699033427, + "narHash": "sha256-OVtd5IPbb4NvHibN+QvMrMxq7aZN5GFoINZSAXKjUdA=", + "owner": "cargo2nix", + "repo": "cargo2nix", + "rev": "c6f33051f412352f293e738cc8da6fd4c457080f", + "type": "github" + }, + "original": { + "owner": "cargo2nix", + "repo": "cargo2nix", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1703438236, + "narHash": "sha256-aqVBq1u09yFhL7bj1/xyUeJjzr92fXVvQSSEx6AdB1M=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5f64a12a728902226210bf01d25ec6cbb9d9265b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "cargo2nix": "cargo2nix", + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "rust-overlay": { + "inputs": { + "flake-utils": [ + "cargo2nix", + "flake-utils" + ], + "nixpkgs": [ + "cargo2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1697336027, + "narHash": "sha256-ctmmw7j4liyfSh63v9rdFZeIoNYCkCvgqvtEOB7KhX8=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "e494404d36a41247987eeb1bfc2f1ca903e97764", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ca9bff8 --- /dev/null +++ b/flake.nix @@ -0,0 +1,45 @@ +{ + description = "The official website and link portal of RGBCube and his work."; + + nixConfig = { + extra-substituters = "https://cache.garnix.io/"; + extra-trusted-public-keys = "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="; + }; + + inputs = { + nixpkgs = { + url = "github:NixOS/nixpkgs/nixos-unstable"; + }; + + flake-utils = { + url = "github:numtide/flake-utils"; + }; + + cargo2nix = { + url = "github:cargo2nix/cargo2nix"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.flake-utils.follows = "flake-utils"; + }; + }; + + outputs = { nixpkgs, flake-utils, cargo2nix, ... } @ inputs: flake-utils.lib.eachDefaultSystem (system: let + pkgs = import nixpkgs { + inherit system; + overlays = [ cargo2nix.overlays.default ]; + }; + + rustPackages = pkgs.rustBuilder.makePackageSet { + rustVersion = "1.76.0"; + rustChannel = "nightly"; + rustProfile = "minimal"; + packageFun = import ./Cargo.nix; + }; + in rec { + devShells.default = rustPackages.workspaceShell { + packages = [ cargo2nix.packages.${system}.default ]; + }; + + packages.site = rustPackages.workspace.site {}; + packages.default = packages.site; + }); +} diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}