2021-09-27 22:19:24 +02:00
|
|
|
|
{ hostRegistry, config, lib, pkgs, modulesPath, ... }:
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
boot.initrd.availableKernelModules = [ "usbhid" ];
|
|
|
|
|
boot.initrd.kernelModules = [ ];
|
|
|
|
|
boot.kernelModules = [ ];
|
|
|
|
|
boot.extraModulePackages = [ ];
|
|
|
|
|
|
|
|
|
|
fileSystems."/" = {
|
|
|
|
|
device = "/dev/disk/by-label/NIXOS_SD";
|
|
|
|
|
fsType = "ext4";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fileSystems."/boot/firmware" = {
|
|
|
|
|
device = "/dev/disk/by-label/FIRMWARE";
|
|
|
|
|
fsType = "vfat";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
swapDevices = [ ];
|
|
|
|
|
|
|
|
|
|
hardware.enableRedistributableFirmware = true;
|
|
|
|
|
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
|
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
|
loader = {
|
|
|
|
|
grub.enable = false;
|
|
|
|
|
raspberryPi = {
|
|
|
|
|
enable = true;
|
2021-09-28 00:28:15 +02:00
|
|
|
|
version = 4;
|
2021-09-27 22:19:24 +02:00
|
|
|
|
uboot.enable = true;
|
|
|
|
|
firmwareConfig = ''
|
|
|
|
|
gpu_mem=192
|
|
|
|
|
dtparam=audio=on
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
kernelPackages = pkgs.linuxPackages_5_13;
|
|
|
|
|
# Don't build ZFS for aarch64 (broken?)
|
|
|
|
|
supportedFilesystems = lib.mkForce [ "vfat" "ext4" ];
|
|
|
|
|
|
|
|
|
|
tmpOnTmpfs = true;
|
|
|
|
|
};
|
|
|
|
|
sdImage = {
|
|
|
|
|
compressImage = false;
|
|
|
|
|
imageBaseName = config.networking.hostName;
|
|
|
|
|
firmwareSize = 512;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
c3d2 = {
|
|
|
|
|
isInHq = true;
|
|
|
|
|
mapHqHosts = true;
|
|
|
|
|
hq.interface = "eth0";
|
|
|
|
|
hq.statistics.enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
nix = {
|
|
|
|
|
buildCores = 4;
|
|
|
|
|
maxJobs = 2;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
networking = {
|
|
|
|
|
hostName = "dacbert"; # Define your hostname.
|
|
|
|
|
useDHCP = false;
|
|
|
|
|
interfaces.eth0.useDHCP = true;
|
2021-09-28 00:28:15 +02:00
|
|
|
|
firewall.enable = false;
|
2021-09-27 22:19:24 +02:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# List packages installed in system profile. To search, run:
|
|
|
|
|
# $ nix search wget
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
git
|
|
|
|
|
libraspberrypi
|
|
|
|
|
vim
|
|
|
|
|
wget
|
|
|
|
|
|
|
|
|
|
mpv
|
|
|
|
|
youtube-dl
|
|
|
|
|
ncpamixer
|
|
|
|
|
pulseaudio # required for pactl
|
2021-09-28 00:28:15 +02:00
|
|
|
|
#chromium
|
|
|
|
|
firefox
|
|
|
|
|
pavucontrol
|
2021-09-27 22:19:24 +02:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
programs.tmux.enable = true;
|
|
|
|
|
|
|
|
|
|
# Do not log to flash:
|
|
|
|
|
services.journald.extraConfig = ''
|
|
|
|
|
Storage=volatile
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
# Enable the OpenSSH daemon.
|
|
|
|
|
services.openssh = {
|
|
|
|
|
enable = true;
|
|
|
|
|
permitRootLogin = "yes";
|
|
|
|
|
};
|
|
|
|
|
security.sudo = {
|
|
|
|
|
enable = true;
|
|
|
|
|
wheelNeedsPassword = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
users.users.k-ot = {
|
|
|
|
|
isNormalUser = true;
|
2021-09-28 00:28:15 +02:00
|
|
|
|
extraGroups = [ "wheel" "audio" "video" ];
|
2021-09-27 22:19:24 +02:00
|
|
|
|
};
|
|
|
|
|
|
2021-09-27 22:40:27 +02:00
|
|
|
|
c3d2.audioServer.enable = true;
|
2021-09-27 22:19:24 +02:00
|
|
|
|
|
2021-09-28 00:28:15 +02:00
|
|
|
|
# Select internationalisation properties.
|
|
|
|
|
console = {
|
|
|
|
|
font = "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz";
|
|
|
|
|
keyMap = "de";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Enable the X11 windowing system.
|
|
|
|
|
services.xserver.enable = true;
|
|
|
|
|
services.xserver.layout = "de";
|
|
|
|
|
services.xserver.xkbOptions = "eurosign:e";
|
|
|
|
|
|
|
|
|
|
services.xserver.displayManager = {
|
|
|
|
|
lightdm = { enable = true; };
|
|
|
|
|
autoLogin = {
|
|
|
|
|
enable = true;
|
|
|
|
|
user = "k-ot";
|
|
|
|
|
};
|
|
|
|
|
defaultSession = "gnome-xorg";
|
|
|
|
|
};
|
|
|
|
|
services.xserver.desktopManager = {
|
|
|
|
|
gnome.enable = true;
|
|
|
|
|
# kodi.enable = true;
|
|
|
|
|
};
|
|
|
|
|
systemd.user.services.x11vnc = {
|
|
|
|
|
description = "X11 VNC server";
|
|
|
|
|
wantedBy = [ "graphical-session.target" ];
|
|
|
|
|
partOf = [ "graphical-session.target" ];
|
|
|
|
|
serviceConfig = {
|
|
|
|
|
ExecStart = ''
|
|
|
|
|
${pkgs.x11vnc}/bin/x11vnc -shared -forever -passwd k-ot
|
|
|
|
|
'';
|
|
|
|
|
RestartSec = 3;
|
|
|
|
|
Restart = "always";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2021-09-27 22:19:24 +02:00
|
|
|
|
# This value determines the NixOS release from which the default
|
|
|
|
|
# settings for stateful data, like file locations and database versions
|
|
|
|
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
|
|
|
# this value at the release version of the first install of this system.
|
|
|
|
|
# Before changing this value read the documentation for this option
|
|
|
|
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
|
|
|
system.stateVersion = "21.05"; # Did you read the comment?
|
|
|
|
|
}
|