diff --git a/configurations/desktop/configuration.nix b/configurations/desktop/configuration.nix index 9f8bd39f..e5e954e1 100644 --- a/configurations/desktop/configuration.nix +++ b/configurations/desktop/configuration.nix @@ -90,6 +90,45 @@ # remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play # dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server gamescopeSession.enable = true; + + #package = pkgs.steam.override { + # extraLibraries = p: with p; [ + # gfxreconstruct + # glslang + # spirv-cross + # spirv-headers + # spirv-tools + # vulkan-extension-layer + # vulkan-headers + # vulkan-loader + # vulkan-tools + # vulkan-tools-lunarg + # vulkan-utility-libraries + # vulkan-validation-layers + # vkdisplayinfo + # vkd3d + # vkd3d-proton + # vk-bootstrap + # ]; + # extraPkgs = p: with p; [ + # gfxreconstruct + # glslang + # spirv-cross + # spirv-headers + # spirv-tools + # vulkan-extension-layer + # vulkan-headers + # vulkan-loader + # vulkan-tools + # vulkan-tools-lunarg + # vulkan-utility-libraries + # vulkan-validation-layers + # vkdisplayinfo + # vkd3d + # vkd3d-proton + # vk-bootstrap + # ]; + #}; }; # Single GPU Passthru Configuration @@ -110,4 +149,12 @@ nvtopPackages.amd ]; + environment.variables = { + VK_ICD_FILENAMES = "/run/opengl-driver/share/vulkan/icd.d/radeon_icd.x86_64.json:/run/opengl-driver-32/share/vulkan/icd.d/radeon_icd.i686.json"; + }; + + environment.sessionVariables = { + VK_ICD_FILENAMES = "/run/opengl-driver/share/vulkan/icd.d/radeon_icd.x86_64.json:/run/opengl-driver-32/share/vulkan/icd.d/radeon_icd.i686.json"; + }; + } diff --git a/configurations/desktop/hardware-configuration.nix b/configurations/desktop/hardware-configuration.nix index b918328a..7e251f85 100644 --- a/configurations/desktop/hardware-configuration.nix +++ b/configurations/desktop/hardware-configuration.nix @@ -10,7 +10,8 @@ boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "uas" "usbhid" "sd_mod" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" "vendor-reset" ]; + #boot.kernelModules = [ "kvm-amd" "vendor-reset" ]; + boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; fileSystems."/" = diff --git a/flake.lock b/flake.lock index d9db19b6..ddb6739b 100644 --- a/flake.lock +++ b/flake.lock @@ -1,21 +1,25 @@ { "nodes": { - "emacs-overlay": { + "apple-fonts": { "inputs": { "nixpkgs": "nixpkgs", - "nixpkgs-stable": "nixpkgs-stable" + "ny": "ny", + "sf-arabic": "sf-arabic", + "sf-compact": "sf-compact", + "sf-mono": "sf-mono", + "sf-pro": "sf-pro" }, "locked": { - "lastModified": 1734456142, - "narHash": "sha256-mSGDni1iJzHgNS04eiFM8u3d8IB8ziyNuf1A/YU+eWE=", - "owner": "nix-community", - "repo": "emacs-overlay", - "rev": "7932d8e1fa38eb94ab264469e915c5f04393f7a1", + "lastModified": 1732029343, + "narHash": "sha256-sAOEhA/vfyAKggwyI3PNy2xeNzb/USZl4YNpeSzMRBI=", + "owner": "Lyndeno", + "repo": "apple-fonts.nix", + "rev": "714767021b57d0d30de35eb90e4b748fbbb9c99f", "type": "github" }, "original": { - "owner": "nix-community", - "repo": "emacs-overlay", + "owner": "Lyndeno", + "repo": "apple-fonts.nix", "type": "github" } }, @@ -97,7 +101,7 @@ "nixpkgs": [ "nixpkgs" ], - "nixpkgs-stable": "nixpkgs-stable_2", + "nixpkgs-stable": "nixpkgs-stable", "xwayland-satellite-stable": "xwayland-satellite-stable", "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, @@ -171,15 +175,15 @@ }, "nixpkgs": { "locked": { - "lastModified": 1734119587, - "narHash": "sha256-AKU6qqskl0yf2+JdRdD0cfxX4b9x3KKV5RqA6wijmPM=", - "owner": "NixOS", + "lastModified": 1731319897, + "narHash": "sha256-PbABj4tnbWFMfBp6OcUK5iGy1QY+/Z96ZcLpooIbuEI=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "3566ab7246670a43abd2ffa913cc62dad9cdf7d5", + "rev": "dc460ec76cbff0e66e269457d7b728432263166c", "type": "github" }, "original": { - "owner": "NixOS", + "owner": "nixos", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -204,22 +208,6 @@ } }, "nixpkgs-stable": { - "locked": { - "lastModified": 1734323986, - "narHash": "sha256-m/lh6hYMIWDYHCAsn81CDAiXoT3gmxXI9J987W5tZrE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "394571358ce82dff7411395829aa6a3aad45b907", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-24.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-stable_2": { "locked": { "lastModified": 1733730953, "narHash": "sha256-dlK7n82FEyZlHH7BFHQAM5tua+lQO1Iv7aAtglc1O5s=", @@ -235,7 +223,7 @@ "type": "github" } }, - "nixpkgs-stable_3": { + "nixpkgs-stable_2": { "locked": { "lastModified": 1733842502, "narHash": "sha256-XbMLD1CxUx/nqoxKkz+jT35oU3vjryFjoHagsJZB/3U=", @@ -299,15 +287,75 @@ "type": "github" } }, + "ny": { + "flake": false, + "locked": { + "narHash": "sha256-3257NAH4qlan2YHVLpNRy7x8IJqR2pal3OzFo/ykqXs=", + "type": "file", + "url": "https://devimages-cdn.apple.com/design/resources/download/NY.dmg" + }, + "original": { + "type": "file", + "url": "https://devimages-cdn.apple.com/design/resources/download/NY.dmg" + } + }, "root": { "inputs": { - "emacs-overlay": "emacs-overlay", + "apple-fonts": "apple-fonts", "home-manager": "home-manager", "musnix": "musnix", "niri": "niri", "nixd": "nixd", "nixpkgs": "nixpkgs_4", - "nixpkgs-stable": "nixpkgs-stable_3" + "nixpkgs-stable": "nixpkgs-stable_2" + } + }, + "sf-arabic": { + "flake": false, + "locked": { + "narHash": "sha256-/0gjRimqvZyE60xYxxPdlU+7Q2LJnnvtbmwOP0YmS9U=", + "type": "file", + "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Arabic.dmg" + }, + "original": { + "type": "file", + "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Arabic.dmg" + } + }, + "sf-compact": { + "flake": false, + "locked": { + "narHash": "sha256-J72Lyt2wy83E46wN8w6/Rih9kilM9wEjtY6KnbF0DsA=", + "type": "file", + "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Compact.dmg" + }, + "original": { + "type": "file", + "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Compact.dmg" + } + }, + "sf-mono": { + "flake": false, + "locked": { + "narHash": "sha256-ICdHRFdNL7PM/fXJUzS7LgZxZiqcyIuCMHLze4En4vg=", + "type": "file", + "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Mono.dmg" + }, + "original": { + "type": "file", + "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Mono.dmg" + } + }, + "sf-pro": { + "flake": false, + "locked": { + "narHash": "sha256-Q/pOQ4MGhW/ZtLka+UUQcwSoZFDWW34XvutxL4GvzUY=", + "type": "file", + "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Pro.dmg" + }, + "original": { + "type": "file", + "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Pro.dmg" } }, "treefmt-nix": { diff --git a/flake.nix b/flake.nix index 61e6f042..7813ce85 100644 --- a/flake.nix +++ b/flake.nix @@ -23,6 +23,10 @@ url = "github:musnix/musnix"; }; + apple-fonts = { + url = "github:Lyndeno/apple-fonts.nix"; + }; + #emacs-overlay = { # url = "github:nix-community/emacs-overlay"; #}; @@ -38,16 +42,16 @@ desktop = nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs;}; modules = [ - inputs.musnix.nixosModules.musnix - ./global.nix - ./configurations/desktop/configuration.nix + inputs.musnix.nixosModules.musnix + ./global.nix + ./configurations/desktop/configuration.nix ]; }; laptop = nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs;}; modules = [ ./global.nix - ./configurations/laptop/configuration.nix + ./configurations/laptop/configuration.nix ]; }; }; diff --git a/global-home.nix b/global-home.nix index 60df4405..a53791c2 100644 --- a/global-home.nix +++ b/global-home.nix @@ -75,75 +75,6 @@ else fi '') - wineWowPackages.full - # native wayland support (unstable) - # wineWowPackages.waylandFull - - firefox - librewolf - ungoogled-chromium - # nyxt - qutebrowser - # emacs-gtk - telegram-desktop - #(discord.override { - # # remove any overrides that you don't want - # withOpenASAR = true; - # withVencord = true; - #}) - (vesktop.override { withSystemVencord = false; }) # Discord Client Alternative - discordo # Discord terminal client - element-desktop - # cinny-desktop - - lutris - protonup-qt - qpwgraph - - ardour - rnnoise-plugin - lsp-plugins - (yabridge.override { wine = wineWowPackages.waylandFull; }) - (yabridgectl.override { wine = wineWowPackages.waylandFull; }) - - MIDIVisualizer - kdenlive - vlc - unityhub - veracrypt - boxbuddy - distrobox - qdirstat - kid3 - # brasero - # kdePackages.k3b - # xfce.xfburn - ffmpeg - ventoy-full - qbittorrent - krita - gimp - obs-studio - - mpdcron - - pass-wayland - thunderbird - protonmail-desktop - - texliveFull - ripgrep - fzf - yazi - ncdu - - # Just for utils - pulseaudio - alsa-utils - - # For curl scripts - jq - libnotify ]; # Home Manager is pretty good at managing dotfiles. The primary way to manage diff --git a/global.nix b/global.nix index 4206171f..3be1613e 100644 --- a/global.nix +++ b/global.nix @@ -19,6 +19,57 @@ gtk-pipe-viewer ]; + # Enable OpenGL/Vulkan hardware acceleration etc + hardware = { + ## radv: an open-source Vulkan driver from freedesktop + graphics = { + enable = true; + enable32Bit = true; + extraPackages = with pkgs; [ + gfxreconstruct + glslang + spirv-cross + spirv-headers + spirv-tools + vulkan-extension-layer + vulkan-headers + vulkan-loader + vulkan-tools + vulkan-tools-lunarg + vulkan-utility-libraries + vulkan-validation-layers + vkdisplayinfo + vkd3d + vkd3d-proton + vk-bootstrap + ]; + }; + + ## amdvlk: an open-source Vulkan driver from AMD + amdgpu.amdvlk = { + enable = true; + support32Bit.enable = true; + extraPackages = with pkgs; [ + gfxreconstruct + glslang + spirv-cross + spirv-headers + spirv-tools + vulkan-extension-layer + vulkan-headers + vulkan-loader + vulkan-tools + vulkan-tools-lunarg + vulkan-utility-libraries + vulkan-validation-layers + vkdisplayinfo + vkd3d + vkd3d-proton + vk-bootstrap + ]; + }; + }; + # You can specify here what python packages you waint available to python # Custom Python package with all the (Python) imports I need my-python-packages = python-packages: with python-packages; [ # ... @@ -79,22 +130,26 @@ python312Packages.jedi-language-server nixd - neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + #(neovim.overrideAttrs (oldAttrs: { + # buildInputs = oldAttrs.buildInputs ++ [ pkgs.xorg.libX11 ]; + #})) # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + neovim + xorg.libX11 zoxide # A fast cd command that learns your habits tealdeer # A very fast implementation of tldr in Rust sc-im - # emacs-gtk + emacs-gtk #((inputs.emacs-overlay.packages.x86_64-linux.emacs-unstable-pgtk.overrideAttrs (oldAttrs: { - # buildInputs = oldAttrs.buildInputs ++ [ pkgs.webkitgtk ]; - #})).override { - # withXwidgets = true; - #}) - #(emacs30-pgtk.overrideAttrs (oldAttrs: { - # nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ pkgs.webkitgtk_4_0 ]; - # buildInputs = oldAttrs.buildInputs ++ [ pkgs.webkitgtk_4_0 ]; - #})) - emacs30-gtk3 + # buildInputs = oldAttrs.buildInputs ++ [ pkgs.webkitgtk ]; + #})).override { + # withXwidgets = true; + #}) + #(emacs30-pgtk.overrideAttrs (oldAttrs: { + # nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ pkgs.webkitgtk_4_0 ]; + # buildInputs = oldAttrs.buildInputs ++ [ pkgs.webkitgtk_4_0 ]; + #})) + #emacs30-gtk3 # Emacs 30 currently bugged with lsp-bridge, see https://github.com/manateelazycat/lsp-bridge/issues/1123 fastfetch appimage-run @@ -109,8 +164,102 @@ linuxPackages.usbip unixtools.xxd dotnet-sdk + + # Tools for Vulkan + gfxreconstruct + glslang + spirv-cross + spirv-headers + spirv-tools + vulkan-extension-layer + vulkan-headers + vulkan-loader + vulkan-tools + vulkan-tools-lunarg + vulkan-utility-libraries + vulkan-validation-layers + vkdisplayinfo + vkd3d + vkd3d-proton + vk-bootstrap + + + wineWowPackages.full + # native wayland support (unstable) + # wineWowPackages.waylandFull + + firefox + librewolf + ungoogled-chromium + # nyxt + qutebrowser + telegram-desktop + #(discord.override { + # # remove any overrides that you don't want + # withOpenASAR = true; + # withVencord = true; + #}) + (vesktop.override { withSystemVencord = false; }) # Discord Client Alternative + discordo # Discord terminal client + element-desktop + # cinny-desktop + + lutris + protonup-qt + qpwgraph + + ardour + rnnoise-plugin + lsp-plugins + (yabridge.override { wine = wineWowPackages.waylandFull; }) + (yabridgectl.override { wine = wineWowPackages.waylandFull; }) + + MIDIVisualizer + kdenlive + vlc + unityhub + veracrypt + boxbuddy + distrobox + qdirstat + kid3 + # brasero + # kdePackages.k3b + # xfce.xfburn + ffmpeg + ventoy-full + qbittorrent + krita + gimp + obs-studio + + mpdcron + + pass-wayland + thunderbird + protonmail-desktop + + texliveFull + ripgrep + fzf + yazi + ncdu + + # Just for utils + pulseaudio + alsa-utils + + # For curl scripts + jq + libnotify + + # Use the android-studio-full attribute for a very complete Android SDK, including system images + # android-studio-full ] ++ stablePackages; + # Enable ADB Tools for android development + programs.adb.enable = true; + systemd.services.usbipd = { description = "Custom service that runs usbipd"; wantedBy = [ "multi-user.target" ]; @@ -175,20 +324,26 @@ }; # TODO: Fix - #fonts.packages = with pkgs; [ - # nerdfonts - #]; + fonts.packages = with pkgs; [ + #nerdfonts + inputs.apple-fonts.packages.${pkgs.system}.sf-pro-nerd + inputs.apple-fonts.packages.${pkgs.system}.sf-compact-nerd + inputs.apple-fonts.packages.${pkgs.system}.sf-mono-nerd + inputs.apple-fonts.packages.${pkgs.system}.sf-arabic-nerd + ]; users.groups.plugdev = {}; # Define a user account. Don't forget to set a password with ‘passwd’. users.users.cspark = { isNormalUser = true; description = "Curt Spark"; - extraGroups = [ "plugdev" "networkmanager" "wheel" "libvirtd" "libvirt" "kvm" "input" "docker" "cdrom" ]; + extraGroups = [ "plugdev" "networkmanager" "wheel" "libvirtd" "libvirt" "kvm" "input" "docker" "cdrom" "adbusers" ]; }; # Allow unfree packages nixpkgs.config.allowUnfree = true; + # Accept android license + nixpkgs.config.android_sdk.accept_license = true; # Due to NixOS not using FHS paths, many DAWs will not know where to look for VSTs and other plugins. You can solve this by setting environment.variables = let @@ -219,6 +374,8 @@ # Nicer terminal prompt PS1="\[\e[0;36m\]\u\[\e[0m\]@\[\e[0;33m\]\h\[\e[0m\]:\[\e[0;35m\]\w\[\e[0m\] \$ "; + + PATH = "/run/current-system/sw/bin" + builtins.getEnv "PATH"; }; # NixOS Dynamic Libraries Fix @@ -227,6 +384,17 @@ # Add any missing dynamic libraries for unpackaged programs # here, NOT in environment.systemPackages icu + vulkan-extension-layer + vulkan-headers + vulkan-loader + vulkan-tools + vulkan-tools-lunarg + vulkan-utility-libraries + vulkan-validation-layers + vkdisplayinfo + vkd3d + vkd3d-proton + vk-bootstrap ]; # Systemwide Java support diff --git a/modules/nixos/cspark-desktop-exwm/module.nix b/modules/nixos/cspark-desktop-exwm/module.nix index 1848cc28..c5b783ce 100644 --- a/modules/nixos/cspark-desktop-exwm/module.nix +++ b/modules/nixos/cspark-desktop-exwm/module.nix @@ -43,14 +43,14 @@ in gtk3 # Includes gtk-launch which is used by counsel-linux-app inside emacs - # emacs-gtk + emacs-gtk #((inputs.emacs-overlay.packages.x86_64-linux.emacs-unstable-pgtk.overrideAttrs (oldAttrs: { # buildInputs = oldAttrs.buildInputs ++ [ pkgs.webkitgtk ]; #})).override { # withXwidgets = true; #}) # inputs.emacs-overlay.packages.x86_64-linux.emacs-unstable-pgtk - emacs30-gtk3 + #emacs30-gtk3 # Emacs 30 currently bugged with lsp-bridge, see https://github.com/manateelazycat/lsp-bridge/issues/1123 light # GNU/Linux application to control backlights diff --git a/modules/nixos/cspark-single-gpu-passthru/module.nix b/modules/nixos/cspark-single-gpu-passthru/module.nix index acb9a1ae..0f074a5e 100644 --- a/modules/nixos/cspark-single-gpu-passthru/module.nix +++ b/modules/nixos/cspark-single-gpu-passthru/module.nix @@ -93,19 +93,19 @@ in ''; }; # Vendor Reset Patches for Single GPU Passthrough - https://github.com/gnif/vendor-reset - boot.extraModulePackages = with config.boot.kernelPackages; [ vendor-reset ]; + #boot.extraModulePackages = with config.boot.kernelPackages; [ vendor-reset ]; # Ensures GPU is configured to use vendor reset module - systemd.services.vendor-reset-config = { - description = "Ensures GPU is configured to use vendor reset module"; - wantedBy = [ "multi-user.target" ]; - path = [ pkgs.coreutils ]; - enable = true; - serviceConfig = { - User = "root"; - Group = "root"; - }; - script = ''echo device_specific > "/sys/bus/pci/devices/${cfg.gpuPCI}/reset_method"''; - }; + #systemd.services.vendor-reset-config = { + # description = "Ensures GPU is configured to use vendor reset module"; + # wantedBy = [ "multi-user.target" ]; + # path = [ pkgs.coreutils ]; + # enable = true; + # serviceConfig = { + # User = "root"; + # Group = "root"; + # }; + # script = ''echo device_specific > "/sys/bus/pci/devices/${cfg.gpuPCI}/reset_method"''; + #}; hardware.graphics.enable = true; virtualisation.spiceUSBRedirection.enable = true; };