From cbc68e2b5afe481f86b119d329d521010f841486 Mon Sep 17 00:00:00 2001 From: Szymon P Date: Fri, 27 Feb 2026 20:58:22 +0100 Subject: [PATCH] =?UTF-8?q?branching=20=E2=80=94=20not=20good=20idea...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flake.nix | 56 +++++++++++++++++++-------------------- modules/hypr/hyprland.nix | 10 +++++-- 2 files changed, 36 insertions(+), 30 deletions(-) diff --git a/flake.nix b/flake.nix index 3b2116e..a7236dd 100644 --- a/flake.nix +++ b/flake.nix @@ -51,45 +51,45 @@ }; system = "x86_64-linux"; + general_import = import nixpkgs { + inherit system; + config.allowUnfree = true; + }; + + general_special_args = { + inherit + inputs + userConfig + ; + }; + + general_module_import = [ + ./home.nix + catppuccin.homeModules.catppuccin + nixvim.homeModules.nixvim + ]; + in { homeConfigurations = { "arch" = home-manager.lib.homeManagerConfiguration { - pkgs = import nixpkgs { - inherit system; - config.allowUnfree = true; - }; - extraSpecialArgs = { - inherit - inputs - userConfig - ; + pkgs = general_import; + + extraSpecialArgs = general_special_args // { isNixOS = false; }; - modules = [ - ./home.nix - catppuccin.homeModules.catppuccin - nixvim.homeModules.nixvim - ]; + modules = general_module_import; }; + "nixos" = home-manager.lib.homeManagerConfiguration { - pkgs = import nixpkgs { - inherit system; - config.allowUnfree = true; - }; - extraSpecialArgs = { - inherit - inputs - userConfig - ; + pkgs = general_import; + + extraSpecialArgs = general_special_args // { isNixOS = true; }; - modules = [ - ./home.nix - catppuccin.homeModules.catppuccin - nixvim.homeModules.nixvim - ]; + + modules = general_module_import; }; }; }; diff --git a/modules/hypr/hyprland.nix b/modules/hypr/hyprland.nix index 09c74c2..1cec470 100644 --- a/modules/hypr/hyprland.nix +++ b/modules/hypr/hyprland.nix @@ -3,6 +3,7 @@ lib, userConfig, pkgs, + inputs, ... }: let @@ -24,7 +25,12 @@ in { wayland.windowManager.hyprland = { enable = true; - package = lib.mkIf (!isNixOS) null; + package = + if isNixOS then inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland else null; + portalPackage = lib.mkIf ( + isNixOS + ) inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; + xwayland.enable = true; settings = { "$mainMod" = "SUPER"; @@ -50,7 +56,7 @@ in "col.inactive_border" = "$overlay1"; resize_on_border = false; allow_tearing = false; - layout = "dwindle"; + layout = if isNixOS then "scrolling" else "dwindle"; # i use hyprland-git on nixos }; animations = {