-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
155 lines (133 loc) · 4.47 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
{
description = "Nix configurations for daily life";
inputs = {
# Nixpkgs
# nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*.tar.gz";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
# Nix-dariwn
darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
# Home-manager
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# Snowfall lib
snowfall-lib = {
url = "github:snowfallorg/lib";
inputs.nixpkgs.follows = "nixpkgs";
};
# NixOS-hardware
nixos-hardware.url = "github:NixOS/nixos-hardware";
# Code formatting all in one
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Nix-index-database for comma
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
# Secrets management
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# VSCode server on NixOS
nixos-vscode-server = {
url = "github:nix-community/nixos-vscode-server";
inputs.nixpkgs.follows = "nixpkgs";
};
# Run dynamic binaries on NixOS
nix-ld = {
url = "github:nix-community/nix-ld";
inputs.nixpkgs.follows = "nixpkgs";
};
# Git hooks
pre-commit-hooks = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Catppuccin theme
catppuccin.url = "github:catppuccin/nix";
catppuccin-cursors = {
url = "github:catppuccin/cursors";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {snowfall-lib, ...} @ inputs:
snowfall-lib.mkFlake {
inherit inputs;
src = ./.;
snowfall = {
namespace = "nichijou";
};
channels-config = {
allowUnfree = true;
allowBroken = false;
permittedInsecurePackages = [];
};
overlays = [];
homes.modules = with inputs; [
catppuccin.homeManagerModules.catppuccin
nix-index-database.hmModules.nix-index
nixos-vscode-server.homeModules.default
sops-nix.homeManagerModules.sops
];
systems.modules = {
darwin = with inputs; [
nix-index-database.darwinModules.nix-index
sops-nix.darwinModules.sops
];
nixos = with inputs; [
nix-index-database.nixosModules.nix-index
nix-ld.nixosModules.nix-ld
nixos-vscode-server.nixosModules.default
sops-nix.nixosModules.sops
];
};
systems.hosts.hakase.modules = with inputs; [
nixos-hardware.nixosModules.common-cpu-intel-cpu-only
nixos-hardware.nixosModules.common-gpu-nvidia-nonprime
nixos-hardware.nixosModules.common-pc-ssd
];
outputs-builder = channels: let
treefmtEval = inputs.treefmt-nix.lib.evalModule channels.nixpkgs ./treefmt.nix;
in {
formatter = treefmtEval.config.build.wrapper;
};
};
nixConfig = rec {
substituters = [
"https://cache.garnix.io"
"https://cache.nixos.org"
"https://colmena.cachix.org"
"https://cuda-maintainers.cachix.org"
"https://deadnix.cachix.org"
"https://hyprland.cachix.org"
"https://mirror.sjtu.edu.cn/nix-channels/store"
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store"
"https://mirrors.ustc.edu.cn/nix-channels/store"
"https://nichijou.cachix.org"
"https://nix-community.cachix.org"
"https://nixpkgs-wayland.cachix.org"
"https://numtide.cachix.org"
];
trusted-substituters = substituters;
trusted-public-keys = [
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"colmena.cachix.org-1:7BzpDnjjH8ki2CT3f6GdOk7QAzPOl+1t3LvTLXqYcSg="
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
"deadnix.cachix.org-1:R7kK+K1CLDbLrGph/vSDVxUslAmq8vhpbcz6SH9haJE="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nichijou.cachix.org-1:rbaTU9nLgVW9BK/HSV41vsag6A7/A/caBpcX+cR/6Ps="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
"numtide.cachix.org-1:2ps1kLBUWjxIneOy1Ik6cQjb41X0iXVXeHigGmycPPE="
];
};
}