2024-08-31 14:05:17 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
tree,
|
|
|
|
...
|
|
|
|
}: let
|
2024-09-03 19:22:10 +01:00
|
|
|
inherit (lib.lists) flatten forEach;
|
|
|
|
inherit (lib.modules) mkForce;
|
2024-08-31 14:05:17 +01:00
|
|
|
in {
|
|
|
|
nixpkgs.overlays = [
|
2024-09-03 19:22:10 +01:00
|
|
|
(_final: prev: {
|
2024-08-31 14:05:17 +01:00
|
|
|
makeModulesClosure = x:
|
2024-09-03 19:22:10 +01:00
|
|
|
prev.makeModulesClosure (x // {allowMissing = true;});
|
2024-08-31 14:05:17 +01:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
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
|
|
|
])
|
|
|
|
|
2024-09-03 19:22:10 +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
|
|
|
|
]);
|
|
|
|
|
2024-09-03 19:22:10 +01:00
|
|
|
services.displayManager = {
|
|
|
|
defaultSession = "kodi";
|
|
|
|
autoLogin = {
|
|
|
|
enable = true;
|
|
|
|
user = "chaos";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.xserver.displayManager.gdm.autoLogin.delay = 10;
|
|
|
|
|
2024-08-31 14:05:17 +01:00
|
|
|
networking.firewall = {
|
|
|
|
enable = true;
|
2024-09-03 19:22:10 +01:00
|
|
|
|
2024-08-31 14:05:17 +01:00
|
|
|
allowPing = true;
|
2024-08-31 14:13:39 +01:00
|
|
|
checkReversePath = "loose";
|
2024-09-03 19:22:10 +01:00
|
|
|
|
2024-08-31 14:13:39 +01:00
|
|
|
allowedTCPPorts = [22];
|
2024-08-31 14:05:17 +01:00
|
|
|
};
|
|
|
|
|
2024-09-03 19:22:10 +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";
|
|
|
|
}
|