commit 29d691ce95e748dc235bf07c01e2b2da999ffb7f Author: Savanni D'Gerinel Date: Sat Nov 26 21:08:13 2022 -0500 Initialize the repository diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..92b2793 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.direnv diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..f6af3c8 --- /dev/null +++ b/flake.lock @@ -0,0 +1,73 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1669418739, + "narHash": "sha256-T86oFvcUIRwHWBWUt7WjaP4BP/3lDGbv5AppQSI1FkI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "695b3515251873e0a7e2021add4bba643c56cde3", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-22.05", + "type": "indirect" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1665296151, + "narHash": "sha256-uOB0oxqxN9K7XGF1hcnY+PQnlQJ+3bP2vCn/+Ru/bbc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "14ccaaedd95a488dd7ae142757884d8e125b3363", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "oxalica": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "narHash": "sha256-xMOq9ifVo63/aBA1VIHQQ4riuRJGyup7F1orjekAwpk=", + "type": "tarball", + "url": "https://github.com/oxalica/rust-overlay/archive/master.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/oxalica/rust-overlay/archive/master.tar.gz" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "oxalica": "oxalica" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..3b99aea --- /dev/null +++ b/flake.nix @@ -0,0 +1,30 @@ +{ + description = "Advent of Code"; + + inputs = { + nixpkgs.url = "nixpkgs/nixos-22.05"; + oxalica.url = "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"; + }; + + outputs = { self, nixpkgs, oxalica }: + let + version = builtins.string 0 8 self.lastModifiedDate; + supportedSystems = [ "x86_64-linux" ]; + in + { + devShell."x86_64-linux" = + let + rust_overlay = import oxalica; + pkgs = import nixpkgs { system = "x86_64-linux"; overlays = [ rust_overlay ]; }; + rust = pkgs.rust-bin.stable."1.65.0".default.override { + extensions = [ "rust-src" ]; + }; + in + pkgs.mkShell { + name = "aoc-devshell"; + buildInputs = [ + rust + ]; + }; + }; +}