From b0c2825c6ba838d53d8aa5a2bad26b33050d0a8a Mon Sep 17 00:00:00 2001 From: dichgrem Date: Mon, 4 Aug 2025 19:10:59 +0800 Subject: [PATCH] feat:add_flake --- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 21 +++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..f7eda9a --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1754278406, + "narHash": "sha256-jvIQTMN5EzoOP5RaGztpVese8a3wqy0M/h6tNzycW28=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6a489c9482ca676ce23c0bcd7f2e1795383325fa", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..1f353c5 --- /dev/null +++ b/flake.nix @@ -0,0 +1,21 @@ +{ + description = "A Nix-flake-based development environment"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + outputs = { self, nixpkgs }: + let + supportedSystems = [ "x86_64-linux" "aarch64-linux" ]; + forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { + pkgs = import nixpkgs { inherit self system; }; + }); + in + { + devShells = forEachSupportedSystem ({ pkgs }: { + default = pkgs.mkShell { + packages = with pkgs; [ + pagefind + zola + ]; + }; + }); + }; +}