commit 4f286742bbd5ce165560355194466887819a4c35 Author: efim Date: Fri Dec 1 08:31:47 2023 +0000 init 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..29963da --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/.direnv/ diff --git a/.go/pkg/mod/cache/lock b/.go/pkg/mod/cache/lock new file mode 100644 index 0000000..e69de29 diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..aa98498 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1701253981, + "narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "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..8069776 --- /dev/null +++ b/flake.nix @@ -0,0 +1,24 @@ +{ + description = "my advent of code 2023 exercises"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in rec { + devShells.default = pkgs.mkShell { + buildInputs = [ + pkgs.go + pkgs.wgo + pkgs.semgrep + pkgs.gopls + ]; + shellHook = '' + export GOPATH=$PWD/.go + export PATH=$GOPATH/bin:$PATH + ''; + }; + }); +} diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..2c193a9 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module sunshine.industries/aoc2023 + +go 1.21.4 diff --git a/main.go b/main.go new file mode 100644 index 0000000..26816b3 --- /dev/null +++ b/main.go @@ -0,0 +1,8 @@ +package main + +import "fmt" + +func main() { + s := "yoyo" + fmt.Printf("hello, %s\n", s) +}