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/README.md b/README.md index 6a99152..2f1e270 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ # How to publish a new version ``` -# On PubSolarOS, if you haven't setup minio-client yet -nix shell latest#minio-client -# On NixOS: -nix shell nixpkgs#minio-client +# Install dependencies: +# On PubSolarOS: +direnv allow + +# With the nix package manager installed: +nix develop # On other systems: https://github.com/minio/mc/ mc alias set \ diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..061db8d --- /dev/null +++ b/flake.lock @@ -0,0 +1,67 @@ +{ + "nodes": { + "devshell": { + "inputs": { + "flake-utils": [ + "flake-utils" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1678957337, + "narHash": "sha256-Gw4nVbuKRdTwPngeOZQOzH/IFowmz4LryMPDiJN/ah4=", + "owner": "numtide", + "repo": "devshell", + "rev": "3e0e60ab37cd0bf7ab59888f5c32499d851edb47", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, + "flake-utils": { + "locked": { + "lastModified": 1678901627, + "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1679944645, + "narHash": "sha256-e5Qyoe11UZjVfgRfwNoSU57ZeKuEmjYb77B9IVW7L/M=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "4bb072f0a8b267613c127684e099a70e1f6ff106", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "devshell": "devshell", + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..a613bd3 --- /dev/null +++ b/flake.nix @@ -0,0 +1,30 @@ +{ + description = "devs & ops environment for nix'ing with triton"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + + flake-utils.url = "github:numtide/flake-utils"; + + devshell.url = "github:numtide/devshell"; + devshell.inputs.flake-utils.follows = "flake-utils"; + devshell.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = { self, flake-utils, devshell, nixpkgs }: + flake-utils.lib.simpleFlake { + inherit self nixpkgs; + name = "infra-project"; + overlay = devshell.overlays.default; + shell = { pkgs }: + pkgs.devshell.mkShell { + # Add additional packages you'd like to be available in your devshell + # PATH here + devshell.packages = with pkgs; [ + minio-client + ]; + bash.extra = '' + ''; + }; + }; +}