sway: Update monitor configuration

For some reason, the ID of my monitor changed. Also, the home-manager
module for kanshi now prefers to use the settings attribute.
This commit is contained in:
Simon Bruder 2024-06-02 14:15:49 +02:00
parent 2755225791
commit 29f2cca213
Signed by: simon
GPG key ID: 347FF8699CDA0776
2 changed files with 16 additions and 13 deletions

View file

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2020-2023 Simon Bruder <simon@sbruder.de>
# SPDX-FileCopyrightText: 2020-2024 Simon Bruder <simon@sbruder.de>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
@ -64,7 +64,7 @@ in
output = {
"*".bg = "${wallpaper} fill";
} // (lib.optionalAttrs clamshellHack {
"Acer Technologies Acer B277K 0x0000F36C" = {
"Acer Technologies Acer B277K 0x1261936C" = {
position = "1920,0";
scale = "2";
mode = "3840x2160";

View file

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2021-2022 Simon Bruder <simon@sbruder.de>
# SPDX-FileCopyrightText: 2021-2024 Simon Bruder <simon@sbruder.de>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
@ -7,24 +7,27 @@ let
getMachineConfig = machine:
if lib.hasAttr machine machineConfigs
then lib.getAttr machine machineConfigs
else { };
else [ ];
machineConfigs = {
# mayushii is handled separately in sways main configuration.
# See it for more details.
# mayushii = { };
hitagi = {
home.outputs = lib.singleton {
criteria = "Acer Technologies Acer B277K 0x0000F36C";
# mayushii = [ ];
hitagi = [
{
profile.name = "home";
profile.outputs = lib.singleton {
criteria = "Acer Technologies Acer B277K 0x1261936C";
mode = "3840x2160";
scale = 2.0;
};
};
}
];
};
in
{
services.kanshi = {
enable = true;
profiles = getMachineConfig (nixosConfig.networking.hostName);
settings = getMachineConfig (nixosConfig.networking.hostName);
};
}