-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
120 lines (111 loc) · 3.21 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
{
description = "Media Server";
inputs = {
## Bluetooth doesn't currently work on stable
# nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# Trails trunk - latest packages with broken commits filtered out
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
# Very latest packages - some commits broken
nixpkgs-trunk.url = "github:NixOS/nixpkgs";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-editor.url = "github:vlinkz/nix-editor";
u-boot-src = {
flake = false;
url = "https://ftp.denx.de/pub/u-boot/u-boot-2024.01.tar.bz2";
};
rpi-linux-6_1-src = {
flake = false;
url = "github:raspberrypi/linux/stable_20231123";
};
rpi-firmware-src = {
flake = false;
url = "github:raspberrypi/firmware/7e6decce72fdff51923e9203db46716835ae889a";
};
rpi-firmware-nonfree-src = {
flake = false;
url = "github:RPi-Distro/firmware-nonfree/88aa085bfa1a4650e1ccd88896f8343c22a24055";
};
rpi-bluez-firmware-src = {
flake = false;
url = "github:RPi-Distro/bluez-firmware/d9d4741caba7314d6500f588b1eaa5ab387a4ff5";
};
};
outputs = {
self,
nixos-generators,
nixos-hardware,
nixpkgs,
...
}@inputs:
let
hostParams = import ./host-params.nix {};
in
{
nixosConfigurations = {
# mediaserver-rpi4 =
# let
# system = "aarch64-linux";
# in
# nixos-generators.nixosGenerate {
# system = system;
# modules = [
# nixos-hardware.nixosModules.raspberry-pi-4
# ./configuration.nix
# ./hosts/mediaserver-rpi4/hardware-configuration.nix
# ./hosts/mediaserver-rpi4/boot.nix
# ./hosts/mediaserver-rpi4/bluetooth.nix
# ./hosts/mediaserver-rpi4/sound.nix
# ];
# format = "sd-aarch64";
# specialArgs = {
# inherit inputs;
# inherit system;
# };
# };
mediaserver-rpi4 =
let
system = "aarch64-linux";
in
inputs.nixpkgs.lib.nixosSystem {
system = system;
modules = [
nixos-hardware.nixosModules.raspberry-pi-4
./configuration.nix
./hosts/mediaserver-rpi4/hardware-configuration.nix
./hosts/mediaserver-rpi4/boot.nix
./hosts/mediaserver-rpi4/bluetooth.nix
./hosts/mediaserver-rpi4/sound.nix
];
specialArgs = {
inherit inputs;
inherit system;
inherit hostParams;
};
};
mediaserver-x86 =
let
system = "x86_64-linux";
in
inputs.nixpkgs.lib.nixosSystem {
system = system;
modules = [
nixos-hardware.nixosModules.common-cpu-intel
nixos-hardware.nixosModules.common-pc-laptop
./configuration.nix
./profiles/hardware-configuration.nix
./profiles/virtual-machine.nix
];
specialArgs = {
inherit inputs;
inherit system;
inherit hostParams;
};
};
};
};
}