Website Summary Files Commits Branches @commit @diff @stats
path: root / flake.nix
diff options
context:
space:
mode:
Commitf7f8447a7a57c19bcbd4d48ca72a9963298436cc (patch)
Author
 Syndamia <kamen@syndamia.com>
2024-12-07 14:44:27 +0200
Committer
 Syndamia <kamen@syndamia.com>
2024-12-07 14:44:27 +0200
Files230a0b163208993c95894ebd87ae086fe25ec93e /flake.nix
tonkobali-f7f8447a7a57c19bcbd4d48ca72a9963298436cc.tar
tonkobali-f7f8447a7a57c19bcbd4d48ca72a9963298436cc.tar.gz
tonkobali-f7f8447a7a57c19bcbd4d48ca72a9963298436cc.zip
Parent6fd75732d598d50d7bb56a16e03ffd2cd2dfb637 (diff)
feat!: Initial rust structure and flake
1 files changed, 31 insertions, 0 deletions
-rw-r--r--flake.nix31
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..f6e5e01
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,31 @@
+{
+ inputs = {
+ nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
+ };
+
+ outputs = { nixpkgs, ... }:
+ let
+ # Taken from lib.systems.doubles.all
+ systems = [ "x86_64-linux" "aarch64-linux" ];
+
+ inherit (nixpkgs) lib;
+
+ forAllSystems = config:
+ lib.foldl
+ lib.recursiveUpdate
+ {}
+ (builtins.map
+ (system:
+ builtins.mapAttrs
+ (_: value: { ${system} = value; })
+ (config (import nixpkgs { inherit system; })))
+ systems);
+
+ in forAllSystems (pkgs: {
+ devShells.default = pkgs.mkShell {
+ nativeBuildInputs = with pkgs; [
+ cargo
+ ];
+ };
+ });
+}