diff options
| author | spl3g <spleefer6@yandex.ru> | 2025-03-11 21:46:29 +0300 |
|---|---|---|
| committer | spl3g <spleefer6@yandex.ru> | 2025-03-11 21:46:29 +0300 |
| commit | 729bbab9d554567366b30cbc24e91070e131fc04 (patch) | |
| tree | 31bf680620eab21c38b560a5022903f2b3a2cfc8 | |
Ready. Set. Go!
| -rw-r--r-- | .envrc | 1 | ||||
| -rw-r--r-- | flake.lock | 25 | ||||
| -rw-r--r-- | flake.nix | 44 |
3 files changed, 70 insertions, 0 deletions
@@ -0,0 +1 @@ +use flake diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..b2c4970 --- /dev/null +++ b/flake.lock @@ -0,0 +1,25 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1741173522, + "narHash": "sha256-k7VSqvv0r1r53nUI/IfPHCppkUAddeXn843YlAC5DR0=", + "rev": "d69ab0d71b22fa1ce3dbeff666e6deb4917db049", + "revCount": 762848, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.762848%2Brev-d69ab0d71b22fa1ce3dbeff666e6deb4917db049/0195698a-02df-791f-8cd3-d10c16d442f0/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..7bb23bb --- /dev/null +++ b/flake.nix @@ -0,0 +1,44 @@ +{ + description = "An empty flake template that you can adapt to your own environment"; + + # Flake inputs + inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz"; + + # Flake outputs + outputs = { self, nixpkgs }: + let + # The systems supported for this flake + supportedSystems = [ + "x86_64-linux" # 64-bit Intel/AMD Linux + "aarch64-linux" # 64-bit ARM Linux + "x86_64-darwin" # 64-bit Intel macOS + "aarch64-darwin" # 64-bit ARM macOS + ]; + + # Helper to provide system-specific attributes + forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { + pkgs = import nixpkgs { inherit system; }; + }); + in + { + devShells = forEachSupportedSystem ({ pkgs }: { + default = pkgs.mkShell { + # The Nix packages provided in the environment + # Add any you need here + packages = with pkgs; [ + gcc + stdenv.cc + man-pages + gdb + ]; + + # Set any environment variables for your dev shell + env = { }; + + # Add any shell logic you want executed any time the environment is activated + shellHook = '' + ''; + }; + }); + }; +} |
