things
This commit is contained in:
@@ -18,7 +18,7 @@ in {
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
package = hyprlockFlake;
|
||||
settings = {
|
||||
settings = {
|
||||
general = {
|
||||
disable_loading_bar = true;
|
||||
hide_cursor = true;
|
||||
@@ -30,7 +30,7 @@ in {
|
||||
background = [
|
||||
{
|
||||
monitor = "";
|
||||
path = "~/media/images/dunes.png";
|
||||
path = "~/media/images/l_int06_big.jpg";
|
||||
}
|
||||
];
|
||||
input-field = [
|
||||
|
||||
@@ -24,6 +24,10 @@ in {
|
||||
splash_offset = 2.0;
|
||||
|
||||
preload = [
|
||||
"~/media/images/l_ash08_big.jpg"
|
||||
"~/media/images/l_ash09_big.jpg"
|
||||
"~/media/images/l_int06_big.jpg"
|
||||
"~/media/images/by_housevisit_2560.jpg"
|
||||
"~/media/images/nix.png"
|
||||
"~/media/images/stacks.png"
|
||||
"~/media/images/ship.png"
|
||||
@@ -38,9 +42,9 @@ in {
|
||||
|
||||
wallpaper = [
|
||||
# cnix
|
||||
"DP-3,~/media/images/dunes.png"
|
||||
"DP-3,~/media/images/l_ash08_big.jpg"
|
||||
# adampad
|
||||
"eDP-1,~/media/images/dunes.png"
|
||||
"eDP-1,~/media/images/l_ash08_big.jpg"
|
||||
# toothpc
|
||||
"DVI-D-1,~/media/images/dunes.png"
|
||||
# "DP-1,/share/wallpapers/cat_pacman.png"
|
||||
|
||||
@@ -13,6 +13,9 @@ in {
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
lutris
|
||||
bottles
|
||||
wineWowPackages.waylandFull
|
||||
wineWowPackages.stagingFull
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -4,100 +4,90 @@
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption mkOption mkMerge optional;
|
||||
inherit (lib) mkIf mkOption types mkEnableOption mkMerge;
|
||||
cfg = config.nixos.hardware.graphics.amd;
|
||||
in {
|
||||
options = {
|
||||
nixos.hardware.graphics.amd = {
|
||||
enable = mkEnableOption "Enables AMD graphics";
|
||||
enable = mkEnableOption "AMD graphics support";
|
||||
|
||||
extraPackages = mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Whether to install AMD-specific extra packages.";
|
||||
};
|
||||
|
||||
chaotic = {
|
||||
enable = mkEnableOption "Enables chaotic mesa version";
|
||||
extraPackages = mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Whether to install AMD-specific chaotic extra packages.";
|
||||
};
|
||||
packageSet = mkOption {
|
||||
type = types.enum ["standard" "chaotic" "minimal"];
|
||||
default = "minimal";
|
||||
description = ''
|
||||
Which set of AMD graphics packages to use:
|
||||
- minimal: Only basic drivers and libraries
|
||||
- standard: Additional AMD-specific tools and utilities
|
||||
- chaotic: Chaotic Mesa git version with additional optimizations
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
{
|
||||
assertions = [
|
||||
{
|
||||
assertion = !(cfg.extraPackages && cfg.chaotic.extraPackages);
|
||||
message = ''
|
||||
Only one type of extraPackages can be set to true at the same time.
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
# Base configuration that applies regardless of package set
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
}
|
||||
|
||||
extraPackages = optional cfg.extraPackages (with pkgs; [
|
||||
(mkIf (cfg.packageSet == "standard") {
|
||||
hardware.graphics = {
|
||||
extraPackages = with pkgs; [
|
||||
libva
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
amdvlk
|
||||
vulkan-tools
|
||||
]);
|
||||
|
||||
extraPackages32 = optional cfg.extraPackages (with pkgs.pkgsi686Linux; [
|
||||
];
|
||||
extraPackages32 = with pkgs.pkgsi686Linux; [
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
]);
|
||||
];
|
||||
};
|
||||
}
|
||||
(mkIf cfg.chaotic.enable (mkMerge [
|
||||
{
|
||||
chaotic.scx.enable = true;
|
||||
}
|
||||
(mkIf cfg.chaotic.extraPackages {
|
||||
chaotic = {
|
||||
scx.scheduler = "scx_lavd";
|
||||
mesa-git = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
libva
|
||||
libvdpau-va-gl
|
||||
vaapiVdpau
|
||||
libdrm_git
|
||||
latencyflex-vulkan
|
||||
mesa_git
|
||||
mesa_git.opencl
|
||||
vulkanPackages_latest.gfxreconstruct
|
||||
vulkanPackages_latest.spirv-cross
|
||||
vulkanPackages_latest.spirv-headers
|
||||
vulkanPackages_latest.spirv-tools
|
||||
vulkanPackages_latest.vulkan-extension-layer
|
||||
vulkanPackages_latest.vulkan-headers
|
||||
vulkanPackages_latest.vulkan-loader
|
||||
vulkanPackages_latest.vulkan-tools
|
||||
vulkanPackages_latest.vulkan-tools-lunarg
|
||||
vulkanPackages_latest.vulkan-utility-libraries
|
||||
vulkanPackages_latest.vulkan-validation-layers
|
||||
vulkanPackages_latest.vulkan-volk
|
||||
];
|
||||
extraPackages32 = with pkgs.pkgsi686Linux; [
|
||||
pkgs.mesa32_git
|
||||
pkgs.mesa32_git.opencl
|
||||
libdrm32_git
|
||||
libva
|
||||
libvdpau-va-gl
|
||||
vaapiVdpau
|
||||
];
|
||||
};
|
||||
})
|
||||
|
||||
(mkIf (cfg.packageSet == "chaotic") {
|
||||
chaotic = {
|
||||
scx = {
|
||||
enable = true;
|
||||
scheduler = "scx_lavd";
|
||||
};
|
||||
})
|
||||
]))
|
||||
mesa-git = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
libva
|
||||
libvdpau-va-gl
|
||||
vaapiVdpau
|
||||
libdrm_git
|
||||
latencyflex-vulkan
|
||||
mesa_git
|
||||
mesa_git.opencl
|
||||
vulkanPackages_latest.gfxreconstruct
|
||||
vulkanPackages_latest.spirv-cross
|
||||
vulkanPackages_latest.spirv-headers
|
||||
vulkanPackages_latest.spirv-tools
|
||||
vulkanPackages_latest.vulkan-extension-layer
|
||||
vulkanPackages_latest.vulkan-headers
|
||||
vulkanPackages_latest.vulkan-loader
|
||||
vulkanPackages_latest.vulkan-tools
|
||||
vulkanPackages_latest.vulkan-tools-lunarg
|
||||
vulkanPackages_latest.vulkan-utility-libraries
|
||||
vulkanPackages_latest.vulkan-validation-layers
|
||||
vulkanPackages_latest.vulkan-volk
|
||||
];
|
||||
extraPackages32 = with pkgs.pkgsi686Linux; [
|
||||
pkgs.mesa32_git
|
||||
pkgs.mesa32_git.opencl
|
||||
libdrm32_git
|
||||
libva
|
||||
libvdpau-va-gl
|
||||
vaapiVdpau
|
||||
];
|
||||
};
|
||||
};
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -7,44 +7,50 @@
|
||||
cfg = config.nixos.hardware.network;
|
||||
in {
|
||||
options = {
|
||||
nixos = {
|
||||
hardware = {
|
||||
network = {
|
||||
enable = mkEnableOption "Enable the custom networking module";
|
||||
|
||||
hostName = mkOption {
|
||||
type = types.str;
|
||||
default = "default-hostname";
|
||||
description = "Hostname for the nixos.";
|
||||
};
|
||||
|
||||
interfaces = mkOption {
|
||||
type = types.attrsOf (types.submodule {
|
||||
options = {
|
||||
allowedTCPPorts = mkOption {
|
||||
type = types.listOf types.int;
|
||||
default = [];
|
||||
description = "List of allowed TCP ports for this interface.";
|
||||
};
|
||||
};
|
||||
});
|
||||
default = {};
|
||||
description = "Network interface configurations.";
|
||||
};
|
||||
nm-applet = {
|
||||
enable = mkEnableOption "Enables the nm-applet service.";
|
||||
indicator = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Enables the nm-applet indicator.";
|
||||
nixos.hardware.network = {
|
||||
enable = mkEnableOption "Enable the custom networking module";
|
||||
hostName = mkOption {
|
||||
type = types.str;
|
||||
default = "default-hostname";
|
||||
description = "Hostname for the nixos.";
|
||||
};
|
||||
interfaces = mkOption {
|
||||
type = types.attrsOf (types.submodule {
|
||||
options = {
|
||||
allowedTCPPorts = mkOption {
|
||||
type = types.listOf types.int;
|
||||
default = [];
|
||||
description = "List of allowed TCP ports for this interface.";
|
||||
};
|
||||
allowedUDPPorts = mkOption {
|
||||
type = types.listOf types.int;
|
||||
default = [];
|
||||
description = "List of allowed UDP ports for this interface.";
|
||||
};
|
||||
};
|
||||
});
|
||||
default = {};
|
||||
description = "Network interface configurations.";
|
||||
};
|
||||
nm-applet = {
|
||||
enable = mkEnableOption "Enables the nm-applet service.";
|
||||
indicator = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Enables the nm-applet indicator.";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.interfaces != {} -> config.networking.networkmanager.enable;
|
||||
message = "Network interfaces configured but NetworkManager is not enabled";
|
||||
}
|
||||
];
|
||||
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
inherit (cfg) hostName;
|
||||
@@ -54,6 +60,12 @@ in {
|
||||
inherit (cfg) interfaces;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.NetworkManager = {
|
||||
wants = ["nftables.service"];
|
||||
after = ["nftables.service"];
|
||||
};
|
||||
|
||||
programs.nm-applet = {
|
||||
enable = cfg.nm-applet.enable;
|
||||
indicator = cfg.nm-applet.indicator;
|
||||
|
||||
@@ -15,11 +15,6 @@ in {
|
||||
default = true;
|
||||
description = "Use xdg-open via the portal.";
|
||||
};
|
||||
extraPortals = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [pkgs.xdg-desktop-portal-gtk];
|
||||
description = "List of extra portals to include.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -28,10 +23,10 @@ in {
|
||||
enable = true;
|
||||
xdgOpenUsePortal = cfg.xdgOpenUsePortal;
|
||||
config = {
|
||||
common.default = ["gtk"];
|
||||
hyprland.default = ["gtk" "hyprland"];
|
||||
common.default = "*";
|
||||
hyprland.default = ["hyprland" "gtk"];
|
||||
};
|
||||
extraPortals = cfg.extraPortals;
|
||||
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user