From 95b437970eac7d34d5854bd95501ddaa3b38b5fa Mon Sep 17 00:00:00 2001 From: elwrcl Date: Sun, 19 Apr 2026 17:15:15 +0300 Subject: [PATCH] added niri support Signed-off-by: elwrcl --- flake.nix | 5 +++-- home/default.nix | 3 ++- nixos/desktop/default.nix | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 9a593fd..798ff2c 100644 --- a/flake.nix +++ b/flake.nix @@ -36,11 +36,12 @@ }: let system = "x86_64-linux"; + compositor = "niri"; in { nixosConfigurations = { copland = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs system; }; + specialArgs = { inherit inputs system compositor; }; modules = [ { nixpkgs.hostPlatform = system; } @@ -57,7 +58,7 @@ home-manager = { useGlobalPkgs = true; useUserPackages = true; - extraSpecialArgs = { inherit inputs system; }; + extraSpecialArgs = { inherit inputs system compositor; }; users.elars = import ./home; }; } diff --git a/home/default.nix b/home/default.nix index 06d5b69..0f5fc14 100644 --- a/home/default.nix +++ b/home/default.nix @@ -2,11 +2,12 @@ pkgs, inputs, system, + compositor, ... }: { - imports = [ ./hyprland.nix ]; + imports = [ (if compositor == "niri" then ./niri.nix else ./hyprland.nix) ]; home.username = "elars"; home.homeDirectory = "/home/elars"; diff --git a/nixos/desktop/default.nix b/nixos/desktop/default.nix index 0cedf92..17ad0b1 100644 --- a/nixos/desktop/default.nix +++ b/nixos/desktop/default.nix @@ -1,10 +1,11 @@ -{ ... }: +{ compositor, ... }: { imports = [ ./display ./window-managers ./audio + (if compositor == "niri" then ./niri.nix else ./hyprland.nix) ]; xdg.mime = {