niri overlay makes more sense in niri module

This commit is contained in:
twoneis 2024-07-26 16:05:10 +02:00
parent 9f7438a3dc
commit 3d6eba3131
3 changed files with 10 additions and 18 deletions

View file

@ -1,4 +1,4 @@
{ lib, config, pkgs, ... }: let { inputs, lib, config, pkgs, ... }: let
inherit (lib) mkIf; inherit (lib) mkIf;
inherit (config) withNiri username; inherit (config) withNiri username;
in { in {
@ -7,6 +7,10 @@ in {
]; ];
config = mkIf withNiri { config = mkIf withNiri {
nixpkgs.overlays = mkIf config.withNiri [
inputs.niri.overlays.niri
];
environment.sessionVariables = { environment.sessionVariables = {
NIXOS_OZONE_WL = "1"; NIXOS_OZONE_WL = "1";
}; };

View file

@ -1,8 +1,4 @@
{ inputs, ... }: { { inputs, ... }: {
imports = [
./nixpkgs.nix
];
nix = { nix = {
nixPath = ["nixpkgs=${inputs.nixpkgs}"]; nixPath = ["nixpkgs=${inputs.nixpkgs}"];
gc = { gc = {
@ -16,4 +12,9 @@
}; };
}; };
nixpkgs = {
config = {
allowUnfree = true;
};
};
} }

View file

@ -1,13 +0,0 @@
{ inputs, lib, config, ... }: let
inherit (lib) mkIf;
in{
nixpkgs = {
overlays = mkIf config.withNiri [
inputs.niri.overlays.niri
];
config = {
allowUnfree = true;
};
};
}