From 6290842dc61dc0c747dc4e2b8724fd054dd82c0f Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Mon, 2 Oct 2023 00:37:13 -0700 Subject: initial --- base/.envrc | 1 + base/.gitignore | 2 ++ base/flake.lock | 27 +++++++++++++++++++++++++++ base/flake.nix | 26 ++++++++++++++++++++++++++ 4 files changed, 56 insertions(+) create mode 100644 base/.envrc create mode 100644 base/.gitignore create mode 100644 base/flake.lock create mode 100644 base/flake.nix (limited to 'base') diff --git a/base/.envrc b/base/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/base/.envrc @@ -0,0 +1 @@ +use flake diff --git a/base/.gitignore b/base/.gitignore new file mode 100644 index 0000000..bb52c64 --- /dev/null +++ b/base/.gitignore @@ -0,0 +1,2 @@ +*.swp +/.direnv diff --git a/base/flake.lock b/base/flake.lock new file mode 100644 index 0000000..d3c5dbe --- /dev/null +++ b/base/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1696039360, + "narHash": "sha256-g7nIUV4uq1TOVeVIDEZLb005suTWCUjSY0zYOlSBsyE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "32dcb45f66c0487e92db8303a798ebc548cadedc", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/base/flake.nix b/base/flake.nix new file mode 100644 index 0000000..c75725e --- /dev/null +++ b/base/flake.nix @@ -0,0 +1,26 @@ +{ + inputs = { + nixpkgs = { + type = "github"; + owner = "NixOS"; + repo = "nixpkgs"; + ref = "nixos-23.05"; + }; + }; + + outputs = { self, nixpkgs }: + let supportedSystems = [ "aarch64-linux" "x86_64-linux" ]; + forAllSystems = nixpkgs.lib.genAttrs supportedSystems; + nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; }); + in { + devShells = forAllSystems (system: let pkgs = nixpkgsFor.${system}; in { + default = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ + cargo + rustc + ]; + }; + }); + }; +} + -- cgit 1.4.1