Remove Raspberry Pi 4 specific bits
This commit is contained in:
@@ -9,6 +9,34 @@
|
||||
with pkgs;
|
||||
|
||||
{
|
||||
# Kernel configuration
|
||||
boot = {
|
||||
blacklistedKernelModules = [
|
||||
"btusb"
|
||||
"bluetooth"
|
||||
];
|
||||
kernelParams = [
|
||||
"zfs.zfs_arc_max=8589934592"
|
||||
"zfs.zfs_arc_min=1073741824"
|
||||
];
|
||||
supportedFilesystems = [ "zfs" ];
|
||||
zfs = {
|
||||
requestEncryptionCredentials = true;
|
||||
extraPools = [ "vault" ];
|
||||
};
|
||||
};
|
||||
|
||||
# Secure boot using lanzaboote
|
||||
boot.loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
systemd-boot = {
|
||||
enable = false;
|
||||
configurationLimit = 50;
|
||||
editor = false;
|
||||
};
|
||||
timeout = 3;
|
||||
};
|
||||
|
||||
# Declare system packages
|
||||
environment.systemPackages = [
|
||||
libraspberrypi
|
||||
@@ -57,12 +85,6 @@ with pkgs;
|
||||
time.timeZone = "Europe/Brussels";
|
||||
services.timesyncd.enable = true;
|
||||
|
||||
# Enable ZFS support
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
|
||||
# Don't import encrypted datasets
|
||||
boot.zfs.requestEncryptionCredentials = false;
|
||||
|
||||
# Scrub zpool monthly
|
||||
services.zfs.autoScrub = {
|
||||
enable = true;
|
||||
@@ -73,9 +95,9 @@ with pkgs;
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
trusted-users = [
|
||||
"root"
|
||||
"coolneng"
|
||||
];
|
||||
};
|
||||
gc = {
|
||||
@@ -87,6 +109,7 @@ with pkgs;
|
||||
keep-outputs = true
|
||||
keep-derivations = true
|
||||
gc-keep-outputs = true
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -199,15 +222,6 @@ with pkgs;
|
||||
];
|
||||
};
|
||||
|
||||
# Limit the memory and CPU use of Nix
|
||||
systemd.services.nixos-upgrade.serviceConfig = {
|
||||
MemoryHigh = [ "500M" ];
|
||||
MemoryMax = [ "2G" ];
|
||||
MemorySwapMax = [ "500M" ];
|
||||
CPUWeight = [ "50" ];
|
||||
CPUQuota = [ "50%" ];
|
||||
};
|
||||
|
||||
# Configure git for auto-upgrade
|
||||
programs.git = {
|
||||
enable = true;
|
||||
@@ -233,7 +247,6 @@ with pkgs;
|
||||
./modules/periodic.nix
|
||||
./modules/communication.nix
|
||||
./modules/information.nix
|
||||
./modules/device.nix
|
||||
./modules/containers.nix
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user