From 314c3860852ff02fcdd3af7dd3b27b6231be9bb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 6 Aug 2022 18:32:34 -0300 Subject: [PATCH] Add settings for graphics --- bmenu.nix | 3 +- flake.nix | 7 +-- system/configuration.nix | 5 ++ system/monolith-hardware-configuration.nix | 3 +- user/helix.nix | 8 ++-- user/home.nix | 54 +++++++++++----------- user/kakoune.nix | 15 ++---- user/sway.nix | 5 +- user/waybar.nix | 4 +- 9 files changed, 50 insertions(+), 54 deletions(-) diff --git a/bmenu.nix b/bmenu.nix index d0aea09..02e306f 100644 --- a/bmenu.nix +++ b/bmenu.nix @@ -1,6 +1,5 @@ { config, pkgs, lib, ... }: -let - inherit (import ./user/variables.nix) key theme color accent font; +let inherit (import ./user/variables.nix) key theme color accent font; in pkgs.writeScriptBin "bmenu" '' #!${pkgs.fish}/bin/fish diff --git a/flake.nix b/flake.nix index e5469bf..9972d17 100644 --- a/flake.nix +++ b/flake.nix @@ -10,7 +10,7 @@ # my stuff dhist.url = "github:lelgenio/dhist"; }; - outputs = { nixpkgs, nixpkgs-unstable, home-manager, nur, dhist, ... } : + outputs = { nixpkgs, nixpkgs-unstable, home-manager, nur, dhist, ... }: let system = "x86_64-linux"; pkgs = import nixpkgs { @@ -29,9 +29,10 @@ common_modules = [ ./system/configuration.nix # nur.nixosModules.nur - ({ config, pkgs, ... } : { + ({ config, pkgs, ... }: { nixpkgs.overlays = [ - overlay-unstable nur.overlay + overlay-unstable + nur.overlay (_: _: { dhist = dhist.packages.${system}.dhist; bmenu = import ./bmenu.nix { inherit config pkgs lib; }; diff --git a/system/configuration.nix b/system/configuration.nix index d8a122b..5ae381b 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -43,6 +43,11 @@ in { boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.efiSysMountPoint = "/boot/efi"; + + boot.kernel.sysctl = { + "vm.max_map_count" = 1048576; # Needed by DayZ + }; + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/"; diff --git a/system/monolith-hardware-configuration.nix b/system/monolith-hardware-configuration.nix index 8497783..62780aa 100644 --- a/system/monolith-hardware-configuration.nix +++ b/system/monolith-hardware-configuration.nix @@ -12,9 +12,10 @@ # For 32 bit applications hardware.opengl.driSupport32Bit = true; hardware.opengl.extraPackages = with pkgs; [ amdvlk ]; - # For 32 bit applications + # For 32 bit applications # Only available on unstable hardware.opengl.extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ]; + environment.variables = { AMD_VULKAN_ICD = "RADV"; }; boot.extraModulePackages = [ ]; fileSystems."/" = { diff --git a/user/helix.nix b/user/helix.nix index 04e4e97..99958d5 100644 --- a/user/helix.nix +++ b/user/helix.nix @@ -1,5 +1,5 @@ -{ config, pkgs, lib, font, ... }: let - inherit (import ./variables.nix) key theme color accent font; +{ config, pkgs, lib, font, ... }: +let inherit (import ./variables.nix) key theme color accent font; in { config = { programs.helix = { @@ -62,8 +62,6 @@ in { keys.insert = { "A-k" = "normal_mode"; }; }; }; - home.packages = with pkgs; [ - pkgs.unstable.helix - ]; + home.packages = with pkgs; [ pkgs.unstable.helix ]; }; } diff --git a/user/home.nix b/user/home.nix index ceedd3f..5921809 100644 --- a/user/home.nix +++ b/user/home.nix @@ -322,54 +322,54 @@ in { enable = true; enableSessionWide = true; settings = { - toggle_fps_limit="F1"; + toggle_fps_limit = "F1"; - legacy_layout="false"; + legacy_layout = "false"; gpu_stats = true; gpu_temp = true; gpu_core_clock = true; gpu_mem_clock = true; gpu_power = true; gpu_load_change = true; - gpu_load_value="50,90"; - gpu_load_color="FFFFFF,FFAA7F,CC0000"; - gpu_text="GPU"; + gpu_load_value = "50,90"; + gpu_load_color = "FFFFFF,FFAA7F,CC0000"; + gpu_text = "GPU"; cpu_stats = true; cpu_temp = true; cpu_power = true; cpu_mhz = true; cpu_load_change = true; core_load_change = true; - cpu_load_value="50,90"; - cpu_load_color="FFFFFF,FFAA7F,CC0000"; - cpu_color="2e97cb"; - cpu_text="CPU"; + cpu_load_value = "50,90"; + cpu_load_color = "FFFFFF,FFAA7F,CC0000"; + cpu_color = "2e97cb"; + cpu_text = "CPU"; io_stats = true; io_read = true; io_write = true; - io_color="a491d3"; + io_color = "a491d3"; swap = true; vram = true; - vram_color="ad64c1"; + vram_color = "ad64c1"; ram = true; - ram_color="c26693"; + ram_color = "c26693"; fps = true; - engine_color="eb5b5b"; - gpu_color="2e9762"; - wine_color="eb5b5b"; - frame_timing="1"; - frametime_color="00ff00"; - media_player_color="ffffff"; - background_alpha="0.8"; - font_size="24"; + engine_color = "eb5b5b"; + gpu_color = "2e9762"; + wine_color = "eb5b5b"; + frame_timing = "1"; + frametime_color = "00ff00"; + media_player_color = "ffffff"; + background_alpha = "0.8"; + font_size = "24"; - background_color="020202"; - position="top-left"; - text_color="ffffff"; - round_corners="10"; - toggle_hud="Shift_R+F12"; - toggle_logging="Shift_L+F12"; - output_folder="/home/lelgenio"; + background_color = "020202"; + position = "top-left"; + text_color = "ffffff"; + round_corners = "10"; + toggle_hud = "Shift_R+F12"; + toggle_logging = "Shift_L+F12"; + output_folder = "/home/lelgenio"; }; }; systemd.user.services = { diff --git a/user/kakoune.nix b/user/kakoune.nix index b30f560..6443c68 100644 --- a/user/kakoune.nix +++ b/user/kakoune.nix @@ -1,10 +1,10 @@ -{ config, pkgs, lib, font, ... }: let - inherit (import ./variables.nix) key theme color accent font; +{ config, pkgs, lib, font, ... }: +let inherit (import ./variables.nix) key theme color accent font; in { config = { programs.kakoune = { - enable = true; - extraConfig = let + enable = true; + extraConfig = let colors = lib.mapAttrs (_: lib.replaceStrings [ "#" ] [ "rgb:" ]) { accent_fg = accent.fg; accent_color = accent.color; @@ -120,12 +120,7 @@ in { Hint = "blue"; })); }; - home.packages = with pkgs; [ - kakoune - terminal - ranger - bmenu - ]; + home.packages = with pkgs; [ kakoune terminal ranger bmenu ]; home.sessionVariables = { EDITOR = "kak"; # Some plugins(kak_ansi) like to compile stuff diff --git a/user/sway.nix b/user/sway.nix index 55b4c5e..c8d7df1 100644 --- a/user/sway.nix +++ b/user/sway.nix @@ -93,10 +93,7 @@ in { }; floating = { modifier = "Mod4"; - criteria = [ - { class = "file_picker"; } - { app_id = "file_picker"; } - ]; + criteria = [ { class = "file_picker"; } { app_id = "file_picker"; } ]; }; keybindings = let mod = "Mod4"; diff --git a/user/waybar.nix b/user/waybar.nix index 1a0fdfd..1dbaa17 100644 --- a/user/waybar.nix +++ b/user/waybar.nix @@ -1,5 +1,5 @@ -{ config, pkgs, lib, font, ... }: let - inherit (import ./variables.nix) key theme color accent font; +{ config, pkgs, lib, font, ... }: +let inherit (import ./variables.nix) key theme color accent font; in { config = { programs.waybar = {