From b3f1de1a7dd3887a872f0434c210d473cdd52a5b Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Mon, 5 Feb 2024 22:44:35 +0100 Subject: [PATCH] lp2 config --- modules/desktop/gaming.nix | 10 +---- modules/desktop/gnome-home.nix | 1 + modules/hardware/intel.nix | 14 +++++++ modules/hardware/vinzenz-lpt2.nix | 61 ++++++++++++++----------------- modules/nixpkgs.nix | 2 +- 5 files changed, 45 insertions(+), 43 deletions(-) diff --git a/modules/desktop/gaming.nix b/modules/desktop/gaming.nix index 88b9c6a..a8715a8 100644 --- a/modules/desktop/gaming.nix +++ b/modules/desktop/gaming.nix @@ -29,15 +29,7 @@ in { mangohud vulkan-tools glxinfo - - (lutris.override { - extraPkgs = pkgs: [ - # List package dependencies here - ]; - extraLibraries = pkgs: [ - # List library dependencies here - ]; - }) + lutris ]; programs = { diff --git a/modules/desktop/gnome-home.nix b/modules/desktop/gnome-home.nix index 92a3635..dfe0907 100644 --- a/modules/desktop/gnome-home.nix +++ b/modules/desktop/gnome-home.nix @@ -25,6 +25,7 @@ in { caffeine appindicator gsconnect + battery-health-charging ]); dconf.settings = { diff --git a/modules/hardware/intel.nix b/modules/hardware/intel.nix index 177ba55..d38b194 100644 --- a/modules/hardware/intel.nix +++ b/modules/hardware/intel.nix @@ -9,6 +9,7 @@ in { options.my.hardware.intel = { cpu = lib.mkEnableOption "intel cpu"; iGpu = lib.mkEnableOption "intel integrated gpu"; + xe = lib.mkEnableOption "intel xe gpu"; }; config = lib.mkMerge [ @@ -35,5 +36,18 @@ in { nvtop-intel ]; }) + (lib.mkIf cfg.xe { + hardware.opengl = { + extraPackages = with pkgs; [ + intel-media-driver + vaapiIntel + vaapiVdpau + libvdpau-va-gl + ]; + }; + environment.systemPackages = with pkgs; [ + nvtop-intel + ]; + }) ]; } diff --git a/modules/hardware/vinzenz-lpt2.nix b/modules/hardware/vinzenz-lpt2.nix index 5aec4f5..a56f735 100644 --- a/modules/hardware/vinzenz-lpt2.nix +++ b/modules/hardware/vinzenz-lpt2.nix @@ -1,40 +1,35 @@ -# 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, ... }: - -{ - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/e4dad0c8-26a1-45e9-bbd9-48565eb6574e"; - fsType = "btrfs"; - options = [ "subvol=@" ]; +{...}: { + config = { + my.hardware = { + enableCommonDesktopSettings = true; + intel = { + cpu = true; + xe = true; + }; }; - boot.initrd.luks.devices."luks-2c654ff2-3c42-48d3-a1e3-9545679afaa3".device = "/dev/disk/by-uuid/2c654ff2-3c42-48d3-a1e3-9545679afaa3"; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/E2B7-2BC1"; - fsType = "vfat"; + boot.initrd = { + availableKernelModules = ["xhci_pci" "thunderbolt" "nvme"]; + luks.devices = { + "luks-2c654ff2-3c42-48d3-a1e3-9545679afaa3" = { + device = "/dev/disk/by-uuid/2c654ff2-3c42-48d3-a1e3-9545679afaa3"; + }; + }; }; - swapDevices = [ ]; + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/e4dad0c8-26a1-45e9-bbd9-48565eb6574e"; + fsType = "btrfs"; + options = ["subvol=@"]; + }; - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; + "/boot" = { + device = "/dev/disk/by-uuid/E2B7-2BC1"; + fsType = "vfat"; + }; + }; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + swapDevices = []; + }; } diff --git a/modules/nixpkgs.nix b/modules/nixpkgs.nix index fa3d0e4..5f7ae01 100644 --- a/modules/nixpkgs.nix +++ b/modules/nixpkgs.nix @@ -3,7 +3,7 @@ lib, ... }: let - unstable-commit-sha = "e92039b55bcd58469325ded85d4f58dd5a4eaf58"; + unstable-commit-sha = "e92b6015881907e698782c77641aa49298330223"; ultrastable-commit-sha = "5de0b32be6e85dc1a9404c75131316e4ffbc634c"; in { options.my.allowUnfreePackages = lib.mkOption {