-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
135 lines (130 loc) · 3.46 KB
/
Copy pathflake.nix
File metadata and controls
135 lines (130 loc) · 3.46 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
ags = {
url = "github:Aylur/ags";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix = {
url = "github:ryantm/agenix";
inputs.home-manager.follows = "home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix-rekey = {
url = "github:oddlama/agenix-rekey";
inputs.nixpkgs.follows = "nixpkgs";
inputs.treefmt-nix.follows = "treefmt-nix";
};
cake = {
url = "github:ttoino/cake";
inputs.ags.follows = "ags";
inputs.nixpkgs.follows = "nixpkgs";
};
catppuccin = {
url = "github:catppuccin/nix";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix4vscode = {
url = "github:nix-community/nix4vscode";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:NixOS/nixos-hardware";
nixos-vscode-server = {
url = "github:nix-community/nixos-vscode-server";
inputs.flake-utils.follows = "flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
nvf = {
url = "github:NotAShelf/nvf";
inputs.nixpkgs.follows = "nixpkgs";
};
peon-ping = {
url = "github:PeonPing/peon-ping/v2.22.0";
inputs.flake-utils.follows = "flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
shadows-plus-plus = {
url = "github:ttoino/shadows-plus-plus";
inputs.hyprland.inputs.nixpkgs.follows = "nixpkgs";
};
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
agenix-rekey,
flake-utils,
home-manager,
treefmt-nix,
...
}@inputs:
let
args = {
inherit
inputs
lib
modules
overlays
packages
traits
;
};
hosts = lib.getModules ./hosts;
modules = lib.getModules ./modules;
lib = import ./lib args;
overlays = import ./overlays args;
packages = lib.getPackages ./packages;
traits = lib.getModules ./traits;
in
{
agenix-rekey = agenix-rekey.configure {
userFlake = self;
nixosConfigurations = self.nixosConfigurations;
};
nixosConfigurations = lib.makeHosts hosts;
}
// (flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system overlays; };
treefmt = (treefmt-nix.lib.evalModule pkgs ./treefmt.nix).config.build.wrapper;
in
{
formatter = treefmt;
packages =
(packages pkgs)
// (lib.attrsets.concatMapAttrs (name: config: {
"${name}-iso" = config.config.system.build.isoImage;
}) self.nixosConfigurations);
devShells.default = pkgs.mkShell {
packages = with pkgs; [
# Create secrets
agenix-rekey.packages.${system}.default
# Nix language server
nixd
# Formatter
treefmt
# Update packages
nix-update
# Update sources
nvfetcher
# Wireguard
wireguard-tools
];
};
}
));
}