anchor.diff:      };
   
       activeOpacity = mkOption {
  -      type = floatBetween "0.0" "1.01";
  -      default = "1.0";
  -      example = "0.8";
  -      description = ''
  -        Opacity of active windows (number in range 0.0 - 1.0).
  +      type = floatBetween 0 1;
  +      default = 1.0;
  +      example = 0.8;
  +      description = ''
  +        Opacity of active windows.
         '';
       };
   
       inactiveOpacity = mkOption {
  -      type = floatBetween "0.1" "1.01";
  -      default = "1.0";
  -      example = "0.8";
  -      description = ''
  -        Opacity of inactive windows (number in range 0.1 - 1.0).
  +      type = floatBetween 0.1 1;
  +      default = 1.0;
  +      example = 0.8;
  +      description = ''
  +        Opacity of inactive windows.
         '';
       };
   
       menuOpacity = mkOption {
  -      type = floatBetween "0.0" "1.01";
  -      default = "1.0";
  -      example = "0.8";
  -      description = ''
  -        Opacity of dropdown and popup menu (number in range 0.0 - 1.0).
  +      type = floatBetween 0 1;
  +      default = 1.0;
  +      example = 0.8;
  +      description = ''
  +        Opacity of dropdown and popup menu.
         '';
       };
   
  
positive.code:       '';
      };
  
      settings = let
        configTypes = with types; oneOf [ bool int float str ];
        # types.loaOf converts lists to sets
        loaOf = t: with types; either (listOf t) (attrsOf t);
      in mkOption {
        type = loaOf (types.either configTypes (loaOf (types.either configTypes (loaOf configTypes))));
        default = {};
        description = ''
          Additional Picom configuration.
        '';
      };
    };
  
    config = mkIf cfg.enable {
      services.picom.settings = let
        # Hard conversion to float, literally lib.toInt but toFloat
        toFloat = str: let
          may_be_float = builtins.fromJSON str;
        in if builtins.isFloat may_be_float
          then may_be_float
          else throw "Could not convert ${str} to float.";
      in {
        # fading
        fading           = mkDefault cfg.fade;
        fade-delta       = mkDefault cfg.fadeDelta;
        fade-in-step     = mkDefault (toFloat (elemAt cfg.fadeSteps 0));
        fade-out-step    = mkDefault (toFloat (elemAt cfg.fadeSteps 1));
        fade-exclude     = mkDefault cfg.fadeExclude;
  
        # shadows
        shadow           = mkDefault cfg.shadow;
        shadow-offset-x  = mkDefault (elemAt cfg.shadowOffsets 0);
        shadow-offset-y  = mkDefault (elemAt cfg.shadowOffsets 1);
        shadow-opacity   = mkDefault (toFloat cfg.shadowOpacity);
        shadow-exclude   = mkDefault cfg.shadowExclude;
  
        # opacity
        active-opacity   = mkDefault (toFloat cfg.activeOpacity);
        inactive-opacity = mkDefault (toFloat cfg.inactiveOpacity);
  
        wintypes         = mkDefault cfg.wintypes;
  
        opacity-rule     = mkDefault cfg.opacityRules;
  
        # other options
        backend          = mkDefault cfg.backend;
        vsync            = mkDefault cfg.vSync;
        refresh-rate     = mkDefault cfg.refreshRate;
      };
  
      systemd.user.services.picom = {
  
negative.code:     };
  
      fadeSteps = mkOption {
        type = pairOf (floatBetween 0.01 1);
        default = [ 0.028 0.03 ];
        example = [ 0.04 0.04 ];
        description = ''
          Opacity change between fade steps (in and out).
        '';
      };
  
  