-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
72 lines (72 loc) · 1.69 KB
/
flake.nix
File metadata and controls
72 lines (72 loc) · 1.69 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
{
description = "NixOS configuration of kedom";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
ghostty = {
url = "github:ghostty-org/ghostty";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nvim = {
url = "github:kedom1337/nvim";
inputs.nixpkgs.follows = "nixpkgs";
};
llm-agents = {
url = "github:numtide/llm-agents.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
nixpkgs,
flake-utils,
home-manager,
...
} @ inputs: let
system = "x86_64-linux";
user = "kedom";
homeStateVersion = "26.05";
hosts = [
{
hostName = "t480";
stateVersion = "26.05";
}
{
hostName = "desktop";
stateVersion = "26.05";
}
];
mkHost = host: {
name = host.hostName;
value = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs system homeStateVersion user;
inherit (host) hostName stateVersion;
};
modules = [
home-manager.nixosModules.default
./hosts/${host.hostName}/configuration.nix
];
};
};
in
{
nixosConfigurations = builtins.listToAttrs (map mkHost hosts);
}
// flake-utils.lib.eachDefaultSystem (
system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
devShells.default = pkgs.mkShell {
packages = with pkgs; [
statix
];
};
formatter = pkgs.alejandra;
}
);
}