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 = {