vic/aoc-devenv-template
{ "defaultBranch": "main", "description": "Template for starting Advent Of Code using Nix devenv.", "fullName": "vic/aoc-devenv-template", "homepage": "", "language": "Nix", "name": "aoc-devenv-template", "pushedAt": "2023-12-01T18:12:15Z", "stargazersCount": 2, "updatedAt": "2023-12-03T05:27:11Z", "url": "https://github.com/vic/aoc-devenv-template"}Template for starting Advent Of Code using Nix devenv.
Section titled “Template for starting Advent Of Code using Nix devenv.”-
Enable the Languages you are using by editing
flakeModules/default.nix.You can also add unlisted languages if they package is available at nixpkgs. There’s also an example of a custom language derivation (see
flakeModules/flix). -
Enter the environment.
If you have direnv already installed, this repo includes an
.envrcfile to load the default devenv. Otherwise you might want to run:nix develop --impure. -
Use the aoc-cli to retrieve and submit your puzzles.
Login at adventofcode.com and download the value of your
sessioncookie to~/.adventofcode.session.Use
aoc calendarto confirm you can use the API. -
Start coding a puzzle.
Use
just init <lang> <day>to create language project for that day puzzle. e.g.just init rust 1will create a rust project underday1/rustand provide the puzzle input. -
Get fun.
Use
just watch <lang> <day>to run your project on changes. -
Submit your answer.
Use
aoc submit --day <DAY> <PART> <ANSWER>