-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
62 lines (59 loc) · 1.81 KB
/
Copy pathflake.nix
File metadata and controls
62 lines (59 loc) · 1.81 KB
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
56
57
58
59
60
61
62
# ~/~ begin <<docs/developer-environment.md#flake.nix>>[init]
{
description = ''
# ~/~ begin <<docs/developer-environment.md#flake-description>>[init]
Practice typing passwords by comparing them to their hashes.
Can practice multiple passwords by providing a description
that identifies each password hash. Can be a hint.
Never type a password incorrectly again (after some practice)!
# ~/~ end
'';
inputs = {
# ~/~ begin <<docs/developer-environment.md#flake-inputs>>[init]
flake-utils.url = "github:numtide/flake-utils";
# ~/~ end
# ~/~ begin <<docs/developer-environment.md#flake-inputs>>[1]
nixpkgs.url = "github:nixos/nixpkgs/24.11";
# ~/~ end
};
outputs =
{
# ~/~ begin <<docs/developer-environment.md#flake-output-args>>[init]
flake-utils,
# ~/~ end
# ~/~ begin <<docs/developer-environment.md#flake-output-args>>[1]
nixpkgs,
# ~/~ end
self,
}:
# ~/~ begin <<docs/developer-environment.md#flake-output-body>>[init]
flake-utils.lib.eachDefaultSystem (
system:
# ~/~ begin <<docs/developer-environment.md#flake-utils-body>>[init]
let
pkgs = import nixpkgs { inherit system; };
in
{
devShells.default = pkgs.mkShellNoCC {
packages = with pkgs; [
# ~/~ begin <<docs/developer-environment.md#dev-shells-pkgs>>[init]
go
python312
tmux
virtualenv
# ~/~ end
];
shellHook = ''
# ~/~ begin <<docs/developer-environment.md#dev-shells-shell-hook>>[init]
virtualenv -p312 venv
source ./venv/bin/activate
pip install -qr requirements.txt
# ~/~ end
'';
};
}
# ~/~ end
);
# ~/~ end
}
# ~/~ end