nicks-nix-config/hosts/Alaska/default.nix

81 lines
1.9 KiB
Nix
Raw Normal View History

2023-03-31 17:38:15 -07:00
{ config, lib, pkgs, ... }:
2023-03-31 17:38:15 -07:00
{
2023-04-04 22:56:30 -07:00
imports = [
(import ./hardware-configuration.nix)
2023-10-08 17:30:00 -07:00
(import ./modules/dnsmasq.nix)
2023-08-05 09:56:57 -07:00
(import ./modules/forgejo.nix)
(import ./modules/nginx.nix)
2023-04-10 20:23:37 -07:00
(import ./modules/nextcloud.nix)
2023-08-25 20:26:33 -07:00
(import ./modules/nicks_nextcould_integrations.nix)
(import ./modules/msmtp.nix)
2023-08-05 09:56:57 -07:00
(import ./modules/headscale.nix)
(import ./modules/tailscale.nix)
2023-04-04 22:56:30 -07:00
];
networking.hosts = {
"100.64.0.1" = ["files.nickiel.net" "git.nickiel.net" "nickiel.net" "jellyfin.nickiel.net" ];
};
2023-04-03 22:18:54 -07:00
environment.systemPackages = [
pkgs.mdadm
#pkgs.jellyfin-ffmpeg
2023-05-03 18:31:26 -07:00
pkgs.hddtemp
pkgs.smartmontools
2023-04-03 22:18:54 -07:00
];
2023-05-03 18:31:26 -07:00
services.xserver.videoDrivers = [ "nvidia" ];
hardware.opengl.enable = true;
2023-04-04 22:56:30 -07:00
networking = {
nat = {
enable = true;
internalInterfaces = ["ve-+"];
externalInterface = "enp2s0"; # Make sure this is actually set to your internet adapter
# You can find a list with `ip a` and look for the first identifier after the number (e.g.: 1: enp2s0)
2023-04-04 22:56:30 -07:00
# Lazy IPv6 connectivity for the container
enableIPv6 = true;
};
firewall = {
enable = true;
2023-10-08 17:30:00 -07:00
allowedTCPPorts = [53 80 443 3001 5432]; # port 3001 opened to allow git traffic on the local netword
allowedUDPPorts = [53];
2023-04-04 22:56:30 -07:00
};
};
2023-04-10 19:33:56 -07:00
services.jellyfin = {
enable = true;
openFirewall = true;
};
2023-03-31 22:19:55 -07:00
services = {
sshd.enable = true;
2023-04-02 22:45:13 -07:00
openssh.settings = {
PasswordAuthentication = false;
2023-04-02 22:45:13 -07:00
PermitRootLogin = "no";
2023-04-02 22:48:25 -07:00
X11Forwarding = true;
2023-04-02 22:41:29 -07:00
};
2023-03-31 22:19:55 -07:00
};
systemd.services.sshd.wantedBy = [ "multi-user.target" ];
boot.swraid = {
enable = true;
mdadmConf = builtins.readFile ./rsrcs/mdadm.conf;
};
boot.loader = {
2023-03-31 22:19:55 -07:00
systemd-boot.enable = true;
efi = {
canTouchEfiVariables = true;
2023-03-31 22:25:57 -07:00
efiSysMountPoint = "/boot/efi";
};
};
2023-04-04 15:24:13 -07:00
environment.etc."mdadm.conf".text = ''
2023-04-04 22:56:30 -07:00
MAILADDR nicholasyoungsumner@gmail.com
2023-04-04 15:24:13 -07:00
'';
}