mirror of
https://github.com/youwen5/nix-dev-envs.git
synced 2024-11-24 18:33:50 -08:00
initial commit
This commit is contained in:
commit
2eb9502171
2 changed files with 215 additions and 0 deletions
96
flake.lock
Normal file
96
flake.lock
Normal file
|
@ -0,0 +1,96 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1723637854,
|
||||
"narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c3aa7b8938b17aebd2deecf7be0636000d62a2b9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1718428119,
|
||||
"narHash": "sha256-WdWDpNaq6u1IPtxtYHHWpl5BmabtpmLnMAx0RdJ/vo8=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e6cea36f83499eb4e9cd184c8a8e823296b50ad5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"rust-overlay": "rust-overlay"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723947704,
|
||||
"narHash": "sha256-TcVf66N2NgGhxORFytzgqWcg0XJ+kk8uNLNsTRI5sYM=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "456e78a55feade2c3bc6d7bc0bf5e710c9d86120",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
119
flake.nix
Normal file
119
flake.nix
Normal file
|
@ -0,0 +1,119 @@
|
|||
{
|
||||
description = "Flake for various development environments.";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
rust-overlay,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system: let
|
||||
overlays = [(import rust-overlay)];
|
||||
pkgs = import nixpkgs {
|
||||
inherit system overlays;
|
||||
};
|
||||
in {
|
||||
devShells = {
|
||||
go = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
go
|
||||
];
|
||||
};
|
||||
|
||||
zig = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
zig
|
||||
];
|
||||
};
|
||||
|
||||
pythonPoetry = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
poetry
|
||||
];
|
||||
};
|
||||
|
||||
haskellStack = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
haskellPackages.stack
|
||||
];
|
||||
};
|
||||
|
||||
haskellCabal = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
haskellPackages.cabal-install
|
||||
ghc
|
||||
];
|
||||
};
|
||||
|
||||
rustBeta = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
rust-bin.beta.latest.default
|
||||
];
|
||||
};
|
||||
|
||||
rustNightly = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
rust-bin.nightly.latest.default
|
||||
];
|
||||
};
|
||||
|
||||
rustStable = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
rust-bin.stable.latest.default
|
||||
];
|
||||
};
|
||||
|
||||
npmNode = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
nodejs
|
||||
nodePackages_latest.npm
|
||||
nodePackages_latest.prettier
|
||||
];
|
||||
};
|
||||
|
||||
pnpmNode = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
nodejs
|
||||
nodePackages_latest.pnpm
|
||||
nodePackages_latest.prettier
|
||||
];
|
||||
};
|
||||
|
||||
yarnNode = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
nodejs
|
||||
nodePackages_latest.yarn
|
||||
nodePackages_latest.prettier
|
||||
];
|
||||
};
|
||||
|
||||
typst = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
typst
|
||||
typstfmt
|
||||
tinymist
|
||||
];
|
||||
};
|
||||
|
||||
latexFull = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
texliveFull
|
||||
];
|
||||
};
|
||||
|
||||
latexMinimal = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
texliveMinimal
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
Loading…
Reference in a new issue