-
Notifications
You must be signed in to change notification settings - Fork 12
/
flake.nix
131 lines (100 loc) · 2.86 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
{
inputs = {
# Update channels
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
nixpkgs = {
url = "github:NixOS/nixpkgs/nixos-unstable";
follows = "chaotic/nixpkgs";
};
# Modules
home-manager = {
url = "github:nix-community/home-manager";
follows = "chaotic/home-manager";
};
nerivations = {
url = "github:icedborn/nerivations";
inputs.nixpkgs.follows = "nixpkgs";
};
steam-session = {
url = "github:Jovian-Experiments/Jovian-NixOS";
follows = "chaotic/jovian";
};
# Apps
falkor = {
url = "github:Team-Falkor/falkor";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprlux = {
url = "github:amadejkastelic/Hyprlux";
inputs.nixpkgs.follows = "nixpkgs";
};
pipewire-screenaudio = {
url = "github:IceDBorn/pipewire-screenaudio";
inputs.nixpkgs.follows = "nixpkgs";
};
shell-in-netns = {
url = "github:jim3692/shell-in-netns";
inputs.nixpkgs.follows = "nixpkgs";
};
zen-browser = {
url = "github:0xc000022070/zen-browser-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
home-manager,
nerivations,
nixpkgs,
pipewire-screenaudio,
self,
shell-in-netns,
falkor,
hyprlux,
chaotic,
steam-session,
zen-browser,
}@inputs:
{
nixosConfigurations.${nixpkgs.lib.fileContents "/etc/hostname"} = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
};
modules = [
# Read configuration location
(
{ lib, ... }:
let
inherit (lib) mkOption types fileContents;
in
{
options.icedos.configurationLocation = mkOption {
type = types.str;
default = fileContents "/tmp/configuration-location";
};
}
)
# Symlink configuration state on "/run/current-system/source"
{
# Source: https://github.com/NixOS/nixpkgs/blob/5e4fbfb6b3de1aa2872b76d49fafc942626e2add/nixos/modules/system/activation/top-level.nix#L191
system.extraSystemBuilderCmds = "ln -s ${self} $out/source";
}
# Internal modules
./modules.nix
# External modules
chaotic.nixosModules.default
home-manager.nixosModules.home-manager
nerivations.nixosModules.default
./system/desktop
steam-session.nixosModules.default
./system/desktop/steam-session.nix
hyprlux.nixosModules.default
./system/desktop/hyprland
./system/applications/modules/hyprlux
./system/applications/modules/zen-browser
./system/users/icedborn.nix
];
};
};
}