nixos-config/machines/thor/configuration.nix
2023-09-13 14:50:03 +02:00

140 lines
3.8 KiB
Nix

{ nixpkgs, nixos-hardware, ... }:
{ pkgs, config, ... }:
{
imports = [
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
nixos-hardware.nixosModules.raspberry-pi-4
../../users/root
../../users/erwin
./home.nix
];
eboskma = {
users.erwin = {
enable = true;
};
desktop = {
enable = true;
};
fonts = {
enable = true;
iosevka-aile = false;
};
gnome.enable = true;
lightdm.enable = true;
networking.enable = true;
nix-common = {
enable = true;
remote-builders = true;
};
systemd.enable = true;
};
# nixpkgs.crossSystem.system = "aarch64-linux";
hardware = {
# deviceTree.filter = "bcm2711-rpi-4-b.dtb";
enableAllFirmware = true;
raspberry-pi."4".fkms-3d = {
enable = false;
cma = 512;
};
};
boot = {
bootspec.enable = true;
growPartition = true;
};
zramSwap.enable = true;
sdImage.compressImage = false;
time.timeZone = "Europe/Amsterdam";
networking = {
hostName = "thor";
useDHCP = true;
useNetworkd = true;
wireless.enable = true;
};
systemd.network = {
enable = true;
networks = {
"40-eth0" = {
DHCP = "yes";
};
};
};
services = {
openssh.enable = true;
tailscale.enable = true;
kanata = {
enable = true;
keyboards = {
code = {
devices = [
"/dev/input/by-id/usb-04d9_USB_Keyboard-event-kbd"
];
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)
)
'';
};
};
};
xserver = {
enable = true;
windowManager.i3 = {
enable = true;
extraPackages = with pkgs; [ i3lock-color ];
};
};
};
security = {
polkit.enable = true;
};
environment.systemPackages = with pkgs; [
libraspberrypi
raspberrypi-eeprom
];
system.stateVersion = "23.05";
}