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/flake.lock b/flake.lock new file mode 100644 index 0000000..d4d2a47 --- /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": 1698846319, + "narHash": "sha256-4jyW/dqFBVpWFnhl0nvP6EN4lP7/ZqPxYRjl6var0Oc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "34bdaaf1f0b7fb6d9091472edc968ff10a8c2857", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.05", + "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..9d68939 --- /dev/null +++ b/flake.nix @@ -0,0 +1,36 @@ +{ + description = "Horus"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + with nixpkgs.legacyPackages.${system}; + { + devShells.default = mkShell { + packages = [ + ansible + ansible-lint + git + gnumake + k9s + kubectl + neovim + oci-cli + openssh + pre-commit + shellcheck + terraform + yamllint + + (python3.withPackages (p: with p; [ + kubernetes + ])) + ]; + }; + } + ); +} diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 325e3d5..0000000 --- a/shell.nix +++ /dev/null @@ -1,27 +0,0 @@ -# https://status.nixos.org (nixos-22.11) -{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/a558f7ac29f5.tar.gz") {} }: - -let - python-packages = pkgs.python3.withPackages (p: with p; [ - kubernetes - ]); -in -pkgs.mkShell { - buildInputs = with pkgs; [ - ansible - ansible-lint - git - gnumake - k9s - kubectl - neovim - oci-cli - openssh - pre-commit - shellcheck - terraform - yamllint - - python-packages - ]; -}