-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
73 lines (67 loc) · 1.92 KB
/
flake.nix
File metadata and controls
73 lines (67 loc) · 1.92 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
{
description = "One Nix flake to rule them all";
inputs = {
#nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-25.05";
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
# Using unstable everywhere atm
nixpkgs-unstable.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
neovim-flake.url = "github:aorith/neovim-flake";
treefmt-nix.url = "github:numtide/treefmt-nix";
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
inputs@{
self,
nixpkgs,
nixpkgs-unstable,
systems,
treefmt-nix,
...
}:
let
eachSystem = nixpkgs.lib.genAttrs (import systems);
treefmtEval = eachSystem (
system: treefmt-nix.lib.evalModule nixpkgs.legacyPackages.${system} ./treefmt.nix
);
in
{
nixosConfigurations = {
# --- Desktop
trantor = nixpkgs.lib.nixosSystem {
modules = [ ./hosts/trantor ];
specialArgs = {
inherit inputs;
};
};
# --- MSI Laptop
alpaca = nixpkgs-unstable.lib.nixosSystem {
modules = [ ./hosts/alpaca ];
specialArgs = {
inherit inputs;
};
};
# --- Hetzner VM
arcadia = nixpkgs.lib.nixosSystem {
modules = [ ./hosts/arcadia ];
specialArgs = {
inherit inputs;
};
};
# --- NixOS VM (unstable)
nixos-vm = nixpkgs-unstable.lib.nixosSystem {
modules = [ ./hosts/nixos-vm ];
specialArgs = {
inherit inputs;
};
};
};
# for `nix fmt`
formatter = eachSystem (system: treefmtEval.${system}.config.build.wrapper);
# for `nix flake check`
checks = eachSystem (system: {
formatting = treefmtEval.${system}.config.build.check self;
});
};
}