My Nix Configuration

[modules.home] Add kanshi module

Changed files
+54
homes
x86_64-linux
pyrox@zaphod
modules
home
services
kanshi
+36
homes/x86_64-linux/pyrox@zaphod/default.nix
···
home.stateVersion = osConfig.system.stateVersion;
py = {
profiles.desktop.enable = true;
+
services.kanshi = {
+
settings = [
+
{
+
profile = {
+
name = "default";
+
outputs = [
+
{
+
criteria = "eDP-1";
+
status = "enable";
+
scale = 1.2;
+
position = "0,0";
+
}
+
];
+
};
+
}
+
{
+
profile = {
+
name = "office";
+
outputs = [
+
{
+
criteria = "Acer Technologies SA241Y";
+
status = "enable";
+
scale = 1.0;
+
position = "2200,0";
+
}
+
{
+
criteria = "eDP-1";
+
status = "enable";
+
scale = 1.2;
+
position = "0,0";
+
}
+
];
+
};
+
}
+
];
+
};
};
}
+18
modules/home/services/kanshi/default.nix
···
+
{ config, lib, ... }:
+
let
+
cfg = config.py.services.kanshi;
+
in
+
{
+
options.py.services.kanshi = {
+
enable = lib.mkEnableOption "kanshi";
+
settings = lib.mkOption {
+
type = lib.types.list;
+
default = [ ];
+
description = "The value of `config.services.kanshi.settings`.";
+
};
+
};
+
config.services.kanshi = lib.mkIf cfg.enable {
+
enable = true;
+
inherit (cfg) settings;
+
};
+
}