nixfiles/hosts/raspberry-pi5/raspberry-pi5.nix

86 lines
1.6 KiB
Nix
Raw Normal View History

2024-08-31 14:05:17 +01:00
{
lib,
tree,
...
}: let
inherit (lib.lists) flatten forEach;
inherit (lib.modules) mkForce;
2024-08-31 14:05:17 +01:00
in {
imports = flatten (with tree; [
users.root
users.chaos
2024-08-31 14:13:39 +01:00
(with tree.profiles.nixos; [
sshd
2024-08-31 15:54:07 +01:00
tor
2024-08-31 14:24:08 +01:00
wifiHardware
2024-08-31 14:13:39 +01:00
nixGC
serverExtras
2024-08-31 14:05:17 +01:00
])
2024-08-31 15:54:07 +01:00
(with tree.presets.nixos; [
serverBase
2024-08-31 15:58:32 +01:00
2024-08-31 15:54:07 +01:00
desktopGui
])
2024-08-31 14:05:17 +01:00
(with presets.home-manager.by-user; [
root.base
2024-08-31 15:54:07 +01:00
chaos.base
chaos.guiDesktop
2024-08-31 14:05:17 +01:00
])
(with tree.hosts.raspberry-pi5.profiles; [
kodi
])
(forEach [
"minecraft"
] (name: ./containers + "/${name}/${name}.nix"))
2024-08-31 14:05:17 +01:00
./hardware.nix
]);
services.displayManager = {
defaultSession = "kodi";
autoLogin = {
2024-09-04 14:39:57 +01:00
enable = false;
user = "chaos";
};
};
2024-09-04 20:25:07 +01:00
services.desktopManager.plasma6.enable = true;
2024-09-04 14:42:44 +01:00
home-manager.users.root.imports = with tree.profiles.home-manager; [dev.all];
home-manager.users.chaos.imports = with tree.profiles.home-manager; [dev.all];
2024-09-04 14:39:57 +01:00
2024-09-04 13:53:06 +01:00
services.xserver.displayManager.gdm.autoLogin.delay = 5;
2024-08-31 14:05:17 +01:00
networking.firewall = {
enable = true;
2024-08-31 14:05:17 +01:00
allowPing = true;
2024-08-31 14:13:39 +01:00
checkReversePath = "loose";
2024-08-31 14:13:39 +01:00
allowedTCPPorts = [22];
2024-08-31 14:05:17 +01:00
};
networking.nat = {
enable = true;
internalInterfaces = ["ve-+"];
externalInterface = "end0";
};
networking.networkmanager.enable = mkForce false;
networking.useDHCP = mkForce false;
2024-08-31 15:37:15 +01:00
networking.hostName = "raspberry-pi5";
2024-08-31 14:05:17 +01:00
time.timeZone = "Europe/London";
system.stateVersion = "24.05";
home-manager.users.root.home.stateVersion = "24.05";
home-manager.users.chaos.home.stateVersion = "24.05";
}