-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathflake.nix
More file actions
116 lines (106 loc) · 2.98 KB
/
flake.nix
File metadata and controls
116 lines (106 loc) · 2.98 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
{
description = "doughnut development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
config = {
allowUnfree = true;
permittedInsecurePackages = [];
substituteOnDestination = true;
# Use specific binary caches
binaryCaches = [
"https://cache.nixos.org"
"https://nixcache.reflex-frp.org"
];
trusted-binary-caches = [
"https://cache.nixos.org"
"https://nixcache.reflex-frp.org"
];
};
};
inherit (pkgs) stdenv lib;
apple_sdk = pkgs.darwin.apple_sdk.frameworks;
cursorDevEnv = builtins.getEnv "CURSOR_DEV";
pythonDevEnv = builtins.getEnv "PYTHON_DEV";
pythonDev = pythonDevEnv == "true";
poetryPath = "${pkgs.poetry}/bin";
pythonPackages = if pythonDev then [
pkgs.python314
pkgs.poetry
pkgs.python314Packages.pip
pkgs.python314Packages.setuptools
pkgs.python314Packages.wheel
] else [];
basePackages = with pkgs; [
zulu25
nodejs_24
corepack_24
fzf
git-secret
gitleaks
jq
mysql_jdbc
mysql84
mariadb.client
redis
yamllint
nixfmt-classic
hclfmt
trash-cli
];
darwinPackages = with pkgs; lib.optionals stdenv.isDarwin [ sequelpro ];
linuxPackages = with pkgs; lib.optionals (!stdenv.isDarwin) [
psmisc
xclip
];
linuxCypressPackages = with pkgs; lib.optionals (!stdenv.isDarwin) [
xorg.xorgserver
xorg.xauth
xorg.libX11
xorg.libXcomposite
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXi
xorg.libXrandr
xorg.libXrender
xorg.libXtst
xorg.libXScrnSaver
xorg.libxshmfence
gtk3
gtk2
glib
nss
alsa-lib
atk
at-spi2-atk
libdrm
dbus
expat
mesa
nspr
udev
cups
pango
cairo
];
in {
devShells.default = pkgs.mkShell {
name = "doughnut";
nativeBuildInputs = with pkgs; [ autoPatchelfHook ];
buildInputs = basePackages ++ darwinPackages ++ linuxPackages;
# Force binary substitutes for the shell
preferLocalBuild = false;
allowSubstitutes = true;
shellHook = ''
source ./scripts/nix_shell_hook.sh "${pkgs.fzf}" "${pkgs.mysql84}" "${pkgs.redis}" "${poetryPath}"
'';
};
});
}