aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDustin Sallings <[email protected]>2024-02-17 09:41:04 -1000
committerGitHub <[email protected]>2024-02-17 09:41:04 -1000
commit3c4328b423ba54ec9484f9ec270a05e9a0bf4b35 (patch)
treea73337c374c98dc53736aabdf3c12314217433c2
parente8d65dbd875bfdf9e11e99370e24b9ee35c2c101 (diff)
nix config (#17)
-rw-r--r--.envrc4
-rw-r--r--.gitignore1
-rw-r--r--flake.lock59
-rw-r--r--flake.nix15
-rw-r--r--shell.nix15
5 files changed, 94 insertions, 0 deletions
diff --git a/.envrc b/.envrc
new file mode 100644
index 0000000..fb30e6c
--- /dev/null
+++ b/.envrc
@@ -0,0 +1,4 @@
+# shellcheck shell=bash
+set -eu
+
+use flake
diff --git a/.gitignore b/.gitignore
index ff86dbb..49a0935 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
+/.direnv
go.work*
diff --git a/flake.lock b/flake.lock
new file mode 100644
index 0000000..cb79afe
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,59 @@
+{
+ "nodes": {
+ "flake-utils": {
+ "inputs": {
+ "systems": "systems"
+ },
+ "locked": {
+ "lastModified": 1705309234,
+ "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1707451808,
+ "narHash": "sha256-UwDBUNHNRsYKFJzyTMVMTF5qS4xeJlWoeyJf+6vvamU=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "442d407992384ed9c0e6d352de75b69079904e4e",
+ "type": "github"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "type": "indirect"
+ }
+ },
+ "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..5aa67d3
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,15 @@
+{
+ description = "GoProFS";
+ nixConfig.bash-prompt = "\[gopro-fs\]$ ";
+
+ inputs.flake-utils.url = "github:numtide/flake-utils";
+
+ outputs = { self, nixpkgs, flake-utils }:
+ flake-utils.lib.eachDefaultSystem
+ (system:
+ let pkgs = nixpkgs.legacyPackages.${system}; in
+ {
+ devShells.default = import ./shell.nix { inherit pkgs; };
+ }
+ );
+}
diff --git a/shell.nix b/shell.nix
new file mode 100644
index 0000000..ed86dde
--- /dev/null
+++ b/shell.nix
@@ -0,0 +1,15 @@
+{ pkgs ? import <nixpkgs> { } }:
+with pkgs;
+mkShell {
+ buildInputs = [
+ go
+ gotools
+ esptool
+ protobuf
+ protoc-gen-go
+ ];
+
+ shellHook = ''
+ PATH=$PATH:$HOME/stuff/tinygo/bin
+ '';
+}