-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.nix
55 lines (54 loc) · 1.33 KB
/
shell.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Shell for bootstrapping flake-enabled nix and home-manager
# You can enter it through 'nix develop' or (legacy) 'nix-shell'
{ pkgs ? (import ./nixpkgs.nix) { }, system, lib, ... }:
let
rustpkg = pkgs.rust-bin.stable.latest.default.override {
extensions = [ "rust-src" ];
};
rustPackages = with pkgs; [
rustpkg
openssl
pkg-config
cargo-deny
cargo-edit
cargo-watch
rust-analyzer
cmake
];
in
{
default = pkgs.mkShell {
# Enable experimental features without having to specify the argument
NIX_CONFIG = "experimental-features = nix-command flakes";
JUST_UNSTABLE = "true"; #Must be enabled for just modules to work
env = {
# Required by rust-analyzer
RUST_SRC_PATH = "${rustpkg}/lib/rustlib/src/rust/library";
};
nativeBuildInputs = with pkgs; [
nix
home-manager
git
git-crypt
gnupg
pinentry
just
qemu
zstd
terraform
nixd
alejandra
agenix-rekey
age-plugin-yubikey
age-plugin-fido2-hmac
] ++ lib.optional (lib.hasInfix system == "linux") [
pkgs.quickemu
pkgs.qemu
(pkgs.writeShellScriptBin "qemu-system-x86_64-uefi" ''
${pkgs.qemu}/bin/qemu-system-x86_64 \
-bios ${pkgs.OVMF.fd}/FV/OVMF.fd \
"$@"
'')
] ++ rustPackages;
};
}