From 3914f46ba3dd947164e2c05b88f68de28c6bfd55 Mon Sep 17 00:00:00 2001 From: cnst Date: Sun, 28 Jul 2024 15:18:29 +0200 Subject: [PATCH] added copyq service --- flake.lock | 505 ++------------------------- home/core/gui/hypr/default.nix | 1 + home/core/services/copyq/default.nix | 5 + home/users/cnst/imports.nix | 6 +- home/users/toothpick/imports.nix | 1 + nixos/extra/gamemode/default.nix | 13 +- nixos/extra/gamescope/default.nix | 5 + nixos/extra/gaming.nix | 1 - nixos/extra/steam/default.nix | 18 +- nixos/hardware/cnix.nix | 4 + nixos/services/xserver/cnix.nix | 4 +- 11 files changed, 57 insertions(+), 506 deletions(-) create mode 100644 home/core/services/copyq/default.nix diff --git a/flake.lock b/flake.lock index 4f8ac5a9..18955753 100644 --- a/flake.lock +++ b/flake.lock @@ -1,38 +1,5 @@ { "nodes": { - "aquamarine": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprwayland-scanner" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1721992626, - "narHash": "sha256-GFDSPWxOqEkNrbuSfyoQHGIaRhJNapn2Rv0EEmBGR9A=", - "owner": "hyprwm", - "repo": "aquamarine", - "rev": "f95d1509370b7f40ef356ff69a332bd0356ab044", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "aquamarine", - "type": "github" - } - }, "cachix": { "locked": { "lastModified": 1635350005, @@ -247,7 +214,7 @@ }, "flake-utils_3": { "inputs": { - "systems": "systems_3" + "systems": "systems_2" }, "locked": { "lastModified": 1710146030, @@ -265,7 +232,7 @@ }, "flake-utils_4": { "inputs": { - "systems": "systems_4" + "systems": "systems_3" }, "locked": { "lastModified": 1710146030, @@ -283,7 +250,7 @@ }, "flake-utils_5": { "inputs": { - "systems": "systems_6" + "systems": "systems_5" }, "locked": { "lastModified": 1710146030, @@ -392,11 +359,11 @@ }, "hardware": { "locked": { - "lastModified": 1722017959, - "narHash": "sha256-vkv3MtjRtJdqeWMLH874ngbC6/5wUYzsdw0pb96ZLRc=", + "lastModified": 1722114937, + "narHash": "sha256-MOZ9woPwdpFJcHx3wic2Mlw9aztdKjMnFT3FaeLzJkM=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "0b4d40f95a68ef0a6785f6b938ac8c1383321dbf", + "rev": "e67b60fb1b2c3aad2202d95b91d4c218cf2a4fdd", "type": "github" }, "original": { @@ -463,366 +430,13 @@ "type": "github" } }, - "hyprcursor": { - "inputs": { - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1721330371, - "narHash": "sha256-aYlHTWylczLt6ERJyg6E66Y/XSCbVL7leVcRuJmVbpI=", - "owner": "hyprwm", - "repo": "hyprcursor", - "rev": "4493a972b48f9c3014befbbf381ed5fff91a65dc", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprcursor", - "type": "github" - } - }, - "hypridle": { - "inputs": { - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "hyprutils": "hyprutils", - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1721332982, - "narHash": "sha256-UiNq9EDnnWXaG7d5AExvPlzapuw4VyWnFHTo38Q3kn4=", - "owner": "hyprwm", - "repo": "hypridle", - "rev": "e5366d34b5e1f06a1233667cded3ef05b482778c", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hypridle", - "type": "github" - } - }, - "hyprland": { - "inputs": { - "aquamarine": "aquamarine", - "hyprcursor": "hyprcursor", - "hyprlang": "hyprlang", - "hyprutils": "hyprutils_2", - "hyprwayland-scanner": "hyprwayland-scanner", - "nixpkgs": "nixpkgs", - "systems": "systems_2", - "xdph": "xdph" - }, - "locked": { - "lastModified": 1722099103, - "narHash": "sha256-2Ebhf5kYsszJV/05KdlE5R0S8w/fsgB8VBvjnlbKl+c=", - "ref": "refs/heads/main", - "rev": "10e8af00d61ee2d647af82712c4070eaec875cdb", - "revCount": 4998, - "submodules": true, - "type": "git", - "url": "https://github.com/hyprwm/Hyprland" - }, - "original": { - "submodules": true, - "type": "git", - "url": "https://github.com/hyprwm/Hyprland" - } - }, - "hyprland-protocols": { - "inputs": { - "nixpkgs": [ - "hyprland", - "xdph", - "nixpkgs" - ], - "systems": [ - "hyprland", - "xdph", - "systems" - ] - }, - "locked": { - "lastModified": 1718746314, - "narHash": "sha256-HUklK5u86w2Yh9dOkk4FdsL8eehcOZ95jPhLixGDRQY=", - "owner": "hyprwm", - "repo": "hyprland-protocols", - "rev": "1b61f0093afff20ab44d88ad707aed8bf2215290", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-protocols", - "type": "github" - } - }, - "hyprlang": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1721324361, - "narHash": "sha256-BiJKO0IIdnSwHQBSrEJlKlFr753urkLE48wtt0UhNG4=", - "owner": "hyprwm", - "repo": "hyprlang", - "rev": "adbefbf49664a6c2c8bf36b6487fd31e3eb68086", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlang", - "type": "github" - } - }, - "hyprlock": { - "inputs": { - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "hyprutils": "hyprutils_3", - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1721855891, - "narHash": "sha256-S70Pif/SaChwtJwV0K4rUh+pU8kyVtzbGtNtsOQ8geo=", - "owner": "hyprwm", - "repo": "hyprlock", - "rev": "cf0e975fedcddde897a75c5b6a2a111177b0baad", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlock", - "type": "github" - } - }, - "hyprpaper": { - "inputs": { - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "hyprutils": "hyprutils_4", - "hyprwayland-scanner": "hyprwayland-scanner_2", - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1721686135, - "narHash": "sha256-Hu2r0BX0/98FzNXI5Nmr+Y0C03iymd+TBiCdR8poW+M=", - "owner": "hyprwm", - "repo": "hyprpaper", - "rev": "f1f7fc60f5ae2609a369964aeb7ddbf6f9277de7", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprpaper", - "type": "github" - } - }, - "hyprutils": { - "inputs": { - "nixpkgs": [ - "hypridle", - "nixpkgs" - ], - "systems": [ - "hypridle", - "systems" - ] - }, - "locked": { - "lastModified": 1721324102, - "narHash": "sha256-WAZ0X6yJW1hFG6otkHBfyJDKRpNP5stsRqdEuHrFRpk=", - "owner": "hyprwm", - "repo": "hyprutils", - "rev": "962582a090bc233c4de9d9897f46794280288989", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprutils", - "type": "github" - } - }, - "hyprutils_2": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1722098849, - "narHash": "sha256-D3wIZlBNh7LuZ0NaoCpY/Pvu+xHxIVtSN+KkWZYvvVs=", - "owner": "hyprwm", - "repo": "hyprutils", - "rev": "5dcbbc1e3de40b2cecfd2007434d86e924468f1f", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprutils", - "type": "github" - } - }, - "hyprutils_3": { - "inputs": { - "nixpkgs": [ - "hyprlock", - "nixpkgs" - ], - "systems": [ - "hyprlock", - "systems" - ] - }, - "locked": { - "lastModified": 1721324102, - "narHash": "sha256-WAZ0X6yJW1hFG6otkHBfyJDKRpNP5stsRqdEuHrFRpk=", - "owner": "hyprwm", - "repo": "hyprutils", - "rev": "962582a090bc233c4de9d9897f46794280288989", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprutils", - "type": "github" - } - }, - "hyprutils_4": { - "inputs": { - "nixpkgs": [ - "hyprpaper", - "nixpkgs" - ], - "systems": [ - "hyprpaper", - "systems" - ] - }, - "locked": { - "lastModified": 1721324102, - "narHash": "sha256-WAZ0X6yJW1hFG6otkHBfyJDKRpNP5stsRqdEuHrFRpk=", - "owner": "hyprwm", - "repo": "hyprutils", - "rev": "962582a090bc233c4de9d9897f46794280288989", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprutils", - "type": "github" - } - }, - "hyprwayland-scanner": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1721324119, - "narHash": "sha256-SOOqIT27/X792+vsLSeFdrNTF+OSRp5qXv6Te+fb2Qg=", - "owner": "hyprwm", - "repo": "hyprwayland-scanner", - "rev": "a048a6cb015340bd82f97c1f40a4b595ca85cc30", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprwayland-scanner", - "type": "github" - } - }, - "hyprwayland-scanner_2": { - "inputs": { - "nixpkgs": [ - "hyprpaper", - "nixpkgs" - ], - "systems": [ - "hyprpaper", - "systems" - ] - }, - "locked": { - "lastModified": 1721324119, - "narHash": "sha256-SOOqIT27/X792+vsLSeFdrNTF+OSRp5qXv6Te+fb2Qg=", - "owner": "hyprwm", - "repo": "hyprwayland-scanner", - "rev": "a048a6cb015340bd82f97c1f40a4b595ca85cc30", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprwayland-scanner", - "type": "github" - } - }, "lanzaboote": { "inputs": { "crane": "crane", "flake-compat": "flake-compat_2", "flake-parts": "flake-parts", "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "pre-commit-hooks-nix": "pre-commit-hooks-nix", "rust-overlay": "rust-overlay" }, @@ -916,16 +530,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1721924956, - "narHash": "sha256-Sb1jlyRO+N8jBXEX9Pg9Z1Qb8Bw9QyOgLDNMEpmjZ2M=", + "lastModified": 1717794163, + "narHash": "sha256-Ch6ZpFPVvi7Bb6gmmuufpTEFkXqa43pC94XMfU5FEt0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5ad6a14c6bf098e98800b091668718c336effc95", + "rev": "121f68ed7c6c32de5a8ce91a08ef25713d1c4755", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "nixos-unstable-small", "repo": "nixpkgs", "type": "github" } @@ -963,27 +577,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1717794163, - "narHash": "sha256-Ch6ZpFPVvi7Bb6gmmuufpTEFkXqa43pC94XMfU5FEt0=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "121f68ed7c6c32de5a8ce91a08ef25713d1c4755", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable-small", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1721924956, - "narHash": "sha256-Sb1jlyRO+N8jBXEX9Pg9Z1Qb8Bw9QyOgLDNMEpmjZ2M=", + "lastModified": 1722062969, + "narHash": "sha256-QOS0ykELUmPbrrUGmegAUlpmUFznDQeR4q7rFhl8eQg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5ad6a14c6bf098e98800b091668718c336effc95", + "rev": "b73c2221a46c13557b1b3be9c2070cc42cf01eb3", "type": "github" }, "original": { @@ -993,7 +591,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { "lastModified": 1721466660, "narHash": "sha256-pFSxgSZqZ3h+5Du0KvEL1ccDZBwu4zvOil1zzrPNb3c=", @@ -1024,11 +622,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1722016645, - "narHash": "sha256-YQA4oenJwjWVzX+we6Zzv08im5q2n7dVhJ12Nw8wQio=", + "lastModified": 1722111246, + "narHash": "sha256-5ikGEPb8oqup5tTWpvmC8V/ts9ss0VXsPNtlbz7IAYU=", "owner": "nix-community", "repo": "nixvim", - "rev": "162ae6354bbf2af5c33b09aa90e9d8d11f14462e", + "rev": "59941a5300b1b13d6aac0a5115c8fc5b955b5405", "type": "github" }, "original": { @@ -1092,14 +690,10 @@ "flake-utils": "flake-utils_2", "hardware": "hardware", "home-manager": "home-manager", - "hypridle": "hypridle", - "hyprland": "hyprland", - "hyprlock": "hyprlock", - "hyprpaper": "hyprpaper", "lanzaboote": "lanzaboote", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "nixvim": "nixvim", - "systems": "systems_5", + "systems": "systems_4", "wezterm": "wezterm" } }, @@ -1166,16 +760,16 @@ }, "systems_2": { "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default-linux", + "repo": "default", "type": "github" } }, @@ -1195,21 +789,6 @@ } }, "systems_4": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_5": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -1224,7 +803,7 @@ "type": "github" } }, - "systems_6": { + "systems_5": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1266,7 +845,7 @@ "freetype2": "freetype2", "harfbuzz": "harfbuzz", "libpng": "libpng", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_3", "rust-overlay": "rust-overlay_2", "zlib": "zlib" }, @@ -1286,36 +865,6 @@ "type": "github" } }, - "xdph": { - "inputs": { - "hyprland-protocols": "hyprland-protocols", - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1721755049, - "narHash": "sha256-O17b38bQnmfxv7It3OnVYx7fp1seEdI7xxnw5vJFv30=", - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "rev": "5555f467f68ce7cdf1060991c24263073b95e9da", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "type": "github" - } - }, "zlib": { "flake": false, "locked": { diff --git a/home/core/gui/hypr/default.nix b/home/core/gui/hypr/default.nix index dd46580e..3bafd91b 100644 --- a/home/core/gui/hypr/default.nix +++ b/home/core/gui/hypr/default.nix @@ -1,6 +1,7 @@ { wayland.windowManager.hyprland = { enable = true; + xwayland.enable = true; settings = { source = [ "./land/appearance.conf" diff --git a/home/core/services/copyq/default.nix b/home/core/services/copyq/default.nix new file mode 100644 index 00000000..834a3701 --- /dev/null +++ b/home/core/services/copyq/default.nix @@ -0,0 +1,5 @@ +{ + services.copyq = { + enable = true; + }; +} diff --git a/home/users/cnst/imports.nix b/home/users/cnst/imports.nix index 5448400f..2c244b03 100644 --- a/home/users/cnst/imports.nix +++ b/home/users/cnst/imports.nix @@ -21,6 +21,7 @@ ../../core/services/mako ../../core/services/polkit ../../core/services/hypr + ../../core/services/copyq # ../../core/services/power-monitor ]; home = { @@ -47,9 +48,10 @@ xfce.thunar-volman ]; sessionVariables = { - BROWSER = "firefox"; + BROWSER = "chromium"; EDITOR = "nvim"; - TERM = "foot"; + TERM = "wezterm"; + QT_QPA_PLATFORM = "wayland"; SDL_VIDEODRIVER = "wayland"; XDG_SESSION_TYPE = "wayland"; diff --git a/home/users/toothpick/imports.nix b/home/users/toothpick/imports.nix index 98f8028a..94cf08b6 100644 --- a/home/users/toothpick/imports.nix +++ b/home/users/toothpick/imports.nix @@ -8,6 +8,7 @@ ../../core/gui/discord ../../core/gui/vscode ../../core/gui/utility + ../../core/gui/hypr # core.tui ../../core/tui/git/toothpick.nix ../../core/tui/shell/toothpick.nix diff --git a/nixos/extra/gamemode/default.nix b/nixos/extra/gamemode/default.nix index d684e867..8d7e06c6 100644 --- a/nixos/extra/gamemode/default.nix +++ b/nixos/extra/gamemode/default.nix @@ -3,13 +3,14 @@ enable = true; settings = { general = { - renice = 10; - }; - gpu = { - apply_gpu_optimisations = "accept-responsibility"; - gpu_device = 1; - amd_performance_level = "high"; + softrealtime = "auto"; + renice = 15; }; + # gpu = { + # apply_gpu_optimisations = "accept-responsibility"; + # gpu_device = 1; + # amd_performance_level = "high"; + # }; custom = { start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'"; end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'"; diff --git a/nixos/extra/gamescope/default.nix b/nixos/extra/gamescope/default.nix index 1dd167e7..626c4f3d 100644 --- a/nixos/extra/gamescope/default.nix +++ b/nixos/extra/gamescope/default.nix @@ -1,5 +1,10 @@ { programs.gamescope = { enable = true; + capSysNice = true; + args = [ + "--rt" + "--expose-wayland" + ]; }; } diff --git a/nixos/extra/gaming.nix b/nixos/extra/gaming.nix index eba9ec6f..cbcc2b33 100644 --- a/nixos/extra/gaming.nix +++ b/nixos/extra/gaming.nix @@ -18,7 +18,6 @@ SDL2 SDL2_image glib - egl-wayland wineWowPackages.stable wineWowPackages.staging wineWowPackages.waylandFull diff --git a/nixos/extra/steam/default.nix b/nixos/extra/steam/default.nix index 8989bcc3..6fab3c72 100644 --- a/nixos/extra/steam/default.nix +++ b/nixos/extra/steam/default.nix @@ -1,24 +1,8 @@ -{pkgs, ...}: { +{ programs = { steam = { enable = true; gamescopeSession.enable = true; - package = pkgs.steam.override { - extraPkgs = pkgs: - with pkgs; [ - xorg.libXcursor - xorg.libXi - xorg.libXinerama - xorg.libXScrnSaver - libpng - libvorbis - stdenv.cc.cc.lib - libkrb5 - keyutils - SDL2 - SDL2_image - ]; - }; }; }; } diff --git a/nixos/hardware/cnix.nix b/nixos/hardware/cnix.nix index 05971152..38b0e547 100644 --- a/nixos/hardware/cnix.nix +++ b/nixos/hardware/cnix.nix @@ -18,6 +18,10 @@ vaapiVdpau libvdpau-va-gl ]; + extraPackages32 = with pkgs.pkgsi686Linux; [ + vaapiVdpau + libvdpau-va-gl + ]; }; }; } diff --git a/nixos/services/xserver/cnix.nix b/nixos/services/xserver/cnix.nix index fc5d1b4a..fb7c9eb0 100644 --- a/nixos/services/xserver/cnix.nix +++ b/nixos/services/xserver/cnix.nix @@ -1,4 +1,4 @@ -{ +{config, ...}: { services.xserver = { enable = true; videoDrivers = ["amdgpu"]; @@ -6,7 +6,7 @@ extraLayouts.hhkbse = { description = "HHKBse by cnst"; languages = ["se"]; - symbolsFile = /nixos/hosts/cnix/xkb/symbols/hhkbse; + symbolsFile = /home/cnst/.nix-config/nixos/hosts/cnix/xkb/symbols/hhkbse; }; layout = "hhkbse"; # dir = "/home/cnst/.nix-config/nixos/xkb";