fix: adjust for laptops' needs

This commit is contained in:
Alexandre Cavalheiro 2024-02-28 06:48:35 -03:00
parent 392a94a4ec
commit 428cc395c9
Signed by: wizardlink
GPG key ID: A5767B54367CFBDF
7 changed files with 24 additions and 120 deletions

View file

@ -5,45 +5,26 @@
{ {
imports = imports =
[ [ (modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ { device = "/dev/disk/by-uuid/796d5ad8-db83-4c4f-883d-2f1f4f1937de";
device = "/dev/disk/by-uuid/65e4c115-aff0-4c0e-8799-7309a25ecab6";
fsType = "ext4"; fsType = "ext4";
}; };
boot.initrd.luks.devices."luks-94d233be-889a-46a4-9c20-b7f026980cbf".device = "/dev/disk/by-uuid/94d233be-889a-46a4-9c20-b7f026980cbf";
fileSystems."/boot" = fileSystems."/boot" =
{ { device = "/dev/disk/by-uuid/CA05-302F";
device = "/dev/disk/by-uuid/2EFE-3A26";
fsType = "vfat"; fsType = "vfat";
}; };
fileSystems."/mnt/ssd" =
{
device = "/dev/disk/by-uuid/f27f2224-d351-46fd-89f5-991de36166ad";
fsType = "ext4";
};
fileSystems."/mnt/internal" =
{
device = "/dev/disk/by-uuid/b8541c0d-9146-4388-b217-431f196957cc";
fsType = "ext4";
};
fileSystems."/mnt/media" =
{
device = "/dev/disk/by-uuid/52c17b8b-46c1-4870-b86c-c3b9f4bd4434";
fsType = "ext4";
};
swapDevices = [ ]; swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
@ -52,7 +33,7 @@
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
# networking.interfaces.docker0.useDHCP = lib.mkDefault true; # networking.interfaces.docker0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp5s0.useDHCP = lib.mkDefault true; # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View file

@ -13,9 +13,6 @@
[ [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
# Include service configuration
./services/caddy.nix
./services/jellyfin.nix
]; ];
# Enable experimental features # Enable experimental features
@ -46,9 +43,6 @@
# Kernel # Kernel
boot.kernelPackages = pkgs.linuxPackages_xanmod_latest; boot.kernelPackages = pkgs.linuxPackages_xanmod_latest;
# Add AMD drivers.
boot.initrd.kernelModules = [ "amdgpu" ];
# TODO: FIX IT BEING BEING OVERWRITTEN # TODO: FIX IT BEING BEING OVERWRITTEN
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
@ -74,18 +68,9 @@
# Open ports in the firewall. # Open ports in the firewall.
networking.firewall = { networking.firewall = {
allowedTCPPorts = [ allowedTCPPorts = [ ];
11753 # OpenRCT2
443 # SSL
80 # HTTP
];
allowedUDPPorts = [ allowedUDPPorts = [ ];
11753 # OpenRCT2
2626 # Dolphin emulator
27015 # Source games
8211 # Palworld
];
allowedTCPPortRanges = [ allowedTCPPortRanges = [
{ from = 1714; to = 1764; } # KDEConnect { from = 1714; to = 1764; } # KDEConnect
@ -114,8 +99,6 @@
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDdGOyRbu6IOw9yqotxE6m7wCif7oP/2D0tlREa5Q6uo Alexandre Cavalheiro S. Tiago da Silva <contact@thewizard.link>" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDdGOyRbu6IOw9yqotxE6m7wCif7oP/2D0tlREa5Q6uo Alexandre Cavalheiro S. Tiago da Silva <contact@thewizard.link>"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIISfCUsZrnCMZapdrvkUCrdRiX+1xuZBdGrynNRzDI2v" # SpaceEEC
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPInBFp7zBLhFluoww65CZzcnMdhndTawBv8QYJ5s/Xt david.alejandro.rubio@gmail.com" # Kodehawa
]; ];
}; };
@ -163,12 +146,6 @@
}; };
services.blueman.enable = true; services.blueman.enable = true;
# Enable openrazer for managing Razer products' configuration
hardware.openrazer = {
enable = true;
users = [ "wizardlink" ];
};
# Enable xpadneo support. # Enable xpadneo support.
hardware.xpadneo.enable = true; hardware.xpadneo.enable = true;
@ -301,11 +278,6 @@
## Libraries ## Libraries
libsForQt5.qt5.qtgraphicaleffects libsForQt5.qt5.qtgraphicaleffects
libsForQt5.qt5.qtquickcontrols2 libsForQt5.qt5.qtquickcontrols2
pkgsi686Linux.gperftools # Needed for TF2 rn :(
## Hardware specific
openrazer-daemon # Razor products back-end
polychromatic # and it's Front-end
]; ];
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are

View file

@ -82,8 +82,7 @@
autogenerated = 0 # remove this line to remove the warning autogenerated = 0 # remove this line to remove the warning
# See https://wiki.hyprland.org/Configuring/Monitors/ # See https://wiki.hyprland.org/Configuring/Monitors/
monitor = DP-3, 1920x1080@75, 2560x0, 1 monitor = eDP-1, 1920x1080@60.00800, 0x0, 1
monitor = DP-2, 2560x1440@165, 0x0, 1
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more
@ -115,7 +114,7 @@
} }
device:wacom-bamboo-one-m-pen { device:wacom-bamboo-one-m-pen {
output = DP-2 output = eDP-1
} }
general { general {
@ -190,16 +189,16 @@
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# Bind workspaces to specific monitors # Bind workspaces to specific monitors
workspace = 1, monitor:DP-2 workspace = 1, monitor:eDP-1
workspace = 2, monitor:DP-3 workspace = 2, monitor:eDP-1
workspace = 3, monitor:DP-2 workspace = 3, monitor:eDP-1
workspace = 4, monitor:DP-3 workspace = 4, monitor:eDP-1
workspace = 5, monitor:DP-2 workspace = 5, monitor:eDP-1
workspace = 6, monitor:DP-3 workspace = 6, monitor:eDP-1
workspace = 7, monitor:DP-2 workspace = 7, monitor:eDP-1
workspace = 8, monitor:DP-3 workspace = 8, monitor:eDP-1
workspace = 9, monitor:DP-2 workspace = 9, monitor:eDP-1
workspace = 0, monitor:DP-3 workspace = 0, monitor:eDP-1
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER $mainMod = SUPER

View file

@ -2,5 +2,5 @@
FILE_PATH="/mnt/internal/personal/screenshots/$(date +'%Y-%m-%d_%H-%M-%S').png" FILE_PATH="/mnt/internal/personal/screenshots/$(date +'%Y-%m-%d_%H-%M-%S').png"
grim -t png -o DP-2 $FILE_PATH grim -t png -o eDP-1 $FILE_PATH
wl-copy <$FILE_PATH wl-copy <$FILE_PATH

View file

@ -8,15 +8,11 @@ waybar &
# #
## Start wallpaper daemon and set one. ## Start wallpaper daemon and set one.
# #
OUTPUT_1="DP-2" OUTPUT_1="eDP-1"
IMAGE_1="/mnt/internal/personal/wallpapers/wallhaven-g71xoe.jpg" IMAGE_1="~/Pictures/wallhaven-x6p3y3.jpg"
OUTPUT_2="DP-3"
IMAGE_2="/mnt/internal/personal/wallpapers/wallhaven-3zjexv.jpg"
function load_wallpapers() { function load_wallpapers() {
swww img -t any --transition-bezier 0.0,0.0,1.0,1.0 --transition-duration .8 --transition-step 255 --transition-fps 60 -o $OUTPUT_1 $IMAGE_1; swww img -t any --transition-bezier 0.0,0.0,1.0,1.0 --transition-duration .8 --transition-step 255 --transition-fps 60 -o $OUTPUT_1 $IMAGE_1;
swww img -t any --transition-bezier 0.0,0.0,1.0,1.0 --transition-duration .8 --transition-step 255 --transition-fps 60 -o $OUTPUT_2 $IMAGE_2
} }
if ! swww query; then if ! swww query; then

View file

@ -1,24 +0,0 @@
{ ... }:
{
services.caddy = {
enable = true;
virtualHosts."thewizard.link".extraConfig = ''
redir https://github.com/wizardlink/
header Strict-Transport-Security "max-age=63072000; includeSubDomains"
'';
virtualHosts."jellyfin.thewizard.link".extraConfig = ''
encode gzip
reverse_proxy 127.0.0.1:8096 {
flush_interval -1
}
'';
virtualHosts."foundry.thewizard.link".extraConfig = ''
reverse_proxy 127.0.0.1:30000 {
flush_interval -1
}
'';
};
}

View file

@ -1,20 +0,0 @@
{ pkgs, ... }:
{
services.jellyfin = {
enable = true;
openFirewall = true;
user = "wizardlink";
package = pkgs.jellyfin.override {
jellyfin-web = pkgs.jellyfin-web.overrideAttrs (oldAttrs: {
patches = [
(pkgs.fetchpatch {
url = "https://github.com/jellyfin/jellyfin-web/compare/v${oldAttrs.version}...ConfusedPolarBear:jellyfin-web:intros.diff";
hash = "sha256-qm4N4wMUFc4I53oQJUK1Six0cahVYz3J+FgO2vvSvXM=";
})
];
});
};
};
}