-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
88 lines (71 loc) · 2.71 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
{
description = "Input into the infinity lab";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
# flake-utils.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nixos-generators.url = "github:nix-community/nixos-generators";
nixos-generators.inputs.nixpkgs.follows = "nixpkgs";
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
nixpkgs-wayland.inputs.nixpkgs.follows = "nixpkgs";
nur.url = "github:nix-community/NUR";
nix-gaming.url = "github:fufexan/nix-gaming";
plasma-manager = {
url = "github:pjones/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
# KDE
kwin-effects-forceblur = {
url = "github:taj-ny/kwin-effects-forceblur";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland.url = "github:hyprwm/Hyprland";
zig.url = "github:mitchellh/zig-overlay";
zig.inputs.nixpkgs.follows = "nixpkgs";
zls.url = "github:zigtools/zls";
zls.inputs.nixpkgs.follows = "nixpkgs";
zls.inputs.zig-overlay.follows = "zig";
};
outputs = { self, nixpkgs, nur, flake-utils, home-manager, ... }@attrs:
let
inherit (nixpkgs.lib) mapAttrs mapAttrs' nixosSystem;
inherit (flake-utils.lib) eachSystemMap system;
# catalog.nodes defines the systems available in this flake.
catalog = import ./nixos/catalog.nix { inherit system; };
in rec {
# Convert nodes into a set of nixos configs.
nixosConfigurations = let
# Bare metal systems.
metalSystems = mapAttrs (host: node:
nixosSystem {
inherit (node) system;
specialArgs = attrs // {
inherit catalog;
inherit attrs;
hostName = host;
zig = attrs.zig.packages.${node.system};
zls = attrs.zls.packages.${node.system};
};
modules = [
nur.modules.nixos.default
attrs.chaotic.nixosModules.default
node.config
node.hw
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.barney = import node.home;
home-manager.backupFileExtension = "backup1";
}
];
}) catalog.nodes;
in metalSystems;
};
}