nixos-config/machines/thor/configuration.nix

139 lines
3.8 KiB
Nix
Raw Normal View History

2023-05-07 17:00:43 +02:00
{ nixpkgs, nixos-hardware, ... }:
2023-05-28 13:22:28 +02:00
{ pkgs, config, ... }:
2023-05-07 17:00:43 +02:00
{
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;
};
2023-05-28 13:22:28 +02:00
fonts = {
enable = true;
2023-05-28 13:22:28 +02:00
iosevka-aile = false;
};
2023-05-28 13:22:28 +02:00
gnome.enable = true;
lightdm.enable = true;
2023-05-07 17:00:43 +02:00
networking.enable = true;
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;
raspberry-pi."4".fkms-3d = {
2023-05-28 13:22:28 +02:00
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;
2023-05-07 17:00:43 +02:00
};
zramSwap.enable = true;
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 = {
enable = true;
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
};
};
2023-09-13 14:50:03 +02:00
xserver = {
2023-05-28 13:22:28 +02:00
enable = true;
2023-09-13 14:50:03 +02:00
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
];
system.stateVersion = "23.05";
}