My Nix Configuration
1{ config, lib, ... }: 2let 3 cfg = config.py.services.kanshi; 4in 5{ 6 options.py.services.kanshi = { 7 enable = lib.mkEnableOption "kanshi"; 8 settings = lib.mkOption { 9 type = lib.types.listOf lib.types.attrs; 10 default = [ ]; 11 description = "The value of `config.services.kanshi.settings`."; 12 }; 13 }; 14 config.services.kanshi = lib.mkIf cfg.enable { 15 enable = true; 16 inherit (cfg) settings; 17 }; 18}