2024-09-06 11:38:43 +02:00
|
|
|
{ ... }:
|
2023-05-28 13:22:28 +02:00
|
|
|
{ pkgs, config, ... }:
|
2023-05-07 17:00:43 +02:00
|
|
|
{
|
|
|
|
imports = [
|
2024-09-06 11:38:43 +02:00
|
|
|
# "${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
|
|
|
|
# nixos-hardware.nixosModules.raspberry-pi-4
|
2023-05-07 17:00:43 +02:00
|
|
|
|
|
|
|
../../users/root
|
|
|
|
../../users/erwin
|
|
|
|
|
|
|
|
./home.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
eboskma = {
|
|
|
|
users.erwin = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2023-05-15 14:29:56 +02:00
|
|
|
desktop = {
|
2024-09-06 11:38:43 +02:00
|
|
|
enable = false;
|
2023-05-15 14:29:56 +02:00
|
|
|
};
|
2023-05-28 13:22:28 +02:00
|
|
|
fonts = {
|
2024-09-06 11:38:43 +02:00
|
|
|
enable = false;
|
2023-05-28 13:22:28 +02:00
|
|
|
iosevka-aile = false;
|
2023-05-15 14:29:56 +02:00
|
|
|
};
|
2024-09-06 11:38:43 +02:00
|
|
|
gnome.enable = false;
|
|
|
|
klipper.enable = true;
|
|
|
|
lightdm.enable = false;
|
2023-05-07 17:00:43 +02:00
|
|
|
networking.enable = true;
|
2023-05-15 14:29:56 +02:00
|
|
|
nix-common = {
|
|
|
|
enable = true;
|
|
|
|
remote-builders = true;
|
|
|
|
};
|
2023-05-07 17:00:43 +02:00
|
|
|
systemd.enable = true;
|
|
|
|
};
|
|
|
|
|
2023-05-28 13:22:28 +02:00
|
|
|
# nixpkgs.crossSystem.system = "aarch64-linux";
|
|
|
|
|
2023-05-07 17:00:43 +02:00
|
|
|
hardware = {
|
2023-05-28 13:22:28 +02:00
|
|
|
# deviceTree.filter = "bcm2711-rpi-4-b.dtb";
|
2023-05-07 17:00:43 +02:00
|
|
|
enableAllFirmware = true;
|
2024-09-06 11:38:43 +02:00
|
|
|
# raspberry-pi."4".fkms-3d = {
|
|
|
|
# enable = false;
|
|
|
|
# cma = 512;
|
|
|
|
# };
|
2023-05-07 17:00:43 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
bootspec.enable = true;
|
2023-05-28 13:22:28 +02:00
|
|
|
growPartition = true;
|
2024-09-06 11:38:43 +02:00
|
|
|
loader = {
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
systemd-boot = {
|
|
|
|
enable = true;
|
|
|
|
configurationLimit = 10;
|
|
|
|
};
|
|
|
|
grub.enable = false;
|
|
|
|
};
|
|
|
|
kernelPackages = pkgs.linuxPackages_latest;
|
|
|
|
kernelParams = [
|
|
|
|
"console=ttyS0,115200n8"
|
|
|
|
"console=ttyAMA0,115200n8"
|
|
|
|
"console=tty0"
|
|
|
|
"cma=512M"
|
|
|
|
];
|
|
|
|
initrd.availableKernelModules = [
|
|
|
|
# Allows early (earlier) modesetting for the Raspberry Pi
|
|
|
|
"vc4"
|
|
|
|
"bcm2835_dma"
|
|
|
|
"i2c_bcm2835"
|
|
|
|
|
|
|
|
# Maybe needed for SSD boot?
|
|
|
|
"usb_storage"
|
|
|
|
"xhci_pci"
|
|
|
|
"usbhid"
|
|
|
|
"uas"
|
|
|
|
];
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
fileSystems = {
|
|
|
|
"/" = {
|
|
|
|
device = "/dev/disk/by-label/nixos";
|
|
|
|
fsType = "ext4";
|
|
|
|
};
|
|
|
|
|
|
|
|
"/boot" = {
|
|
|
|
device = "/dev/disk/by-label/EFI";
|
|
|
|
fsType = "vfat";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
swapDevices = [
|
|
|
|
{
|
|
|
|
device = "/dev/disk/by-label/swap";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
powerManagement = {
|
|
|
|
cpuFreqGovernor = "ondemand";
|
2023-05-07 17:00:43 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
zramSwap.enable = true;
|
2024-09-06 11:38:43 +02:00
|
|
|
# sdImage.compressImage = false;
|
2023-05-07 17:00:43 +02:00
|
|
|
|
2023-05-28 13:22:28 +02:00
|
|
|
time.timeZone = "Europe/Amsterdam";
|
|
|
|
|
2023-05-07 17:00:43 +02:00
|
|
|
networking = {
|
|
|
|
hostName = "thor";
|
|
|
|
useDHCP = true;
|
|
|
|
useNetworkd = true;
|
|
|
|
wireless.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.network = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
networks = {
|
|
|
|
"40-eth0" = {
|
|
|
|
DHCP = "yes";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-09-13 14:50:03 +02:00
|
|
|
services = {
|
|
|
|
openssh.enable = true;
|
|
|
|
tailscale.enable = true;
|
2023-05-07 17:00:43 +02:00
|
|
|
|
2023-09-13 14:50:03 +02:00
|
|
|
kanata = {
|
2024-09-06 11:38:43 +02:00
|
|
|
enable = false;
|
2023-05-28 13:22:28 +02:00
|
|
|
|
2023-09-13 14:50:03 +02:00
|
|
|
keyboards = {
|
|
|
|
code = {
|
2024-02-05 11:46:52 +01:00
|
|
|
devices = [ "/dev/input/by-id/usb-04d9_USB_Keyboard-event-kbd" ];
|
2023-09-13 14:50:03 +02:00
|
|
|
|
|
|
|
config = ''
|
|
|
|
(defsrc
|
|
|
|
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 prtsc scrlck pp
|
|
|
|
grv 1 2 3 4 5 6 7 8 9 0 - = bspc ins home pgup
|
|
|
|
tab q w e r t y u i o p [ ] \ del end pgdn
|
|
|
|
caps a s d f g h j k l ; ' ret
|
|
|
|
lsft z x c v b n m , . / rsft up
|
|
|
|
lctl lmet lalt spc ralt rmet rctl lft down rght)
|
|
|
|
|
|
|
|
(deflayer colemak
|
|
|
|
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 prtsc @qwe pp
|
|
|
|
grv 1 2 3 4 5 6 7 8 9 0 - = bspc ins home pgup
|
|
|
|
tab q w f p g j l u y ; [ ] \ del end pgdn
|
|
|
|
@cap a r s t d h n e i o ' ret
|
|
|
|
lsft z x c v b k m , . / rsft up
|
|
|
|
lctl lmet lalt spc ralt rmet rctl lft down rght)
|
|
|
|
|
|
|
|
(deflayer qwerty
|
|
|
|
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 prtsc @col pp
|
|
|
|
grv 1 2 3 4 5 6 7 8 9 0 - = bspc ins home pgup
|
|
|
|
tab q w e r t y u i o p [ ] \ del end pgdn
|
|
|
|
@cap a s d f g h j k l ; ' ret
|
|
|
|
lsft z x c v b n m , . / rsft up
|
|
|
|
lctl lmet lalt spc ralt rmet rctl lft down rght)
|
|
|
|
|
|
|
|
(defalias
|
|
|
|
cap (tap-hold 100 100 bspc lctl)
|
|
|
|
col (layer-switch colemak)
|
|
|
|
qwe (layer-switch qwerty)
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
};
|
2023-05-28 13:22:28 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-09-06 11:38:43 +02:00
|
|
|
# xserver = {
|
|
|
|
# enable = true;
|
|
|
|
# windowManager.i3 = {
|
|
|
|
# enable = true;
|
|
|
|
# extraPackages = with pkgs; [ i3lock-color ];
|
|
|
|
# };
|
|
|
|
# };
|
2023-05-28 13:22:28 +02:00
|
|
|
};
|
|
|
|
|
2023-05-07 17:00:43 +02:00
|
|
|
security = {
|
|
|
|
polkit.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
libraspberrypi
|
2023-05-28 13:22:28 +02:00
|
|
|
raspberrypi-eeprom
|
2023-05-07 17:00:43 +02:00
|
|
|
];
|
|
|
|
|
2024-09-06 11:38:43 +02:00
|
|
|
system.stateVersion = "24.11";
|
2023-05-07 17:00:43 +02:00
|
|
|
}
|