From ad6be150a3eda911f9f67bd8474ed321aaeea6c2 Mon Sep 17 00:00:00 2001 From: fleaz Date: Sat, 4 Jun 2022 23:49:08 +0000 Subject: [PATCH] modules/kanshi: make hostname specific --- home-manager/modules/kanshi.nix | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/home-manager/modules/kanshi.nix b/home-manager/modules/kanshi.nix index c1a23d2..9325227 100644 --- a/home-manager/modules/kanshi.nix +++ b/home-manager/modules/kanshi.nix @@ -1,7 +1,17 @@ -{ - services.kanshi = { - enable = true; - profiles = { +{ nixosConfig, ... }: +let + machines = { + milhouse = { + "laptop" = { + outputs = [ + { + criteria = "eDP-1"; + scale = 1.0; + } + ]; + }; + }; + jimbo = { "laptop" = { outputs = [ { @@ -31,5 +41,12 @@ }; }; }; +in +{ + services.kanshi = { + enable = true; + #profiles = lookup machines "milhouse"; + profiles = machines."${nixosConfig.networking.hostName}"; + }; }