-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
67 lines (55 loc) · 1.62 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
{
description = "Personal NixOS configurations";
inputs = {
nixpkgs.url = "nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-wsl = {
url = "github:nix-community/NixOS-WSL";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
nix-index-database = {
url = "github:Mic92/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
...
} @ inputs: let
inherit (self) outputs;
forEachSystem = nixpkgs.lib.genAttrs [
"x86_64-linux"
];
forEachPkgs = f: forEachSystem (sys: f nixpkgs.legacyPackages.${sys});
in {
# Define custom packages for the system.
packages = forEachPkgs (
pkgs:
(import ./pkgs {inherit pkgs;})
// (import ./vix {inherit pkgs;})
);
# A development shell for bootstrapping the flake
# configuration on a fresh system installation.
devShells = forEachPkgs (pkgs: import ./shell.nix {inherit pkgs;});
# Export custom packages and modifications as overlays.
overlays = import ./overlays {inherit inputs;};
# Entrypoint to all NixOS systems this config defines.
nixosConfigurations = import ./hosts {
inherit inputs outputs;
revision = self.rev or "dirty";
};
};
}