(auxin) fixed gpu?

This commit is contained in:
ArgentumCation 2025-01-12 22:06:11 -05:00
parent e1a90662d9
commit bc9c85aa64
2 changed files with 61 additions and 51 deletions

View file

@ -1,9 +1,9 @@
{ config
, lib
, pkgs
, ...
}:
let
{
config,
lib,
pkgs,
...
}: let
ports = [
111 # RPC?
2049 # NFS
@ -28,9 +28,8 @@ let
8842 # Crowdsec (-> 8842)
8888 # Kodi
9000 # Portainer (-> 9443)
];#// lib.lists.range 6800 7568 ;
in
{
]; #// lib.lists.range 6800 7568 ;
in {
imports = [
# Include the results of the hardware scan.
# ./hardware-configuration.nix
@ -43,12 +42,14 @@ in
};
networking = {
interfaces.enp5s0f0u1c2.ipv4.addresses = [{
address = "192.168.2.153";
prefixLength = 24;
}];
interfaces.enp5s0f0u1c2.ipv4.addresses = [
{
address = "192.168.2.153";
prefixLength = 24;
}
];
# hostName = "auxin"; # Define your hostname.
nameservers = [ "192.168.1.1" ];
nameservers = ["192.168.1.1"];
firewall = {
enable = true;
allowedUDPPorts = ports;
@ -59,6 +60,7 @@ in
};
};
environment.sessionVariables = {LIBVA_DRIVER_NAME = "iHD";}; #
environment.systemPackages = with pkgs; [
alacritty
czkawka
@ -188,11 +190,20 @@ in
inputstream-adaptive
]);
};
displayManager.lightdm.greeter.enable = false;
};
displayManager.autoLogin ={ enable = true; user="mira";};
btrbk = { }; # TODO:
caddy = { }; # TODO:
displayManager = {
sddm = {
enable = true;
wayland.enable = false;
};
autoLogin = {
enable = false;
user = "mira";
};
};
btrbk = {}; # TODO:
caddy = {}; # TODO:
fail2ban = {
enable = true;
ignoreIP = [
@ -253,7 +264,8 @@ in
virtualisation.libvirtd.enable = true;
# TODO:
powerManagement.enable = lib.mkForce
powerManagement.enable =
lib.mkForce
false;
systemd = {
targets = {
@ -261,7 +273,7 @@ in
suspend.enable = false;
};
timers."qbittorrent-healthcheck" = {
wantedBy = [ "timers.target" ];
wantedBy = ["timers.target"];
timerConfig = {
OnCalendar = "*/5 * * * *";
Unit = "qbittorrent-healthcheck";
@ -282,7 +294,7 @@ in
unitConfig = {
RequiresMountsFor = "/raid";
};
wantedBy = [ "graphical.target" ];
wantedBy = ["graphical.target"];
};
# TODO: switch to ntfy?
sshdAlert = {
@ -296,12 +308,11 @@ in
${pkgs.curl}/bin/curl --request POST --url https://discord.com/api/webhooks/1235751608046846012/CU7tz271Z3Rbq9mPV0_rB5RBCRDhLKhGH14ebBm-TePpWFqKKJaCRYVMHYTJsIaSq2H- --header 'Content-Type: application/json' --data '{"username": "Auxin SSH status","avatar_url": "https://pbs.twimg.com/media/GMPtuovaQAAQ7Qr?format=png&name=large","content": "SSHD is Running!"}'
'';
};
wantedBy = [ "multi-user.target" ];
wantedBy = ["multi-user.target"];
};
};
};
system = {
stateVersion = "23.11"; # NOTE: Don't fuck with this
};
}

View file

@ -1,11 +1,12 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config
, lib
, pkgs
, modulesPath
, ...
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
@ -17,36 +18,35 @@
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "uas" "usbcore" ];
# initrd.kernelModules = ["i915" ];
kernelModules = [ "kvm-amd" "iscsi_tcp" ];
extraModulePackages = [ ];
kernelPackages = pkgs.linuxPackages_latest;
# kernelParams = [
# "i915.enable_guc=0"
# ];
initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "uas" "usbcore"];
# initrd.kernelModules = ["i915"];
kernelModules = ["kvm-amd" "iscsi_tcp"];
extraModulePackages = [];
kernelParams = ["i915.force_probe=56a5"
#"i915.enable_guc=0"
];
# kernelPackages = pkgs.linuxPackages_latest;
};
fileSystems."/" = {
device = "/dev/disk/by-label/SYSTEM";
fsType = "btrfs";
options = [ "subvol=@nixos" "noatime" ];
options = ["subvol=@nixos" "noatime"];
};
fileSystems."/raid" = {
device = "//192.168.2.146/raid";
fsType = "cifs";
options = ["credentials=/etc/nixos/smb-secrets" "_netdev" "uid=1000" "gid=1000" "file_mode=0777" "dir_mode=0777" ];
options = ["credentials=/etc/nixos/smb-secrets" "_netdev" "uid=1000" "gid=1000" "file_mode=0777" "dir_mode=0777"];
};
fileSystems."/nix" = {
device = "/dev/disk/by-label/SYSTEM";
fsType = "btrfs";
options = [ "subvol=@nix" "noatime" ];
options = ["subvol=@nix" "noatime"];
};
fileSystems."/home" = {
device = "/dev/disk/by-label/SYSTEM";
fsType = "btrfs";
options = [ "subvol=@home" "noatime" "compress=zstd" ];
options = ["subvol=@home" "noatime" "compress=zstd"];
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/ESP";
@ -60,17 +60,16 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware = {
enableRedistributableFirmware = true;
enableRedistributableFirmware = true;
# pulseaudio.enable = true;
# pulseaudio.support32Bit = true; ## If compatibility with 32-bit applications is desired.
# graphics = {
# enable = true;
# # extraPackages = with pkgs; [
# # # intel-vaapi-driver
# # intel-media-driver
# # libvdpau-va-gl
# # ];
# };
graphics = {
enable = true;
extraPackages = with pkgs; [
vpl-gpu-rt
intel-media-driver
libvdpau-va-gl
];
};
};
}