katzen-cafe/modules/base-stuff.nix

91 lines
2.1 KiB
Nix
Raw Normal View History

{ pkgs, modulesPath, lib, ... }:
2023-04-25 18:36:26 +02:00
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
#modules.hetzner.wan = {
#enable = true;
#macAddress = "96:00:02:1f:45:20"; # changeme
#ipAddresses = [
#"91.107.221.11/32"
#"2a01:4f8:c17:c51f::1/64"
#];
#};
#networking.useDHCP = lib.mkDefault true;
networking = {
nameservers = [ "9.9.9.9" "149.112.112.112" ];
hostName = "katzen-cafe";
networkmanager.enable = true;
firewall.allowedTCPPorts = [ 22 80 443 ];
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
};
#networking.interfaces.enp1s0.ipv6.addresses = [ { address = "2a01:4f8:c17:c51f::1/64"; prefixLength = 64; } ];
#networking.defaultGateway6 = { address = "fe80::1"; interface = "enp1s0"; };
2023-04-26 23:25:04 +02:00
2023-05-06 03:19:19 +02:00
#users.users.april = {
#isNormalUser = true;
#packages = with pkgs; [ git ];
#createHome = true;
#extraGroups = [ "docker" ];
#openssh.authorizedKeys.keys = [
#"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMxsX+lEWkHZt9NOvn9yYFP0Z++186LY4b97C4mwj/f2 waterdev@galaxycrow.de"
#];
#};
2023-04-26 23:25:04 +02:00
services.openssh = {
enable = true;
permitRootLogin = "prohibit-password";
};
environment.systemPackages = with pkgs; [
2023-04-30 14:56:30 +02: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
} ];
}