-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
132 lines (112 loc) · 3.25 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
{
inputs = {
systems.url = "github:nix-systems/default";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
nixos-unified = {
url = "github:srid/nixos-unified";
};
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
srvos = {
url = "github:nix-community/srvos";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix-rekey = {
url = "github:oddlama/agenix-rekey";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-parts.follows = "flake-parts";
inputs.treefmt-nix.follows = "treefmt-nix";
};
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
inputs.systems.follows = "systems";
};
catppuccin = {
url = "github:catppuccin/nix";
inputs.nixpkgs.follows = "nixpkgs";
};
impermanence.url = "github:nix-community/impermanence";
flake-root.url = "github:srid/flake-root";
mission-control.url = "github:Platonic-Systems/mission-control";
};
outputs =
inputs@{
self,
flake-parts,
...
}:
flake-parts.lib.mkFlake { inherit inputs; } (
{
...
}:
{
imports = [
inputs.treefmt-nix.flakeModule
inputs.nixos-unified.flakeModules.default
./modules
./machines
./devshell.nix
./packages
];
systems = import inputs.systems;
flake = {
overlays.default = final: prev: {
caddy = self.packages.${final.system}.caddy;
};
};
perSystem =
{
pkgs,
system,
lib,
...
}:
{
# Make our overlay available to the devShell
# "Flake parts does not yet come with an endorsed module that initializes the pkgs argument.""
# So we must do this manually; https://flake.parts/overlays#consuming-an-overlay
_module.args.pkgs-unstable = import inputs.nixpkgs-unstable {
inherit system;
};
# Select all inputs as primary inputs, to make them update
nixos-unified = {
primary-inputs = builtins.attrNames inputs;
};
treefmt = {
projectRootFile = "flake.nix";
programs.nixfmt = {
enable = true;
package = pkgs.nixfmt-rfc-style;
};
programs.shfmt.enable = true;
settings.global.excludes = [
".envrc"
".editorconfig"
"README.md"
"LICENSE"
"*.png"
"packages/caddy/src/*"
"secrets/*"
];
};
};
}
);
}