diff --git a/flake.nix b/flake.nix index 1778c06..6f373f8 100755 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - + chaotic = { url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/main/darwin/machine.nix b/main/darwin/machine.nix index d40c09b..0c00cbf 100755 --- a/main/darwin/machine.nix +++ b/main/darwin/machine.nix @@ -1,8 +1,4 @@ -{ - pkgs, - system, - ... -}: +{ pkgs, system, ... }: let packages = import ./packages.nix { inherit pkgs; }; diff --git a/main/darwin/packages.nix b/main/darwin/packages.nix index 0686d16..0eb2372 100755 --- a/main/darwin/packages.nix +++ b/main/darwin/packages.nix @@ -1,6 +1,4 @@ -{ - pkgs, -}: +{ pkgs }: with pkgs; { diff --git a/main/nixos/hardware.nix b/main/nixos/hardware.nix index a6d7a3f..f26a8f6 100755 --- a/main/nixos/hardware.nix +++ b/main/nixos/hardware.nix @@ -1,9 +1,4 @@ -{ - config, - lib, - modulesPath, - ... -}: +{ config, lib, modulesPath, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; diff --git a/main/nixos/machine.nix b/main/nixos/machine.nix index fae2988..b363e4b 100755 --- a/main/nixos/machine.nix +++ b/main/nixos/machine.nix @@ -1,9 +1,4 @@ -{ - pkgs, - inputs, - system, - ... -}: +{ pkgs, inputs, system, ... }: let packages = import ./packages.nix { inherit pkgs inputs system; }; diff --git a/main/nixos/packages.nix b/main/nixos/packages.nix index 28e481d..11c3fe5 100755 --- a/main/nixos/packages.nix +++ b/main/nixos/packages.nix @@ -1,8 +1,4 @@ -{ - pkgs, - inputs, - system, -}: +{ pkgs, inputs, system, ... }: let uxplay-fixed = pkgs.uxplay.override { diff --git a/modules/darwin/default.nix b/modules/darwin/default.nix index 8fbc227..a8f2059 100755 --- a/modules/darwin/default.nix +++ b/modules/darwin/default.nix @@ -1,5 +1,4 @@ { ... }: - { imports = [ ../home/git.nix diff --git a/modules/darwin/system/default.nix b/modules/darwin/system/default.nix index 5c7cd20..a7afc41 100755 --- a/modules/darwin/system/default.nix +++ b/modules/darwin/system/default.nix @@ -1,14 +1,8 @@ -{ - pkgs, - config, - lib, - ... -}: +{ pkgs, config, lib, ... }: let inherit (lib) mkAfter; in - { nix.enable = false; diff --git a/modules/darwin/user/default.nix b/modules/darwin/user/default.nix index 8852947..1556bfb 100755 --- a/modules/darwin/user/default.nix +++ b/modules/darwin/user/default.nix @@ -1,8 +1,4 @@ -{ - pkgs, - ... -}: - +{ pkgs, ... }: { system.primaryUser = "sohryu"; users.users.sohryu = { diff --git a/modules/home/git.nix b/modules/home/git.nix index 10e2628..c68f8f8 100755 --- a/modules/home/git.nix +++ b/modules/home/git.nix @@ -1,8 +1,4 @@ -{ - pkgs, - lib, - ... -}: +{ pkgs, lib, ... }: let base = '' diff --git a/modules/home/home.nix b/modules/home/home.nix index f7b50f8..47b18cf 100755 --- a/modules/home/home.nix +++ b/modules/home/home.nix @@ -1,8 +1,4 @@ -{ - pkgs, - ... -}: - +{ pkgs, ... }: { imports = [ ./hyprland.nix diff --git a/modules/home/hypr/default.nix b/modules/home/hypr/default.nix index efaebe3..d16f077 100755 --- a/modules/home/hypr/default.nix +++ b/modules/home/hypr/default.nix @@ -1,5 +1,4 @@ { ... }: - { imports = [ ./hyprland/env.nix diff --git a/modules/home/hypr/hyprland/env.nix b/modules/home/hypr/hyprland/env.nix index 5c14385..6ecf3c9 100755 --- a/modules/home/hypr/hyprland/env.nix +++ b/modules/home/hypr/hyprland/env.nix @@ -1,5 +1,4 @@ { ... }: - { wayland.windowManager.hyprland.settings = { env = [ diff --git a/modules/home/hypr/hyprland/execs.nix b/modules/home/hypr/hyprland/execs.nix index 54bfba9..728c76c 100755 --- a/modules/home/hypr/hyprland/execs.nix +++ b/modules/home/hypr/hyprland/execs.nix @@ -1,5 +1,4 @@ { ... }: - { wayland.windowManager.hyprland.settings = { exec-once = [ diff --git a/modules/home/hypr/hyprland/general.nix b/modules/home/hypr/hyprland/general.nix index c8b9c30..d3f2b9c 100755 --- a/modules/home/hypr/hyprland/general.nix +++ b/modules/home/hypr/hyprland/general.nix @@ -1,5 +1,4 @@ { ... }: - { wayland.windowManager.hyprland.settings = { monitor = ",preferred,auto,1"; @@ -119,6 +118,5 @@ showEmptyWorkspace = 0; }; }; - }; } diff --git a/modules/home/hypr/hyprland/keybinds.nix b/modules/home/hypr/hyprland/keybinds.nix index 9d95671..8097b72 100755 --- a/modules/home/hypr/hyprland/keybinds.nix +++ b/modules/home/hypr/hyprland/keybinds.nix @@ -1,5 +1,4 @@ { ... }: - let ipc = "noctalia-shell ipc call"; in @@ -12,7 +11,6 @@ in ]; bind = [ - # workspace "CTRL $mainMod, right, workspace, r+1" "CTRL $mainMod, left, workspace, r-1" diff --git a/modules/home/hypr/hyprland/rules.nix b/modules/home/hypr/hyprland/rules.nix index c86eb86..c4feb7c 100755 --- a/modules/home/hypr/hyprland/rules.nix +++ b/modules/home/hypr/hyprland/rules.nix @@ -1,5 +1,4 @@ { ... }: - { wayland.windowManager.hyprland.settings = { windowrule = [ diff --git a/modules/home/hyprland.nix b/modules/home/hyprland.nix index b7ced67..b708782 100755 --- a/modules/home/hyprland.nix +++ b/modules/home/hyprland.nix @@ -1,9 +1,4 @@ -{ - pkgs, - inputs, - ... -}: - +{ pkgs, inputs, ... }: { imports = [ ./hypr/default.nix ]; diff --git a/modules/nixos/boot/default.nix b/modules/nixos/boot/default.nix index b0be544..3eb5ad8 100755 --- a/modules/nixos/boot/default.nix +++ b/modules/nixos/boot/default.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: +{ pkgs, ... }: { imports = [ diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 5a3a53f..95fcd03 100755 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -1,5 +1,4 @@ { ... }: - { imports = [ ../home/git.nix diff --git a/modules/nixos/desktop/default.nix b/modules/nixos/desktop/default.nix index f74cf89..23cc74a 100755 --- a/modules/nixos/desktop/default.nix +++ b/modules/nixos/desktop/default.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: +{ pkgs, ... }: { imports = [ @@ -59,6 +56,5 @@ }; environment.etc."xdg/menus/applications.menu".text = - builtins.readFile - "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu"; -} \ No newline at end of file + builtins.readFile "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu"; +} diff --git a/modules/nixos/desktop/window-managers/hyprland.nix b/modules/nixos/desktop/window-managers/hyprland.nix index a1ddf5a..b3ab92e 100755 --- a/modules/nixos/desktop/window-managers/hyprland.nix +++ b/modules/nixos/desktop/window-managers/hyprland.nix @@ -1,8 +1,4 @@ -{ - pkgs, - inputs, - ... -}: +{ pkgs, inputs, ... }: { programs.hyprland = { diff --git a/modules/nixos/gaming/default.nix b/modules/nixos/gaming/default.nix index 25a395c..0f20de9 100755 --- a/modules/nixos/gaming/default.nix +++ b/modules/nixos/gaming/default.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: +{ pkgs, ... }: { imports = [ diff --git a/modules/nixos/gaming/steam/default.nix b/modules/nixos/gaming/steam/default.nix index 45a26e2..d8fd0a6 100755 --- a/modules/nixos/gaming/steam/default.nix +++ b/modules/nixos/gaming/steam/default.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: +{ pkgs, ... }: { programs.steam = { diff --git a/modules/nixos/hardware/graphics/amd.nix b/modules/nixos/hardware/graphics/amd.nix index 02ca5c5..50782fc 100755 --- a/modules/nixos/hardware/graphics/amd.nix +++ b/modules/nixos/hardware/graphics/amd.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: +{ pkgs, ... }: { hardware.graphics.extraPackages = with pkgs; [ diff --git a/modules/nixos/hardware/graphics/default.nix b/modules/nixos/hardware/graphics/default.nix index e2896dc..547838e 100755 --- a/modules/nixos/hardware/graphics/default.nix +++ b/modules/nixos/hardware/graphics/default.nix @@ -1,9 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: +{ config, lib, pkgs, ... }: let driver = config.elars.hardware.graphics.driver; diff --git a/modules/nixos/hardware/graphics/intel.nix b/modules/nixos/hardware/graphics/intel.nix index baee029..b036c90 100755 --- a/modules/nixos/hardware/graphics/intel.nix +++ b/modules/nixos/hardware/graphics/intel.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: +{ pkgs, ... }: let wayland-intel-vaapi-driver = pkgs.intel-vaapi-driver.overrideAttrs (oldAttrs: { version = "2.4.4-wayland-fix"; @@ -22,8 +19,8 @@ let }; }); - hasvk14-layer = pkgs.callPackage ./vk {}; - hasvk14-layer-32 = pkgs.pkgsi686Linux.callPackage ./vk {}; + hasvk14-layer = pkgs.callPackage ./vk { }; + hasvk14-layer-32 = pkgs.pkgsi686Linux.callPackage ./vk { }; in { @@ -44,4 +41,4 @@ in environment.variables = { LIBVA_DRIVER_NAME = "i965"; }; -} \ No newline at end of file +} diff --git a/modules/nixos/hardware/graphics/nvidia.nix b/modules/nixos/hardware/graphics/nvidia.nix index dc97219..05d646b 100755 --- a/modules/nixos/hardware/graphics/nvidia.nix +++ b/modules/nixos/hardware/graphics/nvidia.nix @@ -1,7 +1,4 @@ -{ - config, - ... -}: +{ config, ... }: { services.xserver.videoDrivers = [ "nvidia" ]; diff --git a/modules/nixos/hardware/graphics/vk/default.nix b/modules/nixos/hardware/graphics/vk/default.nix index 2ccdd57..d56376c 100644 --- a/modules/nixos/hardware/graphics/vk/default.nix +++ b/modules/nixos/hardware/graphics/vk/default.nix @@ -2,7 +2,7 @@ pkgs.stdenv.mkDerivation { name = "vulkan-layer-hasvk14"; - src = ./.; + src = ./.; buildInputs = [ pkgs.vulkan-headers ]; diff --git a/modules/nixos/hardware/graphics/vk/hasvk14_layer.c b/modules/nixos/hardware/graphics/vk/hasvk14_layer.c index dd8e2ab..24a06d2 100644 --- a/modules/nixos/hardware/graphics/vk/hasvk14_layer.c +++ b/modules/nixos/hardware/graphics/vk/hasvk14_layer.c @@ -6,18 +6,16 @@ #include #include -static PFN_vkGetInstanceProcAddr g_next_gipa = NULL; -static PFN_vkGetPhysicalDeviceProperties g_next_gdp = NULL; -static PFN_vkGetPhysicalDeviceProperties2 g_next_gdp2 = NULL; +static PFN_vkGetInstanceProcAddr g_next_gipa = NULL; +static PFN_vkGetPhysicalDeviceProperties g_next_gdp = NULL; +static PFN_vkGetPhysicalDeviceProperties2 g_next_gdp2 = NULL; #define HASVK14_API_VERSION VK_MAKE_API_VERSION(0, 1, 4, VK_HEADER_VERSION) -#define INTEL_VENDOR_ID 0x8086 +#define INTEL_VENDOR_ID 0x8086 static int is_intel_below_14(uint32_t vendorID, uint32_t apiVersion) { - return vendorID == INTEL_VENDOR_ID - && VK_API_VERSION_MAJOR(apiVersion) == 1 - && VK_API_VERSION_MINOR(apiVersion) < 4; + return vendorID == INTEL_VENDOR_ID && VK_API_VERSION_MAJOR(apiVersion) == 1 && VK_API_VERSION_MINOR(apiVersion) < 4; } VKAPI_ATTR VkResult VKAPI_CALL @@ -28,30 +26,33 @@ HaVK14_EnumerateInstanceVersion(uint32_t *pApiVersion) } VKAPI_ATTR VkResult VKAPI_CALL -HaVK14_CreateInstance(const VkInstanceCreateInfo *pCreateInfo, +HaVK14_CreateInstance(const VkInstanceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, - VkInstance *pInstance) + VkInstance *pInstance) { VkLayerInstanceCreateInfo *link = (VkLayerInstanceCreateInfo *)pCreateInfo->pNext; while (link && - !(link->sType == VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO && + !(link->sType == VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO && link->function == VK_LAYER_LINK_INFO)) link = (VkLayerInstanceCreateInfo *)link->pNext; - if (!link) return VK_ERROR_INITIALIZATION_FAILED; - g_next_gipa = link->u.pLayerInfo->pfnNextGetInstanceProcAddr; + if (!link) + return VK_ERROR_INITIALIZATION_FAILED; + g_next_gipa = link->u.pLayerInfo->pfnNextGetInstanceProcAddr; link->u.pLayerInfo = link->u.pLayerInfo->pNext; PFN_vkCreateInstance next_ci = (PFN_vkCreateInstance)g_next_gipa(NULL, "vkCreateInstance"); VkResult res = next_ci(pCreateInfo, pAllocator, pInstance); - if (res != VK_SUCCESS) return res; - g_next_gdp = (PFN_vkGetPhysicalDeviceProperties) + if (res != VK_SUCCESS) + return res; + g_next_gdp = (PFN_vkGetPhysicalDeviceProperties) g_next_gipa(*pInstance, "vkGetPhysicalDeviceProperties"); g_next_gdp2 = (PFN_vkGetPhysicalDeviceProperties2) g_next_gipa(*pInstance, "vkGetPhysicalDeviceProperties2"); - if (!g_next_gdp2) { + if (!g_next_gdp2) + { g_next_gdp2 = (PFN_vkGetPhysicalDeviceProperties2) g_next_gipa(*pInstance, "vkGetPhysicalDeviceProperties2KHR"); } @@ -60,36 +61,44 @@ HaVK14_CreateInstance(const VkInstanceCreateInfo *pCreateInfo, } VKAPI_ATTR void VKAPI_CALL -HaVK14_GetPhysicalDeviceProperties(VkPhysicalDevice device, +HaVK14_GetPhysicalDeviceProperties(VkPhysicalDevice device, VkPhysicalDeviceProperties *props) { - if (g_next_gdp) g_next_gdp(device, props); - if (props && is_intel_below_14(props->vendorID, props->apiVersion)) { + if (g_next_gdp) + g_next_gdp(device, props); + if (props && is_intel_below_14(props->vendorID, props->apiVersion)) + { props->apiVersion = HASVK14_API_VERSION; } } VKAPI_ATTR void VKAPI_CALL -HaVK14_GetPhysicalDeviceProperties2(VkPhysicalDevice device, +HaVK14_GetPhysicalDeviceProperties2(VkPhysicalDevice device, VkPhysicalDeviceProperties2 *props2) { - if (g_next_gdp2) g_next_gdp2(device, props2); - if (!props2) return; + if (g_next_gdp2) + g_next_gdp2(device, props2); + if (!props2) + return; VkPhysicalDeviceProperties *props = &props2->properties; - if (!is_intel_below_14(props->vendorID, props->apiVersion)) return; + if (!is_intel_below_14(props->vendorID, props->apiVersion)) + return; props->apiVersion = HASVK14_API_VERSION; VkBaseOutStructure *s = (VkBaseOutStructure *)props2->pNext; - while (s) { - if (s->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES) { + while (s) + { + if (s->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES) + { VkPhysicalDeviceVulkan12Properties *p12 = (VkPhysicalDeviceVulkan12Properties *)s; - p12->conformanceVersion = (VkConformanceVersion){ 1, 4, 1, 1 }; + p12->conformanceVersion = (VkConformanceVersion){1, 4, 1, 1}; } - if (s->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES) { + if (s->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES) + { VkPhysicalDeviceDriverProperties *drv = (VkPhysicalDeviceDriverProperties *)s; - drv->conformanceVersion = (VkConformanceVersion){ 1, 4, 1, 1 }; + drv->conformanceVersion = (VkConformanceVersion){1, 4, 1, 1}; } s = s->pNext; } @@ -99,16 +108,18 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL HaVK14_GetInstanceProcAddr(VkInstance instance, const char *pName) { -#define INTERCEPT(fn) \ - if (strcmp(pName, "vk" #fn) == 0) return (PFN_vkVoidFunction)HaVK14_##fn; +#define INTERCEPT(fn) \ + if (strcmp(pName, "vk" #fn) == 0) \ + return (PFN_vkVoidFunction)HaVK14_##fn; INTERCEPT(GetInstanceProcAddr) INTERCEPT(EnumerateInstanceVersion) INTERCEPT(CreateInstance) INTERCEPT(GetPhysicalDeviceProperties) INTERCEPT(GetPhysicalDeviceProperties2) - - if (strcmp(pName, "vkGetPhysicalDeviceProperties2KHR") == 0) { + + if (strcmp(pName, "vkGetPhysicalDeviceProperties2KHR") == 0) + { return (PFN_vkVoidFunction)HaVK14_GetPhysicalDeviceProperties2; } diff --git a/modules/nixos/services/printing/default.nix b/modules/nixos/services/printing/default.nix index 624b538..6715b48 100755 --- a/modules/nixos/services/printing/default.nix +++ b/modules/nixos/services/printing/default.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: +{ pkgs, ... }: { services.printing = { diff --git a/modules/nixos/services/security/default.nix b/modules/nixos/services/security/default.nix index 0a9180b..ad575c0 100755 --- a/modules/nixos/services/security/default.nix +++ b/modules/nixos/services/security/default.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: +{ pkgs, ... }: { programs.gnupg.agent = { diff --git a/modules/nixos/system/fonts/default.nix b/modules/nixos/system/fonts/default.nix index 0ed647b..7be78ff 100755 --- a/modules/nixos/system/fonts/default.nix +++ b/modules/nixos/system/fonts/default.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: +{ pkgs, ... }: { fonts = { diff --git a/modules/nixos/system/kmscon/default.nix b/modules/nixos/system/kmscon/default.nix index 43ff782..7011c88 100755 --- a/modules/nixos/system/kmscon/default.nix +++ b/modules/nixos/system/kmscon/default.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: +{ pkgs, ... }: { fonts.packages = [ diff --git a/modules/nixos/users/default.nix b/modules/nixos/users/default.nix index e3f63e8..4819cd9 100755 --- a/modules/nixos/users/default.nix +++ b/modules/nixos/users/default.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: +{ pkgs, ... }: { users.users.elars = {