nixos-config/users/simon/modules/sway/kanshi.nix

31 lines
725 B
Nix
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# SPDX-FileCopyrightText: 2021-2022 Simon Bruder <simon@sbruder.de>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
{ lib, nixosConfig, ... }:
let
getMachineConfig = machine:
if lib.hasAttr machine machineConfigs
then lib.getAttr machine machineConfigs
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";
mode = "3840x2160";
scale = 2.0;
};
};
};
in
{
services.kanshi = {
enable = true;
profiles = getMachineConfig (nixosConfig.networking.hostName);
};
}