2023-08-15 07:09:11 +03:00
|
|
|
# Edit this configuration file to define what should be installed on
|
|
|
|
# your system. Help is available in the configuration.nix(5) man page
|
|
|
|
# and in the NixOS manual (accessible by running `nixos-help`).
|
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
myData,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
# previously:
|
|
|
|
# imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
|
|
|
# as of 23.05 that is:
|
|
|
|
hardware.enableRedistributableFirmware = true;
|
|
|
|
|
|
|
|
boot.initrd.availableKernelModules = ["usbhid"];
|
2023-08-15 16:20:41 +03:00
|
|
|
boot.initrd.kernelModules = ["vc4" "bcm2835_dma" "i2c_bcm2835"];
|
2023-08-15 07:09:11 +03:00
|
|
|
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
|
|
|
boot.kernelModules = [];
|
|
|
|
boot.extraModulePackages = [];
|
|
|
|
|
|
|
|
fileSystems."/" = {
|
|
|
|
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
|
|
|
|
fsType = "ext4";
|
|
|
|
};
|
|
|
|
|
|
|
|
swapDevices = [];
|
|
|
|
|
|
|
|
mj = {
|
|
|
|
stateVersion = "23.05";
|
|
|
|
timeZone = "Europe/Vilnius";
|
|
|
|
base = {
|
|
|
|
users.passwd = {
|
|
|
|
root.passwordFile = config.age.secrets.root-passwd-hash.path;
|
|
|
|
motiejus.passwordFile = config.age.secrets.motiejus-passwd-hash.path;
|
|
|
|
};
|
|
|
|
unitstatus = {
|
|
|
|
enable = true;
|
|
|
|
email = "motiejus+alerts@jakstys.lt";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services = {
|
|
|
|
postfix = {
|
|
|
|
enable = true;
|
|
|
|
saslPasswdPath = config.age.secrets.sasl-passwd.path;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.tailscale.enable = true;
|
|
|
|
|
|
|
|
networking = {
|
|
|
|
hostId = "4bd17751";
|
|
|
|
hostName = "vno1-rp3b";
|
|
|
|
domain = "servers.jakst";
|
|
|
|
defaultGateway = "192.168.189.4";
|
|
|
|
nameservers = ["192.168.189.4"];
|
2023-08-16 16:38:47 +03:00
|
|
|
interfaces.enu1u1u1.ipv4.addresses = [
|
2023-08-15 07:09:11 +03:00
|
|
|
{
|
|
|
|
address = "192.168.189.5";
|
|
|
|
prefixLength = 24;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
firewall = {
|
|
|
|
allowedUDPPorts = [];
|
|
|
|
allowedTCPPorts = [];
|
|
|
|
logRefusedConnections = false;
|
|
|
|
checkReversePath = "loose"; # for tailscale
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
powerManagement.cpuFreqGovernor = "ondemand";
|
|
|
|
|
|
|
|
boot.loader.grub.enable = false;
|
|
|
|
boot.loader.generic-extlinux-compatible.enable = true;
|
|
|
|
|
2023-08-15 16:20:41 +03:00
|
|
|
boot.loader.raspberryPi.firmwareConfig = ''
|
|
|
|
dtparam=audio=on
|
|
|
|
'';
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
libraspberrypi
|
|
|
|
];
|
|
|
|
|
2023-08-15 17:14:40 +03:00
|
|
|
nixpkgs.hostPlatform = "aarch64-linux";
|
|
|
|
|
2023-08-15 07:09:11 +03:00
|
|
|
security.rtkit.enable = true;
|
|
|
|
services.pipewire = {
|
|
|
|
enable = true;
|
|
|
|
alsa.enable = true;
|
|
|
|
alsa.support32Bit = true;
|
|
|
|
pulse.enable = true;
|
|
|
|
};
|
|
|
|
}
|