katzen-cafe/modules/base-stuff.nix

83 lines
1.8 KiB
Nix
Raw Normal View History

{ pkgs, modulesPath, lib, ... }:
2023-04-25 18:36:26 +02:00
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
2023-08-05 18:46:25 +02:00
systemd.services."NetworkManager-wait-oline".enable = false;
networking = {
nameservers = [ "9.9.9.9" "149.112.112.112" ];
hostName = "katzen-cafe";
2023-07-30 16:24:46 +02:00
networkmanager = {
enable = true;
2023-08-05 18:46:25 +02:00
unmanaged = [ "interface-name:ve-phtanumb+" "interface-name:ve-katzenwiki" "interface-name:ve-nextcloud" ];
2023-07-30 16:24:46 +02: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-08-05 18:46:25 +02:00
internalInterfaces = [ "ve-phtanumb+" "ve-katzenwiki" "ve-nextcloud" ];
2023-07-30 16:24:46 +02:00
externalInterface = "enp1s0";
};
2023-08-05 18:46:25 +02:00
interfaces."enp1s0" = {
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;
kernelParams = [ "console=tty" ];
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
initrd = {
availableKernelModules = [ "xhci_pci" "virtio_pci" "usbhid" "sr_mod" ];
kernelModules = [ "virtio_gpu" ];
};
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-11-21 08:12:49 +01:00
vim wget neofetch btop
2023-04-26 23:25:04 +02:00
];
2023-04-25 18:36:26 +02:00
fileSystems."/" = {
device = "/dev/sda1";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/sda3";
fsType = "vfat";
};
swapDevices = [ {
2023-04-26 23:25:04 +02:00
device = "/dev/sda2";
2023-04-25 18:36:26 +02:00
} ];
}