-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathflake.nix
More file actions
103 lines (86 loc) · 3.1 KB
/
flake.nix
File metadata and controls
103 lines (86 loc) · 3.1 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
{
description = "Nix & home-manager configuration for HyDE, an Arch Linux based Hyprland desktop";
inputs = {
# Hydenix's nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/95e96e8632c387dcf8c4223b8ab14a58936f8b10";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:nixos/nixos-hardware/master";
# Nix-index-database - for comma and command-not-found
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
hyde = {
url = "github:HyDE-Project/HyDE/be97b8b4db232bfffc9b74fd27ba90a3457b9354";
flake = false;
};
# HyDE related binaries
hyq = {
url = "github:richen604/hyprquery";
};
hydectl = {
url = "github:richen604/hydectl";
inputs.nixpkgs.follows = "nixpkgs";
};
hyde-ipc = {
url = "github:richen604/hyde-ipc";
inputs.nixpkgs.follows = "nixpkgs";
};
hyde-config = {
url = "github:richen604/hyde-config";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{ ... }@inputs:
let
system = "x86_64-linux";
defaultConfig = import ./lib/config {
inherit inputs;
};
# Create VM variant of the NixOS configuration
vmConfig = import ./lib/vms/nixos-vm.nix {
inherit inputs;
nixosConfiguration = defaultConfig;
};
demoVmConfig = import ./lib/vms/demo-vm.nix {
inherit inputs;
};
in
{
lib.vmConfig = import ./lib/vms/nixos-vm.nix;
# Direct module access
homeModules.default = import ./hydenix/modules/hm;
nixosModules.default = import ./hydenix/modules/system;
overlays.default = import ./hydenix/sources/overlay.nix { inherit inputs; };
templates.default = {
path = ./template;
description = "Template for hydenix configuration";
};
nixosConfigurations.default = defaultConfig;
packages.${system} = {
# Use the VM configuration as default
default = vmConfig.config.system.build.vm;
# WIP: For a future demo installation & usage video
demo-vm = demoVmConfig.config.system.build.vm;
# Helper to manage hyde updates
hyde-update = import ./lib/hyde-update { inherit inputs; };
# Add hyq, hydectl, hyde-ipc, and hyde-config for building
hyq = inputs.hyq.packages.${system}.default;
hydectl = inputs.hydectl.packages.${system}.default;
hyde-config = inputs.hyde-config.packages.${system}.default;
# hyde-ipc = inputs.hyde-ipc.packages.${system}.default;
};
checks.${system} = {
hyq = inputs.self.packages.${system}.hyq;
hydectl = inputs.self.packages.${system}.hydectl;
hyde-config = inputs.self.packages.${system}.hyde-config;
#FIXME: hyde-ipc has 2gb of build dependencies, so disable for now to prevent gh actions timeouts
# hyde-ipc = inputs.self.packages.${system}.hyde-ipc;
};
devShells.${system}.default = import ./lib/dev-shell.nix { inherit inputs; };
};
}