-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
87 lines (85 loc) · 2.71 KB
/
Copy pathflake.nix
File metadata and controls
87 lines (85 loc) · 2.71 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
{
description = "Central repository of all giza builds";
nixConfig = {
max-jobs = 32;
http-connections = 128;
max-substitution-jobs = 128;
substituters = [
"https://cache.nixos.org?priority=1"
"https://nix-community.cachix.org?priority=2"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
# This setting, when true, tries to use symlinks to optimise storage use between nix derivations.
# However, on MacOS, it sometimes runs into issues, and causes stuff to build from scratch...
# Which is strictly worse than using some extra storage sometimes. So we'll force it to false.
auto-optimise-store = false;
};
inputs = {
flake-utils.url = "github:numtide/flake-utils";
flake-parts.url = "github:hercules-ci/flake-parts";
napalm = {
url = "github:nix-community/napalm";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
};
nixpkgs.url = "github:NixOS/nixpkgs/master";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
crane = {
url = "github:ipetkov/crane";
};
};
outputs = inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
imports = [
];
perSystem = { config, self', inputs', pkgs, system, ... }:
let
linuxSystem = builtins.replaceStrings [ "darwin" ] [ "linux" ] system;
in
{
_module.args.linuxSystem = linuxSystem;
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = import ./overlay.nix inputs;
config = {
allowUnfree = true;
allowUnsupportedSystem = true;
permittedInsecurePackages = [
"openssl-1.1.1w"
];
};
};
_module.args.pkgsLinux = import inputs.nixpkgs {
system = linuxSystem;
overlays = import ./overlay.nix inputs;
config = {
allowUnfree = true;
allowUnsupportedSystem = true;
permittedInsecurePackages = [
"openssl-1.1.1w"
];
};
};
legacyPackages.nixpkgs = pkgs;
devShells.default = pkgs.mkShell {
packages = with pkgs;[
ruby_3_3
bundler
rust-analyzer-unwrapped
rust-dev-toolchain
];
};
};
};
}