-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
117 lines (95 loc) · 4.41 KB
/
flake.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
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
117
{
description = "Ryan Yin's nix configuration for aarch64 and riscv64 SBCs";
##################################################################################################################
#
# Want to know Nix in details? Looking for a beginner-friendly tutorial?
# Check out https://github.com/ryan4yin/nixos-and-flakes-book !
#
##################################################################################################################
outputs = inputs: import ./outputs inputs;
# the nixConfig here only affects the flake itself, not the system configuration!
# for more information, see:
# https://nixos-and-flakes.thiscute.world/nix-store/add-binary-cache-servers
nixConfig = {
# substituers will be appended to the default substituters when fetching packages
extra-substituters = [
"https://cache.garnix.io"
];
extra-trusted-public-keys = [
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
];
};
# This is the standard format for flake.nix. `inputs` are the dependencies of the flake,
# Each item in `inputs` will be passed as a parameter to the `outputs` function after being pulled and built.
inputs = {
# There are many ways to reference flake inputs. The most widely used is github:owner/name/reference,
# which represents the GitHub repository URL + branch/commit-id/tag.
# Used only as colmena's default nixpkgs, will be overwritten in each host by colmenaMeta.nodeNixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
# used only by `pkgs-unstable`, for some packages.
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# unsed only by `pkgs-stable`, for some packages.
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11";
# Used as microvm's nixpkgs
nixpkgs-microvm.url = "github:nixos/nixpkgs/nixos-unstable";
# nixos-hardware.url = "github:NixOS/nixos-hardware/master";
# home-manager, used for managing user configuration
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
# url = "github:nix-community/home-manager/release-24.11";
# The `follows` keyword in inputs is used for inheritance.
# Here, `inputs.nixpkgs` of home-manager is kept consistent with the `inputs.nixpkgs` of the current flake,
# to avoid problems caused by different versions of nixpkgs dependencies.
inputs.nixpkgs.follows = "nixpkgs";
};
impermanence.url = "github:nix-community/impermanence";
# generate iso/qcow2/docker/... image from nixos configuration
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
# secrets management
agenix = {
# lock with git commit at 0.15.0
url = "github:ryantm/agenix/564595d0ad4be7277e07fa63b5a991b3c645655d";
# replaced with a type-safe reimplementation to get a better error message and less bugs.
# url = "github:ryan4yin/ragenix";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko/v1.11.0";
inputs.nixpkgs.follows = "nixpkgs";
};
# add git hooks to format nix code before commit
pre-commit-hooks = {
url = "github:cachix/pre-commit-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
nuenv.url = "github:DeterminateSystems/nuenv";
haumea = {
url = "github:nix-community/haumea/v0.2.2";
inputs.nixpkgs.follows = "nixpkgs";
};
daeuniverse.url = "github:daeuniverse/flake.nix";
# daeuniverse.url = "github:daeuniverse/flake.nix/exp";
microvm = {
url = "github:astro/microvm.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
######################## My own repositories #########################################
# refer vars from the main branch
mynixcfg.url = "github:ryan4yin/nix-config/main";
mynixcfg-v055.url = "github:ryan4yin/nix-config/v0.5.5";
# my private secrets, it's a private repository, you need to replace it with your own.
# use ssh protocol to authenticate via ssh-agent/ssh-key, and shallow clone to save time
mysecrets = {
url = "git+ssh://[email protected]/ryan4yin/nix-secrets.git?shallow=1";
flake = false;
};
# riscv64 SBCs
nixos-licheepi4a.url = "github:ryan4yin/nixos-licheepi4a";
# nixos-jh7110.url = "github:ryan4yin/nixos-jh7110";
# aarch64 SBCs
nixos-rk3588.url = "github:ryan4yin/nixos-rk3588";
};
}