-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfiguration.nix
155 lines (142 loc) · 3.51 KB
/
configuration.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# This is the SD image initial configuration
{ pkgs, lib, inputs, devices, ... }:
{
# Comment this line if you want a recent kernel, but
# if it's not in the community cache the builder will compile it
boot.kernelPackages = lib.mkForce pkgs.linuxKernel.packages.linux_rpi4;
# Initial TimeZone + keyboard
time.timeZone = "America/Miquelon";
i18n.defaultLocale = "fr_FR.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = lib.mkForce "fr";
useXkbConfig = true; # use xkb.options in tty.
};
# Initial users configuration
users.users.root.initialPassword = "password";
users.users.nixos = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
initialPassword = "password";
packages = with pkgs; [];
};
security.sudo.wheelNeedsPassword = false;
# Initial network configuration
networking = {
hostName = "pixos";
useDHCP = false;
interfaces = {
wlan0.useDHCP = false;
eth0.useDHCP = true;
};
};
# Some programs
environment.systemPackages = with pkgs; [
vim
wget
git
htop
];
# Experimental features must be activated
nix.settings = {
trusted-users = [ "@wheel" ];
experimental-features = [ "nix-command" "flakes" ];
keep-outputs = true;
keep-derivations = true;
};
# Access via SSH
services.openssh.enable = true;
# The board and wanted kernel version
raspberry-pi-nix = {
board = "bcm2712";
#kernel-version = "v6_10_12";
};
# PI Hardware configuration
hardware = {
bluetooth.enable = true;
raspberry-pi = {
config = {
all = {
base-dt-params = {
BOOT_UART = {
enable = false;
value = 1;
};
uart_2ndstage = {
enable = false;
value = 1;
};
audio = {
enable = true;
value = "off";
};
sd_poll_once = {
enable = true;
};
# NVME disk access
#pciex1 = {
# enable = true;
#};
#pciex1_gen = {
# enable = true;
# value = 3;
#};
#nvme = {
# enable = true;
#};
};
dt-overlays = {
vc4-kms-v3d-pi5 = {
enable = true;
params = { };
};
};
options = {
hdmi_blanking = {
enable = true;
value = 1;
};
disable_overscan = {
enable = true;
value = 1;
};
gpu_mem_256 = {
enable = true;
value = 76;
};
gpu_mem_512 = {
enable = true;
value = 76;
};
gpu_mem_1024 = {
enable = true;
value = 76;
};
disable_splash = {
enable = true;
value = 1;
};
temp_limit = {
enable = true;
value = 75;
};
initial_turbo = {
enable = true;
value = 20;
};
};
};
};
};
};
# You can put another features here, for example:
#security.rtkit.enable = true;
#services.pipewire = {
# enable = true;
# alsa.enable = true;
# alsa.support32Bit = true;
# pulse.enable = true;
#};
# DO NOT TOUCH THIS
system.stateVersion = "24.11";
}