refactor: centralize host and user metadata
This commit is contained in:
@@ -16,7 +16,32 @@
|
||||
};
|
||||
|
||||
flake.modules.homeManager.niri =
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
outputs = lib.mapAttrs (
|
||||
_: display:
|
||||
{
|
||||
position = {
|
||||
x = display.x;
|
||||
y = display.y;
|
||||
};
|
||||
}
|
||||
// lib.optionalAttrs (display.primary or false) {
|
||||
"focus-at-startup" = true;
|
||||
}
|
||||
// lib.optionalAttrs (display ? scale) {
|
||||
inherit (display) scale;
|
||||
}
|
||||
// lib.optionalAttrs (display ? mode) {
|
||||
inherit (display) mode;
|
||||
}
|
||||
) config.meta.host.displays;
|
||||
in
|
||||
{
|
||||
home.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
@@ -34,6 +59,7 @@
|
||||
];
|
||||
|
||||
programs.niri.settings = {
|
||||
inherit outputs;
|
||||
environment.DISPLAY = ":0";
|
||||
spawn-at-startup = [
|
||||
{ command = [ "xwayland-satellite" ]; }
|
||||
|
||||
Reference in New Issue
Block a user