From 661e03b4f4f89da21b40b16118463b4c7b93fb0b Mon Sep 17 00:00:00 2001 From: cnst Date: Tue, 2 Jul 2024 16:50:52 +0200 Subject: [PATCH] move hypr --- flake.lock | 42 +++++++++++++++++------------------ home/core/cnst.nix | 6 ----- home/core/gui/default.nix | 13 ----------- home/core/shell/cnst.nix | 2 ++ hosts/core/cnix-pkgs.nix | 6 +++++ hosts/core/default.nix | 1 + hosts/core/hyprland.conf | 7 ++++++ hosts/core/hyprland.nix | 18 +++++++++++++++ hosts/extra/steam/default.nix | 4 +--- hosts/services/cnix.nix | 1 + 10 files changed, 57 insertions(+), 43 deletions(-) create mode 100644 hosts/core/hyprland.conf diff --git a/flake.lock b/flake.lock index 381e41fe..dfa8dd02 100644 --- a/flake.lock +++ b/flake.lock @@ -48,11 +48,11 @@ ] }, "locked": { - "lastModified": 1719836950, - "narHash": "sha256-dZaM7Xeogtf+zIT6tEP9UIxkO4VALLU6wQEdEINFl/s=", + "lastModified": 1719923187, + "narHash": "sha256-833SF50YnN1Hj3qdUmadt9A7XtFWG3BnwQMyxcXIex4=", "owner": "nix-community", "repo": "flake-firefox-nightly", - "rev": "81442b605dcbb9838b1a6c84b44b2643331c16b3", + "rev": "9e77774f2eeab583dbff4127a11287061a947538", "type": "github" }, "original": { @@ -153,11 +153,11 @@ ] }, "locked": { - "lastModified": 1717285511, - "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", + "lastModified": 1719877454, + "narHash": "sha256-g5N1yyOSsPNiOlFfkuI/wcUjmtah+nxdImJqrSATjOU=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", + "rev": "4e3583423212f9303aa1a6337f8dffb415920e4f", "type": "github" }, "original": { @@ -316,11 +316,11 @@ }, "hardware": { "locked": { - "lastModified": 1719681865, - "narHash": "sha256-Lp+l1IsREVbz8WM35OJYZz8sAH0XOjrZWUXVB5bJ2qg=", + "lastModified": 1719895800, + "narHash": "sha256-xNbjISJTFailxass4LmdWeV4jNhAlmJPwj46a/GxE6M=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "a59f00f5ac65b19382617ba00f360f8bc07ed3ac", + "rev": "6e253f12b1009053eff5344be5e835f604bb64cd", "type": "github" }, "original": { @@ -443,11 +443,11 @@ ] }, "locked": { - "lastModified": 1719764240, - "narHash": "sha256-bsZDPD08s8FKCGyy1OMMuM+cOjO1M8vPREkhgyqkRQM=", + "lastModified": 1719913883, + "narHash": "sha256-GHB5lizmXGlglKYAKIvY9bkPcXvbrmEzh4d264omYYo=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "643ec69ac0cfcc1cd26523c3816fb111e5bb3a41", + "rev": "0289cf03e294270c84f20bc09cd527fd7f3d4b72", "type": "github" }, "original": { @@ -459,11 +459,11 @@ "neovim-src": { "flake": false, "locked": { - "lastModified": 1719700831, - "narHash": "sha256-d89hDFBBtuQ7rwS/Q3lKYyfE0ekVCwubMN9q1qCZ3m0=", + "lastModified": 1719827289, + "narHash": "sha256-0IcxmkzmNY4el9yx7wGjZ+VDLGV+3XlI6AW9WfCbzAM=", "owner": "neovim", "repo": "neovim", - "rev": "e7020306a19a5211c834966ec067fff3b981bdb9", + "rev": "8f5e90811025bcc652146168d5116f8d73fe8f81", "type": "github" }, "original": { @@ -521,11 +521,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1719707984, - "narHash": "sha256-RoxIr/fbndtuKqulGvNCcuzC6KdAib85Q8gXnjzA1dw=", + "lastModified": 1719838683, + "narHash": "sha256-Zw9rQjHz1ilNIimEXFeVa1ERNRBF8DoXDhLAZq5B4pE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "7dca15289a1c2990efbe4680f0923ce14139b042", + "rev": "d032c1a6dfad4eedec7e35e91986becc699d7d69", "type": "github" }, "original": { @@ -537,11 +537,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1719690277, - "narHash": "sha256-0xSej1g7eP2kaUF+JQp8jdyNmpmCJKRpO12mKl/36Kc=", + "lastModified": 1719848872, + "narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2741b4b489b55df32afac57bc4bfd220e8bf617e", + "rev": "00d80d13810dbfea8ab4ed1009b09100cca86ba8", "type": "github" }, "original": { diff --git a/home/core/cnst.nix b/home/core/cnst.nix index 318a5d52..59aa2a80 100644 --- a/home/core/cnst.nix +++ b/home/core/cnst.nix @@ -3,12 +3,6 @@ BROWSER = "firefox"; EDITOR = "nvim"; TERM = "kitty"; - AMD_VULKAN_ICD = "RADV"; - NIXOS_OZONE_WL = 1; - SDL_VIDEODRIVER = "wayland"; - QT_QPA_PLATFORM = "wayland"; - XDG_SESSION_TYPE = "wayland"; - QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; }; imports = [ ./git diff --git a/home/core/gui/default.nix b/home/core/gui/default.nix index 7ac80450..68e2f3f3 100644 --- a/home/core/gui/default.nix +++ b/home/core/gui/default.nix @@ -25,18 +25,5 @@ gnome.gnome-calculator ]; wayland.windowManager.hyprland = { - enable = true; - package = pkgs.hyprland; - xwayland.enable = true; - extraConfig = '' - ${builtins.readFile ./hyprland.conf} - ''; - systemd = { - enable = true; - extraCommands = [ - "systemctl --user stop graphical-session.target" - "systemctl --user start hyprland-session.target" - ]; - }; }; } diff --git a/home/core/shell/cnst.nix b/home/core/shell/cnst.nix index 4a64685f..f369b267 100644 --- a/home/core/shell/cnst.nix +++ b/home/core/shell/cnst.nix @@ -10,7 +10,9 @@ nixconfig = "cd /home/cnst/.nix-config/"; ll = "ls -l"; nixupdate = "sudo nixos-rebuild switch -v --show-trace --flake .#cnix"; + nixup = "sudo nixos-rebuild switch --flake .#cnix"; flakeupdate = "nix flake update"; + flakeup = "nix flake update"; }; history = { size = 1000; diff --git a/hosts/core/cnix-pkgs.nix b/hosts/core/cnix-pkgs.nix index 167b98b0..a17e11e4 100644 --- a/hosts/core/cnix-pkgs.nix +++ b/hosts/core/cnix-pkgs.nix @@ -9,6 +9,12 @@ # Util pkgs.tmux pkgs.tmuxifier + + # Misc + pkgs.protonup ]; + sessionVariables = { + STEAM_EXTRA_COMPAT_TOOLS_PATHS = "/home/cnst/.steam/root/compatibilitytools.d"; + }; }; } diff --git a/hosts/core/default.nix b/hosts/core/default.nix index f7555354..df861a72 100644 --- a/hosts/core/default.nix +++ b/hosts/core/default.nix @@ -11,6 +11,7 @@ ./zsh.nix ./cnix-pkgs.nix ./fonts.nix + ./hyprland.nix ]; home-manager = { # useGlobalPkgs = true; diff --git a/hosts/core/hyprland.conf b/hosts/core/hyprland.conf new file mode 100644 index 00000000..d63e0e49 --- /dev/null +++ b/hosts/core/hyprland.conf @@ -0,0 +1,7 @@ +# HYPRLAND CONFIGURATION + +source=./land/appearance.conf +source=./land/inputs.conf +source=./land/keybinds.conf +source=./land/rules.conf +source=./land/startup.conf diff --git a/hosts/core/hyprland.nix b/hosts/core/hyprland.nix index 8c49ba25..2732c20d 100644 --- a/hosts/core/hyprland.nix +++ b/hosts/core/hyprland.nix @@ -3,5 +3,23 @@ enable = true; package = pkgs.hyprland; xwayland.enable = true; + extraConfig = '' + ${builtins.readFile ./hyprland.conf} + ''; + systemd = { + enable = true; + extraCommands = [ + "systemctl --user stop graphical-session.target" + "systemctl --user start hyprland-session.target" + ]; + }; + }; + environment.sessionVariables = { + NIXOS_OZONE_WL = "1"; + AMD_VULKAN_ICD = "RADV"; + SDL_VIDEODRIVER = "wayland"; + QT_QPA_PLATFORM = "wayland"; + XDG_SESSION_TYPE = "wayland"; + QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; }; } diff --git a/hosts/extra/steam/default.nix b/hosts/extra/steam/default.nix index 23969992..8989bcc3 100644 --- a/hosts/extra/steam/default.nix +++ b/hosts/extra/steam/default.nix @@ -2,9 +2,7 @@ programs = { steam = { enable = true; - extraCompatPackages = [ - pkgs.proton-ge-bin - ]; + gamescopeSession.enable = true; package = pkgs.steam.override { extraPkgs = pkgs: with pkgs; [ diff --git a/hosts/services/cnix.nix b/hosts/services/cnix.nix index 43a58f46..51c7eccf 100644 --- a/hosts/services/cnix.nix +++ b/hosts/services/cnix.nix @@ -34,6 +34,7 @@ }; xserver = { enable = true; + videoDrivers = ["amdgpu"]; xkb = { extraLayouts.hhkbse = { description = "HHKBse by cnst";