From ef8441db265057003dfd8b5d982128ae238bed55 Mon Sep 17 00:00:00 2001 From: Ricard Illa Date: Sun, 8 Jan 2023 17:42:17 +0100 Subject: [PATCH] nix shell added --- .envrc | 4 ++++ .gitignore | 1 + flake.lock | 43 +++++++++++++++++++++++++++++++++++++++++++ flake.nix | 15 +++++++++++++++ 4 files changed, 63 insertions(+) create mode 100644 .envrc create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..1305de8 --- /dev/null +++ b/.envrc @@ -0,0 +1,4 @@ +if ! has nix_direnv_version || ! nix_direnv_version 2.2.0; then + source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.0/direnvrc" "sha256-5EwyKnkJNQeXrRkYbwwRBcXbibosCJqyIUuz9Xq+LRc=" +fi +use flake diff --git a/.gitignore b/.gitignore index 85a285e..bc73e5d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ gitolite/.env ansible/.env ansible/known_hosts */out/image-name +.direnv diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..3b9b403 --- /dev/null +++ b/flake.lock @@ -0,0 +1,43 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1673027386, + "narHash": "sha256-Wjt+oDhRLcf3opIjUKHGN+Xrp3w2ZDms6bO4pCLvsco=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b3818a46e686f24561a28eaa9fcf35e18b8d8e89", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..af2cadb --- /dev/null +++ b/flake.nix @@ -0,0 +1,15 @@ +{ + description = "A basic flake with a shell"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-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 { + devShells.default = pkgs.mkShell { + nativeBuildInputs = [ pkgs.podman pkgs.buildah pkgs.skopeo ]; + buildInputs = [ ]; + }; + }); +}