katzen-cafe/modules/base-stuff.nix

97 lines
1.9 KiB
Nix
Raw Normal View History

2023-04-25 18:36:26 +02:00
{
2023-12-09 22:18:18 +01:00
pkgs,
modulesPath,
lib,
...
}: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
2023-08-05 18:46:25 +02:00
systemd.services."NetworkManager-wait-oline".enable = false;
networking = {
2023-12-09 22:18:18 +01:00
nameservers = ["9.9.9.9" "149.112.112.112"];
hostName = "katzen-cafe";
2023-07-30 16:24:46 +02:00
networkmanager = {
enable = true;
2023-12-09 22:18:18 +01:00
unmanaged = ["interface-name:ve-phtanumb+" "interface-name:ve-katzenwiki" "interface-name:ve-nextcloud"];
2023-07-30 16:24:46 +02:00
};
2023-12-09 22:18:18 +01:00
firewall.allowedTCPPorts = [22 80 443 2222];
2023-08-05 18:46:25 +02:00
firewall.checkReversePath = false;
2023-07-30 16:24:46 +02:00
# firewall.allowedUDPPorts = [ 25568 25569 ];
nat = {
enable = true;
2023-12-09 22:18:18 +01:00
internalInterfaces = ["ve-phtanumb+" "ve-katzenwiki" "ve-nextcloud"];
2023-07-30 16:24:46 +02:00
externalInterface = "enp1s0";
};
interfaces."enp1s0" = {
2023-12-09 22:18:18 +01:00
ipv6.addresses = [
{
address = "2a01:4f8:c17:c51f::";
prefixLength = 64;
}
];
ipv4.addresses = [
{
address = "91.107.221.11";
prefixLength = 32;
}
];
};
defaultGateway6 = {
address = "fe80::1";
interface = "enp1s0";
};
defaultGateway = {
address = "172.31.1.1";
interface = "enp1s0";
};
};
2023-04-25 18:36:26 +02:00
boot = {
kernelPackages = pkgs.linuxPackages_latest;
2023-12-09 22:18:18 +01:00
kernelParams = ["console=tty"];
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
initrd = {
2023-12-09 22:18:18 +01:00
availableKernelModules = ["xhci_pci" "virtio_pci" "usbhid" "sr_mod"];
kernelModules = ["virtio_gpu"];
};
2023-04-26 23:25:04 +02:00
};
2023-12-09 22:18:18 +01:00
programs.mosh.enable = true;
2023-04-26 23:25:04 +02:00
services.openssh = {
enable = true;
2023-07-30 16:24:46 +02:00
settings.PermitRootLogin = "prohibit-password";
2023-04-26 23:25:04 +02:00
};
environment.systemPackages = with pkgs; [
2023-12-09 22:18:18 +01:00
vim
wget
neofetch
btop
2023-04-26 23:25:04 +02:00
];
2023-04-25 18:36:26 +02:00
2023-12-09 22:18:18 +01:00
fileSystems."/" = {
2023-04-25 18:36:26 +02:00
device = "/dev/sda1";
fsType = "ext4";
};
2023-12-09 22:18:18 +01:00
fileSystems."/boot" = {
2023-04-25 18:36:26 +02:00
device = "/dev/sda3";
fsType = "vfat";
};
2023-12-09 22:18:18 +01:00
swapDevices = [
{
device = "/dev/sda2";
}
];
2023-04-25 18:36:26 +02:00
}