2023-12-17 21:42:07 -08:00
|
|
|
{ config, user, ... }:
|
2023-02-25 17:19:34 -08:00
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
imports = [
|
2023-10-08 18:01:51 -07:00
|
|
|
(import ./../../modules/xrdp.nix)
|
2023-02-25 17:19:34 -08:00
|
|
|
./hardware-configuration.nix
|
|
|
|
];
|
2023-05-06 10:36:52 -07:00
|
|
|
|
2023-10-08 18:01:51 -07:00
|
|
|
networking = {
|
|
|
|
firewall = {
|
|
|
|
checkReversePath = "loose";
|
|
|
|
trustedInterfaces = [ "tailscale0" ];
|
2023-12-02 18:20:32 -08:00
|
|
|
allowedUDPPorts = [ config.services.tailscale.port 11100];
|
|
|
|
allowedTCPPorts = [ 11100 ];
|
2023-10-08 18:01:51 -07:00
|
|
|
};
|
2023-08-05 10:30:10 -07:00
|
|
|
|
2023-10-08 18:01:51 -07:00
|
|
|
nameservers = ["10.0.0.183" "1.1.1.1"];
|
|
|
|
|
|
|
|
hosts = {
|
2023-11-21 17:08:15 -08:00
|
|
|
"10.0.0.183" = [ "headscale.nickiel.net" ];
|
2023-10-08 18:01:51 -07:00
|
|
|
"100.64.0.1" = ["files.nickiel.net" "git.nickiel.net" "nickiel.net" "jellyfin.nickiel.net" ];
|
|
|
|
};
|
|
|
|
};
|
2023-10-08 12:58:03 -07:00
|
|
|
services = {
|
|
|
|
tailscale.enable = true;
|
|
|
|
sshd.enable = true;
|
|
|
|
openssh.settings = {
|
|
|
|
PasswordAuthentication = false;
|
|
|
|
PermitRootLogin = "no";
|
|
|
|
X11Forwarding = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
systemd.services.sshd.wantedBy = [ "multi-user.target" ];
|
|
|
|
|
2023-10-22 19:21:36 -07:00
|
|
|
services.xserver = {
|
|
|
|
videoDrivers = [ "nvidia" ];
|
|
|
|
# xrandr for screen information. <connection>: <resolution> <offset>, <next connection>
|
|
|
|
# Option "nvidiaXineramaInfoOrder" "DFP-0"
|
|
|
|
screenSection = ''
|
2023-10-28 13:46:56 -07:00
|
|
|
Option "metamodes" "DP-4: 2560x1440 +1920+0, DP-2: 1920x1080 +0+360"
|
2023-10-22 19:21:36 -07:00
|
|
|
'';
|
|
|
|
};
|
2023-02-26 18:02:09 -08:00
|
|
|
hardware.opengl.enable = true;
|
2023-02-25 17:19:34 -08:00
|
|
|
|
2023-02-26 18:02:09 -08:00
|
|
|
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
|
|
|
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
2023-10-23 17:59:48 -07:00
|
|
|
hardware.nvidia.modesetting.enable = true;
|
2023-02-26 18:02:09 -08:00
|
|
|
|
2023-02-25 17:19:34 -08:00
|
|
|
hardware.bluetooth.enable = true;
|
|
|
|
|
2023-10-23 17:59:48 -07:00
|
|
|
environment.sessionVariables = {
|
2023-10-24 18:31:26 -07:00
|
|
|
# Resolves jellyfin black screen under hyprland
|
|
|
|
# See also: https://github.com/jellyfin/jellyfin-media-player/issues/165#issuecomment-1030690851
|
|
|
|
QT_QPA_PLATFORM = "xcb";
|
2023-10-23 17:59:48 -07:00
|
|
|
};
|
|
|
|
|
2023-02-25 17:19:34 -08:00
|
|
|
|
|
|
|
boot.loader = {
|
|
|
|
efi = {
|
|
|
|
canTouchEfiVariables = true;
|
|
|
|
efiSysMountPoint = "/boot";
|
|
|
|
};
|
|
|
|
grub = {
|
2023-08-05 09:30:37 -07:00
|
|
|
enable = true;
|
2023-02-25 17:19:34 -08:00
|
|
|
devices = [ "nodev" ];
|
|
|
|
efiSupport = true;
|
2023-08-05 09:30:37 -07:00
|
|
|
useOSProber = false;
|
2023-02-25 17:19:34 -08:00
|
|
|
extraEntries = ''
|
2023-08-05 09:30:37 -07:00
|
|
|
menuentry 'Windows Boot Manager (on /dev/sda2)' --class windows --class os $menuentry_id_option 'osprober-efi-6877-BD74' {
|
|
|
|
insmod part_gpt
|
|
|
|
insmod fat
|
|
|
|
set root='hd0,gpt2'
|
|
|
|
if [ x$feature_platform_search_hint = xy ]; then
|
|
|
|
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 6877-BD74
|
|
|
|
else
|
|
|
|
search --no-floppy --fs-uuid --set=root 6877-BD74
|
|
|
|
fi
|
|
|
|
chainloader /efi/Microsoft/Boot/bootmgfw.efi
|
|
|
|
}
|
2023-02-25 17:19:34 -08:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|