summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorseth <[email protected]>2023-05-01 21:01:55 -0400
committerseth <[email protected]>2023-05-01 21:01:55 -0400
commit22c6199166e343d950e37029041cf7d251b903c1 (patch)
tree08d2773339694973ee85d5ec09f315ba8b42f39f /flake.nix
parent51db12fc7ab97a84be007c3d7f3771accbabeb84 (diff)
feat: add nix flake
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..74ffdfb
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,39 @@
+{
+ description = "getchoo's modpack";
+
+ inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
+
+ outputs = {
+ self,
+ nixpkgs,
+ }: let
+ version = self.lastModifiedDate;
+ systems = [
+ "x86_64-linux"
+ "aarch64-linux"
+ "x86_64-darwin"
+ "aarch64-darwin"
+ ];
+
+ forAllSystems = nixpkgs.lib.genAttrs systems;
+ nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;});
+ in {
+ packages = forAllSystems (s: let
+ pkgs = nixpkgsFor.${s};
+ in {
+ getchoo-modpack = pkgs.callPackage ./nix {inherit version;};
+ });
+
+ devShells = forAllSystems (s: let
+ pkgs = nixpkgsFor.${s};
+ inherit (pkgs) mkShell;
+ in {
+ default = mkShell {
+ packages = with pkgs; [
+ packwiz
+ p7zip
+ ];
+ };
+ });
+ };
+}